#define SEQAN_HOST_DEVICEPrefix for functions working both on host and device side.
Prefix for functions working both on host and device side.
Defined in | <seqan/platform.h> |
---|---|
Signature |
#define SEQAN_HOST_DEVICE
|
Detailed Description
This macro can be placed in front of CUDA-compatible functions that can be callable both on host and device side. The macro expands to __host__ __device__ on CUDA-capable compilers and is ignored otherwise.
Example
inline SEQAN_HOST_DEVICE void foo(int & x)
{
// I can run on the CPU and on the GPU, yay!
x = 10;
}
Data Races
Thread safety unknown!