From 8a59e1d17a83e4744071dfa790db974c296c206e Mon Sep 17 00:00:00 2001 From: "Suren A. Chilingaryan" Date: Fri, 17 Jun 2016 21:14:09 +0200 Subject: Use undocumented event-based API --- gpudirect.h | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 gpudirect.h (limited to 'gpudirect.h') diff --git a/gpudirect.h b/gpudirect.h new file mode 100644 index 0000000..9449ff9 --- /dev/null +++ b/gpudirect.h @@ -0,0 +1,29 @@ +enum CU_STREAM_WAIT_FLAGS { + CU_STREAM_WAIT_VALUE_GEQ = 0x0, + CU_STREAM_WAIT_VALUE_EQ = 0x1, + CU_STREAM_WAIT_VALUE_AND = 0x2, + CU_STREAM_WAIT_VALUE_FLUSH = 1<<30 +}; + +enum CU_STREAM_WRITE_FLAGS { + CU_STREAM_WRITE_VALUE_NO_MEMORY_BARRIER = 0x1 +}; + +enum CU_STREAM_MEM_OP_FLAGS { + CU_STREAM_MEM_OP_WAIT_VALUE_32 = 1, + CU_STREAM_MEM_OP_WRITE_VALUE_32 = 2, + CU_STREAM_MEM_OP_FLUSH_REMOTE_WRITES = 3 +}; + +# ifdef __cplusplus +extern "C" { +# endif + +CUresult cuStreamWaitValue32(CUstream stream, CUdeviceptr addr, uint32_t value, unsigned int flags); +CUresult cuStreamWriteValue32(CUstream stream, CUdeviceptr addr, uint32_t value, unsigned int flags); +//CUresult cuStreamBatchMemOp(CUstream stream, unsigned int count, CUstreamBatchMemOpParams *paramArray, unsigned int flags); + + +# ifdef __cplusplus +} +# endif -- cgit v1.2.3