@@ -143,38 +143,22 @@ std::unique_ptr<gpu_reconstruction_kernels::threadContext> GPUReconstructionProc
143143gpu_reconstruction_kernels::threadContext::threadContext () = default;
144144gpu_reconstruction_kernels::threadContext::~threadContext () = default ;
145145
146- template <class T , int32_t I>
147- uint32_t GPUReconstructionProcessing::GetKernelNum (int32_t k)
148- {
149- static int32_t num = k;
150- if (num < 0 ) {
151- throw std::runtime_error (" Internal Error - Kernel Number not Set" );
152- }
153- return num;
154- }
155-
156- namespace o2 ::gpu::internal
157- {
158- static std::vector<std::string> initKernelNames ()
159- {
160- std::vector<std::string> retVal;
161- #define GPUCA_KRNL (x_class, ...) \
162- GPUReconstructionProcessing::GetKernelNum<GPUCA_M_KRNL_TEMPLATE (x_class)>(retVal.size ()); \
163- retVal.emplace_back (GPUCA_M_STR (GPUCA_M_KRNL_NAME (x_class)));
146+ const std::vector<std::string> GPUReconstructionProcessing::mKernelNames = {
147+ #define GPUCA_KRNL (x_class, ...) GPUCA_M_STR(GPUCA_M_KRNL_NAME(x_class)),
164148#include " GPUReconstructionKernelList.h"
165149#undef GPUCA_KRNL
166- return retVal ;
167- }
168- } // namespace o2::gpu::internal
169-
170- const std::vector<std::string> GPUReconstructionProcessing:: mKernelNames = o2::gpu::internal::initKernelNames();
171-
172- # define GPUCA_KRNL (x_class, ...) \
173- template uint32_t GPUReconstructionProcessing::GetKernelNum<GPUCA_M_KRNL_TEMPLATE(x_class)>( int32_t ); \
174- template <> \
175- const char * GPUReconstructionProcessing::GetKernelName<GPUCA_M_KRNL_TEMPLATE(x_class)>() \
176- { \
177- return GPUCA_M_STR (GPUCA_M_KRNL_NAME (x_class)); \
150+ } ;
151+
152+ # define GPUCA_KRNL ( x_class, x_attributes, x_arguments, x_forward, x_types, x_num ) \
153+ template <> \
154+ uint32_t GPUReconstructionProcessing::GetKernelNum<GPUCA_M_KRNL_TEMPLATE(x_class)>() \
155+ { \
156+ return x_num; \
157+ } \
158+ template <> \
159+ const char * GPUReconstructionProcessing::GetKernelName<GPUCA_M_KRNL_TEMPLATE(x_class)>() \
160+ { \
161+ return GPUCA_M_STR (GPUCA_M_KRNL_NAME (x_class)); \
178162 }
179163#include " GPUReconstructionKernelList.h"
180164#undef GPUCA_KRNL
0 commit comments