Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-05-27 07:23:57

0001 // This file is part of the ACTS project.
0002 //
0003 // Copyright (C) 2016 CERN for the benefit of the ACTS project
0004 //
0005 // This Source Code Form is subject to the terms of the Mozilla Public
0006 // License, v. 2.0. If a copy of the MPL was not distributed with this
0007 // file, You can obtain one at https://mozilla.org/MPL/2.0/.
0008 
0009 #pragma once
0010 
0011 #if defined(__CUDACC__)
0012 
0013 #include <cuda.h>
0014 #include <cuda_runtime.h>
0015 #include <stdio.h>
0016 #include <stdlib.h>
0017 
0018 /// Number of threads per Warp
0019 #define WARP_SIZE 32
0020 
0021 /// Helper macro used for checking @c cudaError_t type return values.
0022 #define DETRAY_CUDA_ERROR_CHECK(ans)       \
0023   {                                        \
0024     cudaAssert((ans), __FILE__, __LINE__); \
0025   }
0026 inline void cudaAssert(cudaError_t code, const char *file, int line,
0027                        bool abort = true) {
0028   if (code != cudaSuccess) {
0029     fprintf(stderr, "CUDAassert: %s %s %d\n", cudaGetErrorString(code), file,
0030             line);
0031     if (abort)
0032       exit(code);
0033   }
0034 }
0035 
0036 #endif