alpaka-group / cupla

C++ User interface for the Platform independent Library Alpaka :arrows_clockwise:
Other
37 stars 18 forks source link

conversion CUDA native dim3->cupla::uint3 #64

Closed psychocoderHPC closed 7 years ago

psychocoderHPC commented 7 years ago

This specification helps during the porting phase from CUDA to cupla. It is possible to include the cupla header and remove cupla redefinition. In that case it is possible to call threadIdx, ... without the need of an alpaka accelerator.

#include <cuda_to_cupla.hpp>

#if( ALPAKA_ACC_GPU_CUDA_ENABLED == 1 )
#   undef blockIdx
#   undef __syncthreads
#   undef threadIdx
#   undef gridDim
#   undef blockDim
#   undef uint3
#   undef dim3
#endif