Class CUDA_EXTERNAL_MEMORY_HANDLE_DESC

  • All Implemented Interfaces:
    java.lang.AutoCloseable, NativeResource, Pointer

    public class CUDA_EXTERNAL_MEMORY_HANDLE_DESC
    extends Struct
    implements NativeResource
    External memory handle descriptor.

    Member documentation

    • type – Type of the handle
    • handle
      • handle.fd – File descriptor referencing the memory object. Valid when type is ::CU_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_FD
      • handle.win32 – Win32 handle referencing the semaphore object. Valid when type is one of the following: - ::CU_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32 - ::CU_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_KMT - ::CU_EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_HEAP - ::CU_EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_RESOURCE Exactly one of 'handle' and 'name' must be non-NULL. If type is ::CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32_KMT then 'name' must be NULL.
        • handle.win32.handle – Valid NT handle. Must be NULL if 'name' is non-NULL
        • handle.win32.name – Name of a valid memory object. Must be NULL if 'handle' is non-NULL.
    • size – Size of the memory allocation
    • flags – Flags must either be zero or ::CUDA_EXTERNAL_MEMORY_DEDICATED

    Layout

    
     struct CUDA_EXTERNAL_MEMORY_HANDLE_DESC {
         CUexternalMemoryHandleType type;
         union {
             int fd;
             struct {
                 void * handle;
                 void const * name;
             } win32;
         } handle;
         unsigned long long size;
         unsigned int flags;
         unsigned int reserved[16];
     }