Skip to content
Snippets Groups Projects
Commit 46fb5aec authored by Pietro Incardona's avatar Pietro Incardona
Browse files

Adding lambda in SE_CLASS1

parent ccdd64f9
No related branches found
No related tags found
No related merge requests found
Pipeline #4057 passed
......@@ -78,6 +78,32 @@ static void init_wrappers()
}\
}
#define CUDA_LAUNCH_LAMBDA(ite, lambda_f, ...) \
{\
cudaDeviceSynchronize(); \
{\
cudaError_t e = cudaGetLastError();\
if (e != cudaSuccess)\
{\
std::string error = cudaGetErrorString(e);\
std::cout << "Cuda an error has occurred before this CUDA_LAUNCH, detected in: " << __FILE__ << ":" << __LINE__ << " " << error << std::endl;\
}\
}\
CHECK_SE_CLASS1_PRE\
if (ite.wthr.x != 0)\
{kernel_launch_lambda<<<ite.wthr,ite.thr>>>(lambda_f);}\
cudaDeviceSynchronize(); \
{\
cudaError_t e = cudaGetLastError();\
if (e != cudaSuccess)\
{\
std::string error = cudaGetErrorString(e);\
std::cout << "Cuda Error in: " << __FILE__ << ":" << __LINE__ << " " << error << std::endl;\
}\
CHECK_SE_CLASS1_POST("lambda")\
}\
}
#define CUDA_CHECK() \
{\
cudaDeviceSynchronize(); \
......@@ -118,4 +144,4 @@ static void init_wrappers()
#endif
#endif
\ No newline at end of file
#endif
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment