From the CUDA driver API documentation:
enum CUmemAllocationHandleType
Flags for specifying particular handle types Values CU_MEM_HANDLE_TYPE_NONE = 0x0 Does not allow any export mechanism. CU_MEM_HANDLE_TYPE_POSIX_FILE_DESCRIPTOR = 0x1 Allows a file descriptor to be used for exporting. Permitted only on POSIX systems. (int) CU_MEM_HANDLE_TYPE_WIN32 = 0x2 Allows a Win32 NT handle to be used for exporting. (HANDLE) CU_MEM_HANDLE_TYPE_WIN32_KMT = 0x4 Allows a Win32 KMT handle to be used for exporting. (D3DKMT_HANDLE) CU_MEM_HANDLE_TYPE_MAX = 0x7FFFFFFF
What is the HANDLE
type? i.e. what is its definition? And - can I define it manually, or must I include some Windows header for it?
Well, an answer to this question:
What is a Windows Handle?
suggests that:
may be a valid thing to do. I'm not sure that's the case, but will give it a try.