* This file is part of the GROMACS molecular simulation package.
*
* Copyright (c) 2012,2014,2015,2016,2017 by the GROMACS development team.
- * Copyright (c) 2018,2019,2020, by the GROMACS development team, led by
+ * Copyright (c) 2018,2019,2020,2021, by the GROMACS development team, led by
* Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
* and including many others, as listed in the AUTHORS file in the
* top-level source directory and at http://www.gromacs.org.
#ifndef GMX_TIMING_GPU_TIMING_H
#define GMX_TIMING_GPU_TIMING_H
+#include "gromacs/utility/enumerationhelpers.h"
+
/*! \internal \brief GPU kernel time and call count. */
struct gmx_kernel_timing_data_t
{
/*! \internal \brief
* PME GPU stages timing events indices, corresponding to the string in PMEStageNames in wallcycle.cpp.
*/
-enum
+enum class PmeStage : int
{
- gtPME_SPLINE = 0,
- gtPME_SPREAD,
- gtPME_SPLINEANDSPREAD,
- gtPME_FFT_R2C,
- gtPME_SOLVE,
- gtPME_FFT_C2R,
- gtPME_GATHER,
- gtPME_EVENT_COUNT /* not a stage ID but a static array size */
+ Spline = 0,
+ Spread,
+ SplineAndSpread,
+ FftTransformR2C,
+ Solve,
+ FftTransformC2R,
+ Gather,
+ Count /* not a stage ID but a static array size */
};
/*! \internal \brief GPU timings for PME. */
* TODO: devise a better GPU timing data structuring.
*/
/*! \brief Array of PME GPU timing data. */
- gmx_kernel_timing_data_t timing[gtPME_EVENT_COUNT];
+ gmx::EnumerationArray<PmeStage, gmx_kernel_timing_data_t> timing;
};
/*! \internal \brief GPU NB timings for kernels and H2d/D2H transfers. */