Skip to content

Instantly share code, notes, and snippets.

@ChrisLane
Created February 22, 2018 14:51
Show Gist options
  • Save ChrisLane/e299e4259e21932cc3e64ccaee214d93 to your computer and use it in GitHub Desktop.
Save ChrisLane/e299e4259e21932cc3e64ccaee214d93 to your computer and use it in GitHub Desktop.
// Fix CUDA in CLion
#ifdef __JETBRAINS_IDE__
#define __CUDACC__ 1
#define __host__
#define __device__
#define __global__
#define __forceinline__
#define __shared__
inline void __syncthreads() {}
inline void __threadfence_block() {}
template<class T>
inline T __clz(const T val) { return val; }
struct __cuda_fake_struct {
int x;
};
#endif
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment