Top Description Interfaces Classes
module lwjgl.cuda

Package org.lwjgl.cuda

Annotations
@NonnullDefault

Contains bindings to CUDA.

UNSTABLE API

Until these bindings are sufficiently tested, this API should be considered unstable. Also, bindings to more (and eventually, all) CUDA Toolkit libraries will be added in the near future.

Interface Summary

Modifier and TypeInterface and Description
public interface
CUhostFnI

Type


void (*invoke) (
    void *userData
)
public interface
CUoccupancyB2DSizeI

Type


size_t (*invoke) (
    int blockSize
)
public interface
CUstreamCallbackI

Type


void (*invoke) (
    CUstream hStream,
    CUresult status,
    void *userData
)

Class Summary

Modifier and TypeClass and Description
public class
CU

Contains bindings to the CUDA Driver API.

public class
CUaccessPolicyWindow

Layout


struct CUaccessPolicyWindow {
    void * base_ptr;
    size_t num_bytes;
    float hitRatio;
    CUaccessProperty hitProp;
    CUaccessProperty missProp;
}
public class
CUarrayMapInfo

Layout


struct CUarrayMapInfo {
    CUresourcetype resourceType;
    union {
        CUmipmappedArray mipmap;
        CUarray array;
    } resource;
    CUarraySparseSubresourceType subresourceType;
    union {
        struct {
            unsigned int level;
            unsigned int layer;
            unsigned int offsetX;
            unsigned int offsetY;
            unsigned int offsetZ;
            unsigned int extentWidth;
            unsigned int extentHeight;
            unsigned int extentDepth;
        } sparseLevel;
        struct {
            unsigned int layer;
            unsigned long long offset;
            unsigned long long size;
        } miptail;
    } subresource;
    CUmemOperationType memOperationType;
    CUmemHandleType memHandleType;
    union {
        CUmemGenericAllocationHandle memHandle;
    } memHandle;
    unsigned long long offset;
    unsigned int deviceBitMask;
    unsigned int flags;
    unsigned int reserved[2];
}
public class
CUDA

CUDA utilities.

public class
CUDA_ARRAY3D_DESCRIPTOR

Layout


struct CUDA_ARRAY3D_DESCRIPTOR {
    size_t Width;
    size_t Height;
    size_t Depth;
    CUarray_format Format;
    unsigned int NumChannels;
    unsigned int Flags;
}
public class
CUDA_ARRAY_DESCRIPTOR

Layout


struct CUDA_ARRAY_DESCRIPTOR {
    size_t Width;
    size_t Height;
    CUarray_format Format;
    unsigned int NumChannels;
}
public class
CUDA_ARRAY_MEMORY_REQUIREMENTS

Layout


struct CUDA_ARRAY_MEMORY_REQUIREMENTS {
    size_t size;
    size_t alignment;
    unsigned int reserved[4];
}
public class
CUDA_ARRAY_SPARSE_PROPERTIES

Layout


struct CUDA_ARRAY_SPARSE_PROPERTIES {
    struct {
        unsigned int width;
        unsigned int height;
        unsigned int depth;
    } tileExtent;
    unsigned int miptailFirstLevel;
    unsigned long long miptailSize;
    unsigned int flags;
    unsigned int reserved[4];
}
public class
CUDA_BATCH_MEM_OP_NODE_PARAMS

Layout


struct CUDA_BATCH_MEM_OP_NODE_PARAMS {
    CUcontext ctx;
    unsigned int count;
    CUstreamBatchMemOpParams * paramArray;
    unsigned int flags;
}
public class
CUDA_EXT_SEM_SIGNAL_NODE_PARAMS

Layout


struct CUDA_EXT_SEM_SIGNAL_NODE_PARAMS {
    CUexternalSemaphore * extSemArray;
    CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS const * paramsArray;
    unsigned int numExtSems;
}
public class
CUDA_EXT_SEM_WAIT_NODE_PARAMS

Layout


struct CUDA_EXT_SEM_WAIT_NODE_PARAMS {
    CUexternalSemaphore * extSemArray;
    CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS const * paramsArray;
    unsigned int numExtSems;
}
public class
CUDA_EXTERNAL_MEMORY_BUFFER_DESC

Layout


struct CUDA_EXTERNAL_MEMORY_BUFFER_DESC {
    unsigned long long offset;
    unsigned long long size;
    unsigned int flags;
    unsigned int reserved[16];
}
public class
CUDA_EXTERNAL_MEMORY_HANDLE_DESC

Layout


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

Layout


struct CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC {
    unsigned long long offset;
    CUDA_ARRAY3D_DESCRIPTOR arrayDesc;
    unsigned int numLevels;
    unsigned int reserved[16];
}
public class
CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC

Layout


struct CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC {
    CUexternalSemaphoreHandleType type;
    union {
        int fd;
        struct {
            void * handle;
            void const * name;
        } win32;
        void const * nvSciSyncObj;
    } handle;
    unsigned int flags;
    unsigned int reserved[16];
}
public class
CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS

Layout


struct CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS {
    struct {
        struct {
            unsigned long long value;
        } fence;
        union {
            void * fence;
            unsigned long long reserved;
        } nvSciSync;
        struct {
            unsigned long long key;
        } keyedMutex;
        unsigned int reserved[12];
    } params;
    unsigned int flags;
    unsigned int reserved[16];
}
public class
CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS

Layout


struct CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS {
    struct {
        struct {
            unsigned long long value;
        } fence;
        union {
            void * fence;
            unsigned long long reserved;
        } nvSciSync;
        struct {
            unsigned long long key;
            unsigned int timeoutMs;
        } keyedMutex;
        unsigned int reserved[10];
    } params;
    unsigned int flags;
    unsigned int reserved[16];
}
public class
CUDA_GRAPH_INSTANTIATE_PARAMS

Layout


struct CUDA_GRAPH_INSTANTIATE_PARAMS {
    cuuint64_t flags;
    CUstream hUploadStream;
    CUgraphNode hErrNode_out;
    CUgraphInstantiateResult result_out;
}
public class
CUDA_HOST_NODE_PARAMS

Layout


struct CUDA_HOST_NODE_PARAMS {
    void (*fn) (void *userData);
    void * userData;
}
public class
CUDA_KERNEL_NODE_PARAMS

Layout


struct CUDA_KERNEL_NODE_PARAMS {
    CUfunction func;
    unsigned int gridDimX;
    unsigned int gridDimY;
    unsigned int gridDimZ;
    unsigned int blockDimX;
    unsigned int blockDimY;
    unsigned int blockDimZ;
    unsigned int sharedMemBytes;
    void ** kernelParams;
    void ** extra;
}
public class
CUDA_KERNEL_NODE_PARAMS_v2

Layout


struct CUDA_KERNEL_NODE_PARAMS_v2 {
    CUfunction func;
    unsigned int gridDimX;
    unsigned int gridDimY;
    unsigned int gridDimZ;
    unsigned int blockDimX;
    unsigned int blockDimY;
    unsigned int blockDimZ;
    unsigned int sharedMemBytes;
    void ** kernelParams;
    void ** extra;
    CUkernel kern;
    CUcontext ctx;
}
public class
CUDA_LAUNCH_PARAMS

Layout


struct CUDA_LAUNCH_PARAMS {
    CUfunction function;
    unsigned int gridDimX;
    unsigned int gridDimY;
    unsigned int gridDimZ;
    unsigned int blockDimX;
    unsigned int blockDimY;
    unsigned int blockDimZ;
    unsigned int sharedMemBytes;
    CUstream hStream;
    void ** kernelParams;
}
public class
CUDA_MEM_ALLOC_NODE_PARAMS

Layout


struct CUDA_MEM_ALLOC_NODE_PARAMS {
    CUmemPoolProps poolProps;
    CUmemAccessDesc const * accessDescs;
    size_t accessDescCount;
    size_t bytesize;
    CUdeviceptr dptr;
}
public class
CUDA_MEMCPY2D

Layout


struct CUDA_MEMCPY2D {
    size_t srcXInBytes;
    size_t srcY;
    CUmemorytype srcMemoryType;
    void const * srcHost;
    CUdeviceptr srcDevice;
    CUarray srcArray;
    size_t srcPitch;
    size_t dstXInBytes;
    size_t dstY;
    CUmemorytype dstMemoryType;
    void * dstHost;
    CUdeviceptr dstDevice;
    CUarray dstArray;
    size_t dstPitch;
    size_t WidthInBytes;
    size_t Height;
}
public class
CUDA_MEMCPY3D

Layout


struct CUDA_MEMCPY3D {
    size_t srcXInBytes;
    size_t srcY;
    size_t srcZ;
    size_t srcLOD;
    CUmemorytype srcMemoryType;
    void const * srcHost;
    CUdeviceptr srcDevice;
    CUarray srcArray;
    void * reserved0;
    size_t srcPitch;
    size_t srcHeight;
    size_t dstXInBytes;
    size_t dstY;
    size_t dstZ;
    size_t dstLOD;
    CUmemorytype dstMemoryType;
    void * dstHost;
    CUdeviceptr dstDevice;
    CUarray dstArray;
    void * reserved1;
    size_t dstPitch;
    size_t dstHeight;
    size_t WidthInBytes;
    size_t Height;
    size_t Depth;
}
public class
CUDA_MEMCPY3D_PEER

Layout


struct CUDA_MEMCPY3D_PEER {
    size_t srcXInBytes;
    size_t srcY;
    size_t srcZ;
    size_t srcLOD;
    CUmemorytype srcMemoryType;
    void const * srcHost;
    CUdeviceptr srcDevice;
    CUarray srcArray;
    CUcontext srcContext;
    size_t srcPitch;
    size_t srcHeight;
    size_t dstXInBytes;
    size_t dstY;
    size_t dstZ;
    size_t dstLOD;
    CUmemorytype dstMemoryType;
    void * dstHost;
    CUdeviceptr dstDevice;
    CUarray dstArray;
    CUcontext dstContext;
    size_t dstPitch;
    size_t dstHeight;
    size_t WidthInBytes;
    size_t Height;
    size_t Depth;
}
public class
CUDA_MEMSET_NODE_PARAMS

Layout


struct CUDA_MEMSET_NODE_PARAMS {
    CUdeviceptr dst;
    size_t pitch;
    unsigned int value;
    unsigned int elementSize;
    size_t width;
    size_t height;
}
public class
CUDA_POINTER_ATTRIBUTE_P2P_TOKENS

Layout


struct CUDA_POINTER_ATTRIBUTE_P2P_TOKENS {
    unsigned long long p2pToken;
    unsigned int vaSpaceToken;
}
public class
CUDA_RESOURCE_DESC

Layout


struct CUDA_RESOURCE_DESC {
    CUresourcetype resType;
    union {
        struct {
            CUarray hArray;
        } array;
        struct {
            CUmipmappedArray hMipmappedArray;
        } mipmap;
        struct {
            CUdeviceptr devPtr;
            CUarray_format format;
            unsigned int numChannels;
            size_t sizeInBytes;
        } linear;
        struct {
            CUdeviceptr devPtr;
            CUarray_format format;
            unsigned int numChannels;
            size_t width;
            size_t height;
            size_t pitchInBytes;
        } pitch2D;
        struct {
            int reserved[32];
        } reserved;
    } res;
    unsigned int flags;
}
public class
CUDA_RESOURCE_VIEW_DESC

Layout


struct CUDA_RESOURCE_VIEW_DESC {
    CUresourceViewFormat format;
    size_t width;
    size_t height;
    size_t depth;
    unsigned int firstMipmapLevel;
    unsigned int lastMipmapLevel;
    unsigned int firstLayer;
    unsigned int lastLayer;
    unsigned int reserved[16];
}
public class
CUDA_TEXTURE_DESC

Layout


struct CUDA_TEXTURE_DESC {
    CUaddress_mode addressMode[3];
    CUfilter_mode filterMode;
    unsigned int flags;
    unsigned int maxAnisotropy;
    CUfilter_mode mipmapFilterMode;
    float mipmapLevelBias;
    float minMipmapLevelClamp;
    float maxMipmapLevelClamp;
    float borderColor[4];
    int reserved[12];
}
public class
CUDAProfiler

Contains bindings to CUDA profiler control functions of the low-level CUDA driver API.

public class
CUdevprop

Layout


struct CUdevprop {
    int maxThreadsPerBlock;
    int maxThreadsDim[3];
    int maxGridSize[3];
    int sharedMemPerBlock;
    int totalConstantMemory;
    int SIMDWidth;
    int memPitch;
    int regsPerBlock;
    int clockRate;
    int textureAlign;
}
public class
CUexecAffinityParam

Layout


struct CUexecAffinityParam {
    CUexecAffinityType type;
    union {
        CUexecAffinitySmCount smCount;
    } param;
}
public class
CUexecAffinitySmCount

Layout


struct CUexecAffinitySmCount {
    unsigned int val;
}
public class
public class
CUgraphExecUpdateResultInfo

Layout


struct CUgraphExecUpdateResultInfo {
    CUgraphExecUpdateResult result;
    CUgraphNode errorNode;
    CUgraphNode errorFromNode;
}
public abstract class
CUhostFn

Type


void (*invoke) (
    void *userData
)
public class
CUIPCEventHandle

Layout


struct CUipcEventHandle {
    char reserved[CU_IPC_HANDLE_SIZE];
}
public class
CUIPCMemHandle

Layout


struct CUipcMemHandle {
    char reserved[CU_IPC_HANDLE_SIZE];
}
public class
CUkernelNodeAttrValue

Layout


union CUkernelNodeAttrValue {
    CUaccessPolicyWindow accessPolicyWindow;
    int cooperative;
}
public class
CUlaunchAttribute

Layout


struct CUlaunchAttribute {
    CUlaunchAttributeID id;
    char pad[4];
    CUlaunchAttributeValue value;
}
public class
CUlaunchAttributeValue

Layout


union CUlaunchAttributeValue {
    char pad[64];
    CUaccessPolicyWindow accessPolicyWindow;
    int cooperative;
    CUsynchronizationPolicy syncPolicy;
    struct {
        unsigned int x;
        unsigned int y;
        unsigned int z;
    } clusterDim;
    CUclusterSchedulingPolicy clusterSchedulingPolicyPreference;
    int programmaticStreamSerializationAllowed;
    struct {
        CUevent event;
        int flags;
        int triggerAtBlockStart;
    } programmaticEvent;
    int priority;
    CUlaunchMemSyncDomainMap memSyncDomainMap;
    CUlaunchMemSyncDomain memSyncDomain;
}
public class
CUlaunchConfig

Layout


struct CUlaunchConfig {
    unsigned int gridDimX;
    unsigned int gridDimY;
    unsigned int gridDimZ;
    unsigned int blockDimX;
    unsigned int blockDimY;
    unsigned int blockDimZ;
    unsigned int sharedMemBytes;
    CUstream hStream;
    CUlaunchAttribute * attrs;
    unsigned int numAttrs;
}
public class
CUlaunchMemSyncDomainMap

Layout


struct CUlaunchMemSyncDomainMap {
    unsigned char default_;
    unsigned char remote;
}
public class
CUmemAccessDesc

Layout


struct CUmemAccessDesc {
    CUmemLocation location;
    CUmemAccess_flags flags;
}
public class
CUmemAllocationProp

Layout


struct CUmemAllocationProp {
    CUmemAllocationType type;
    CUmemAllocationHandleType requestedHandleTypes;
    CUmemLocation location;
    void * win32HandleMetaData;
    struct {
        unsigned char compressionType;
        unsigned char gpuDirectRDMACapable;
        unsigned short usage;
        unsigned char reserved[4];
    } allocFlags;
}
public class
CUmemLocation

Layout


struct CUmemLocation {
    CUmemLocationType type;
    int id;
}
public class
CUmemPoolProps

Layout


struct CUmemPoolProps {
    CUmemAllocationType allocType;
    CUmemAllocationHandleType handleTypes;
    CUmemLocation location;
    void * win32SecurityAttributes;
    unsigned char reserved[64];
}
public class
CUmemPoolPtrExportData

Layout


struct CUmemPoolPtrExportData {
    unsigned char reserved[64];
}
public class
CUmulticastObjectProp

Layout


struct CUmulticastObjectProp {
    unsigned int numDevices;
    size_t size;
    unsigned long long handleTypes;
    unsigned long long flags;
}
public abstract class
CUoccupancyB2DSize

Type


size_t (*invoke) (
    int blockSize
)
public class
CUstreamAttrValue

Layout


union CUstreamAttrValue {
    CUaccessPolicyWindow accessPolicyWindow;
    CUsynchronizationPolicy syncPolicy;
}
public class
CUstreamBatchMemOpParams

Layout


union CUstreamBatchMemOpParams {
    CUstreamBatchMemOpType operation;
    struct {
        CUstreamBatchMemOpType operation;
        CUdeviceptr address;
        union {
            cuuint32_t value;
            cuuint64_t value64;
        };
        unsigned int flags;
        CUdeviceptr alias;
    } waitValue;
    struct {
        CUstreamBatchMemOpType operation;
        CUdeviceptr address;
        union {
            cuuint32_t value;
            cuuint64_t value64;
        };
        unsigned int flags;
        CUdeviceptr alias;
    } writeValue;
    struct {
        CUstreamBatchMemOpType operation;
        unsigned int flags;
    } flushRemoteWrites;
    struct {
        CUstreamBatchMemOpType operation;
        unsigned int flags;
    } memoryBarrier;
    cuuint64_t pad[6];
}
public abstract class
CUstreamCallback

Type


void (*invoke) (
    CUstream hStream,
    CUresult status,
    void *userData
)
public class
CUtensorMap

Layout


struct CUtensorMap {
    cuuint64_t opaque[CU_TENSOR_MAP_NUM_QWORDS];
}
public class
CUuuid

Layout


struct CUuuid {
    char bytes[16];
}
public class
public class
NVRTC

Contains bindings to NVRTC, a runtime compilation library for CUDA C++.