DiFfRG
Loading...
Searching...
No Matches
cuda_prefix.hh
Go to the documentation of this file.
1#pragma once
2
3#ifdef __CUDACC__
4
5// external libraries
6#include "cuda.h"
7#include "cuda_runtime.h"
8#include <thrust/device_vector.h>
9#include <thrust/memory.h>
10
11namespace DiFfRG
12{
18 void check_cuda(std::string prefix = "");
19} // namespace DiFfRG
20
21#else
22
23// Forward declare a few classes to make the compiler happy.
24namespace thrust
25{
26 template <typename T> class device_vector;
27}
28struct cudaArray;
29using cudaArray_t = cudaArray *;
30using cudaTextureObject_t = unsigned long long;
31
32#ifndef __forceinline__
33#define __forceinline__
34#endif
35
36#ifndef __host__
37#define __host__
38#endif
39
40#ifndef __device__
41#define __device__
42#endif
43
44#ifndef __constant__
45#define __constant__
46#endif
47
48#endif
Definition complex_math.hh:14
void check_cuda(std::string prefix="")
Check if a CUDA error occurred and print an error message if it did.