27 #ifndef __SW_SHARP_CUDA_UTILSH__
28 #define __SW_SHARP_CUDA_UTILSH__
34 #define CUDA_SAFE_CALL(call) \
36 cudaError err = call; \
37 if (cudaSuccess != err) { \
38 fprintf(stderr, "Cuda error in file '%s' in line %i : %s.\n", \
39 __FILE__, __LINE__, cudaGetErrorString(err)); \
44 #define TO_GPU cudaMemcpyHostToDevice
45 #define FROM_GPU cudaMemcpyDeviceToHost
47 #define MAX3(x, y, w) max(x, max(y, w))
48 #define MAX4(x, y, w, z) max(max(x, y), max(w, z))
50 #define VEC2_ASSIGN(X, Y) \
56 #define VEC3_ASSIGN(X, Y) \
63 #define VEC4_ASSIGN(X, Y) \
89 extern void cudaCardBuckets(
int*** cardBuckets,
int** cardBucketsLens,
90 int* cards,
int cardsLen,
int buckets);
95 #endif // __SW_SHARP_CUDA_UTILSH__
int cudaCheckCards(int *cards, int cardsLen)
Checks CUDA card index list.
void cudaGetCards(int **cards, int *cardsLen)
Gets CUDA card index list.