summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorThomas Schwinge <thomas@codesourcery.com>2022-04-29 10:44:12 +0200
committerThomas Schwinge <thomas@codesourcery.com>2022-05-18 12:06:20 +0200
commit86f64400a5692499856d41462461327b93f82b8d (patch)
treee2c407f617cade2c8a8820553f0dd897bdfd44c7 /include
parent'include/cuda/cuda.h': For C++, wrap in 'extern "C"' (diff)
downloadgcc-86f64400a5692499856d41462461327b93f82b8d.tar.gz
gcc-86f64400a5692499856d41462461327b93f82b8d.tar.bz2
gcc-86f64400a5692499856d41462461327b93f82b8d.tar.xz
'include/cuda/cuda.h': Add parts necessary for nvptx-tools 'nvptx-run'
include/ * cuda/cuda.h (enum CUjit_option): Add 'CU_JIT_GENERATE_DEBUG_INFO', 'CU_JIT_GENERATE_LINE_INFO'. (enum CUlimit): Add 'CU_LIMIT_STACK_SIZE', 'CU_LIMIT_MALLOC_HEAP_SIZE'. (cuCtxSetLimit, cuGetErrorName): Add.
Diffstat (limited to 'include')
-rw-r--r--include/cuda/cuda.h11
1 files changed, 10 insertions, 1 deletions
diff --git a/include/cuda/cuda.h b/include/cuda/cuda.h
index d7105fb331e..3938d05d150 100644
--- a/include/cuda/cuda.h
+++ b/include/cuda/cuda.h
@@ -97,7 +97,9 @@ typedef enum {
97 CU_JIT_ERROR_LOG_BUFFER = 5, 97 CU_JIT_ERROR_LOG_BUFFER = 5,
98 CU_JIT_ERROR_LOG_BUFFER_SIZE_BYTES = 6, 98 CU_JIT_ERROR_LOG_BUFFER_SIZE_BYTES = 6,
99 CU_JIT_OPTIMIZATION_LEVEL = 7, 99 CU_JIT_OPTIMIZATION_LEVEL = 7,
100 CU_JIT_LOG_VERBOSE = 12 100 CU_JIT_GENERATE_DEBUG_INFO = 11,
101 CU_JIT_LOG_VERBOSE = 12,
102 CU_JIT_GENERATE_LINE_INFO = 13,
101} CUjit_option; 103} CUjit_option;
102 104
103typedef enum { 105typedef enum {
@@ -117,6 +119,11 @@ enum {
117 CU_STREAM_NON_BLOCKING = 1 119 CU_STREAM_NON_BLOCKING = 1
118}; 120};
119 121
122typedef enum {
123 CU_LIMIT_STACK_SIZE = 0x00,
124 CU_LIMIT_MALLOC_HEAP_SIZE = 0x02,
125} CUlimit;
126
120#define cuCtxCreate cuCtxCreate_v2 127#define cuCtxCreate cuCtxCreate_v2
121CUresult cuCtxCreate (CUcontext *, unsigned, CUdevice); 128CUresult cuCtxCreate (CUcontext *, unsigned, CUdevice);
122#define cuCtxDestroy cuCtxDestroy_v2 129#define cuCtxDestroy cuCtxDestroy_v2
@@ -128,6 +135,7 @@ CUresult cuCtxPopCurrent (CUcontext *);
128#define cuCtxPushCurrent cuCtxPushCurrent_v2 135#define cuCtxPushCurrent cuCtxPushCurrent_v2
129CUresult cuCtxPushCurrent (CUcontext); 136CUresult cuCtxPushCurrent (CUcontext);
130CUresult cuCtxSynchronize (void); 137CUresult cuCtxSynchronize (void);
138CUresult cuCtxSetLimit (CUlimit, size_t);
131CUresult cuDeviceGet (CUdevice *, int); 139CUresult cuDeviceGet (CUdevice *, int);
132#define cuDeviceTotalMem cuDeviceTotalMem_v2 140#define cuDeviceTotalMem cuDeviceTotalMem_v2
133CUresult cuDeviceTotalMem (size_t *, CUdevice); 141CUresult cuDeviceTotalMem (size_t *, CUdevice);
@@ -143,6 +151,7 @@ CUresult cuEventRecord (CUevent, CUstream);
143CUresult cuEventSynchronize (CUevent); 151CUresult cuEventSynchronize (CUevent);
144CUresult cuFuncGetAttribute (int *, CUfunction_attribute, CUfunction); 152CUresult cuFuncGetAttribute (int *, CUfunction_attribute, CUfunction);
145CUresult cuGetErrorString (CUresult, const char **); 153CUresult cuGetErrorString (CUresult, const char **);
154CUresult cuGetErrorName (CUresult, const char **);
146CUresult cuInit (unsigned); 155CUresult cuInit (unsigned);
147CUresult cuDriverGetVersion (int *); 156CUresult cuDriverGetVersion (int *);
148CUresult cuLaunchKernel (CUfunction, unsigned, unsigned, unsigned, unsigned, 157CUresult cuLaunchKernel (CUfunction, unsigned, unsigned, unsigned, unsigned,