Add nvrtc wrapper for later use

This commit is contained in:
Jens Steube
2019-04-26 10:03:16 +02:00
parent 4b986de5fb
commit 4045e60021
8 changed files with 193 additions and 8 deletions
+1 -5
View File
@@ -4,6 +4,7 @@
*/
#ifndef _INC_PLATFORM_H
#define _INC_PLATFORM_H
#ifdef IS_CUDA
DECLSPEC u32 atomic_dec (u32 *p);
@@ -11,11 +12,6 @@ DECLSPEC u32 atomic_inc (u32 *p);
DECLSPEC size_t get_global_id (const u32 dimindx __attribute__((unused)));
DECLSPEC size_t get_local_id (const u32 dimindx __attribute__((unused)));
DECLSPEC size_t get_local_size (const u32 dimindx __attribute__((unused)));
DECLSPEC uint4 uint4_init (const u32 a);
DECLSPEC uint4 uint4_init (const u32 a, const u32 b, const u32 c, const u32 d);
DECLSPEC __inline__ u8 rotate (const u8 v, const int i);
DECLSPEC __inline__ u32 rotate (const u32 v, const int i);
DECLSPEC __inline__ u64 rotate (const u64 v, const int i);
#define rotate(a,n) (((a) << (n)) | ((a) >> (32 - (n))))
#define bitselect(a,b,c) ((a) ^ ((c) & ((b) ^ (a))))