Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Sharybin <sergey.vfx@gmail.com>2015-12-31 14:02:24 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2015-12-31 14:02:24 +0300
commit6046a8652273f336c44f63d22a8ec74ad5214832 (patch)
treed566f8c95081187a139a961928d353499848129d /extern/cuew/include
parent0b4abd08b3e820e185313ccf741d31947198de91 (diff)
Update CUDA wrangler to latest upstream
Brings support of NVRTC bindings and also makes it easier to tweak libraries paths and use multiple alternative names for libraries.
Diffstat (limited to 'extern/cuew/include')
-rw-r--r--extern/cuew/include/cuew.h34
1 files changed, 33 insertions, 1 deletions
diff --git a/extern/cuew/include/cuew.h b/extern/cuew/include/cuew.h
index 1b12e5b4463..47b19b4b3a5 100644
--- a/extern/cuew/include/cuew.h
+++ b/extern/cuew/include/cuew.h
@@ -51,7 +51,6 @@ extern "C" {
#define CU_LAUNCH_PARAM_BUFFER_POINTER ((void*)0x01)
#define CU_LAUNCH_PARAM_BUFFER_SIZE ((void*)0x02)
#define CU_PARAM_TR_DEFAULT -1
-#define CUDAGL_H
/* Functions which changed 3.1 -> 3.2 for 64 bit stuff,
* the cuda library has both the old ones for compatibility and new
@@ -728,6 +727,19 @@ typedef enum CUGLmap_flags_enum {
CU_GL_MAP_RESOURCE_FLAGS_WRITE_DISCARD = 0x02,
} CUGLmap_flags;
+typedef enum {
+ NVRTC_SUCCESS = 0,
+ NVRTC_ERROR_OUT_OF_MEMORY = 1,
+ NVRTC_ERROR_PROGRAM_CREATION_FAILURE = 2,
+ NVRTC_ERROR_INVALID_INPUT = 3,
+ NVRTC_ERROR_INVALID_PROGRAM = 4,
+ NVRTC_ERROR_INVALID_OPTION = 5,
+ NVRTC_ERROR_COMPILATION = 6,
+ NVRTC_ERROR_BUILTIN_OPERATION_FAILURE = 7,
+} nvrtcResult;
+
+typedef struct _nvrtcProgram* nvrtcProgram;
+
#ifdef _WIN32
# define CUDAAPI __stdcall
# define CUDA_CB __stdcall
@@ -947,6 +959,16 @@ typedef CUresult CUDAAPI tcuGLSetBufferObjectMapFlags(GLuint buffer, unsigned Fl
typedef CUresult CUDAAPI tcuGLMapBufferObjectAsync_v2(CUdeviceptr* dptr, size_t* size, GLuint buffer, CUstream hStream);
typedef CUresult CUDAAPI tcuGLUnmapBufferObjectAsync(GLuint buffer, CUstream hStream);
+typedef const char* CUDAAPI tnvrtcGetErrorString(nvrtcResult result);
+typedef nvrtcResult CUDAAPI tnvrtcVersion(int* major, int* minor);
+typedef nvrtcResult CUDAAPI tnvrtcCreateProgram(nvrtcProgram* prog, const char* src, const char* name, int numHeaders, const char* headers, const char* includeNames);
+typedef nvrtcResult CUDAAPI tnvrtcDestroyProgram(nvrtcProgram* prog);
+typedef nvrtcResult CUDAAPI tnvrtcCompileProgram(nvrtcProgram prog, int numOptions, const char* options);
+typedef nvrtcResult CUDAAPI tnvrtcGetPTXSize(nvrtcProgram prog, size_t* ptxSizeRet);
+typedef nvrtcResult CUDAAPI tnvrtcGetPTX(nvrtcProgram prog, char* ptx);
+typedef nvrtcResult CUDAAPI tnvrtcGetProgramLogSize(nvrtcProgram prog, size_t* logSizeRet);
+typedef nvrtcResult CUDAAPI tnvrtcGetProgramLog(nvrtcProgram prog, char* log);
+
/* Function declarations. */
extern tcuGetErrorString *cuGetErrorString;
@@ -1159,6 +1181,16 @@ extern tcuGLSetBufferObjectMapFlags *cuGLSetBufferObjectMapFlags;
extern tcuGLMapBufferObjectAsync_v2 *cuGLMapBufferObjectAsync_v2;
extern tcuGLUnmapBufferObjectAsync *cuGLUnmapBufferObjectAsync;
+extern tnvrtcGetErrorString *nvrtcGetErrorString;
+extern tnvrtcVersion *nvrtcVersion;
+extern tnvrtcCreateProgram *nvrtcCreateProgram;
+extern tnvrtcDestroyProgram *nvrtcDestroyProgram;
+extern tnvrtcCompileProgram *nvrtcCompileProgram;
+extern tnvrtcGetPTXSize *nvrtcGetPTXSize;
+extern tnvrtcGetPTX *nvrtcGetPTX;
+extern tnvrtcGetProgramLogSize *nvrtcGetProgramLogSize;
+extern tnvrtcGetProgramLog *nvrtcGetProgramLog;
+
enum {
CUEW_SUCCESS = 0,