Package org.lwjgl.cuda
Class CUDA_MEMCPY2D
java.lang.Object
org.lwjgl.system.Pointer.Default
org.lwjgl.system.Struct<CUDA_MEMCPY2D>
org.lwjgl.cuda.CUDA_MEMCPY2D
- All Implemented Interfaces:
AutoCloseable,org.lwjgl.system.NativeResource,org.lwjgl.system.Pointer
public class CUDA_MEMCPY2D
extends org.lwjgl.system.Struct<CUDA_MEMCPY2D>
implements org.lwjgl.system.NativeResource
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;
}-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class org.lwjgl.system.Struct
org.lwjgl.system.Struct.StructValidationNested classes/interfaces inherited from interface org.lwjgl.system.Pointer
org.lwjgl.system.Pointer.Default -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intThe struct alignment in bytes.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct size in bytes.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.Fields inherited from interface org.lwjgl.system.Pointer
BITS32, BITS64, CLONG_SHIFT, CLONG_SIZE, POINTER_SHIFT, POINTER_SIZE -
Constructor Summary
ConstructorsConstructorDescriptionCUDA_MEMCPY2D(ByteBuffer container) Creates aCUDA_MEMCPY2Dinstance at the current position of the specifiedByteBuffercontainer. -
Method Summary
Modifier and TypeMethodDescriptionstatic CUDA_MEMCPY2Dcalloc()Returns a newCUDA_MEMCPY2Dinstance allocated withmemCalloc.static CUDA_MEMCPY2D.Buffercalloc(int capacity) Returns a newCUDA_MEMCPY2D.Bufferinstance allocated withmemCalloc.static CUDA_MEMCPY2D.Buffercalloc(int capacity, org.lwjgl.system.MemoryStack stack) Returns a newCUDA_MEMCPY2D.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static CUDA_MEMCPY2Dcalloc(org.lwjgl.system.MemoryStack stack) Returns a newCUDA_MEMCPY2Dinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static CUDA_MEMCPY2DDeprecated.static CUDA_MEMCPY2D.BuffercallocStack(int capacity) Deprecated.static CUDA_MEMCPY2D.BuffercallocStack(int capacity, org.lwjgl.system.MemoryStack stack) Deprecated.static CUDA_MEMCPY2DcallocStack(org.lwjgl.system.MemoryStack stack) Deprecated.static CUDA_MEMCPY2Dcreate()Returns a newCUDA_MEMCPY2Dinstance allocated withBufferUtils.static CUDA_MEMCPY2D.Buffercreate(int capacity) Returns a newCUDA_MEMCPY2D.Bufferinstance allocated withBufferUtils.static CUDA_MEMCPY2Dcreate(long address) Returns a newCUDA_MEMCPY2Dinstance for the specified memory address.static CUDA_MEMCPY2D.Buffercreate(long address, int capacity) Create aCUDA_MEMCPY2D.Bufferinstance at the specified memory.static @Nullable CUDA_MEMCPY2DcreateSafe(long address) static @Nullable CUDA_MEMCPY2D.BuffercreateSafe(long address, int capacity) longdstArray()dstArray(long value) Sets the specified value to thedstArrayfield.longdstDevice(long value) Sets the specified value to thedstDevicefield.@Nullable ByteBufferdstHost(int capacity) dstHost(@Nullable ByteBuffer value) Sets the address of the specifiedByteBufferto thedstHostfield.intdstMemoryType(int value) Sets the specified value to thedstMemoryTypefield.longdstPitch()dstPitch(long value) Sets the specified value to thedstPitchfield.longdstXInBytes(long value) Sets the specified value to thedstXInBytesfield.longdstY()dstY(long value) Sets the specified value to thedstYfield.longHeight()Height(long value) Sets the specified value to theHeightfield.static CUDA_MEMCPY2Dmalloc()Returns a newCUDA_MEMCPY2Dinstance allocated withmemAlloc.static CUDA_MEMCPY2D.Buffermalloc(int capacity) Returns a newCUDA_MEMCPY2D.Bufferinstance allocated withmemAlloc.static CUDA_MEMCPY2D.Buffermalloc(int capacity, org.lwjgl.system.MemoryStack stack) Returns a newCUDA_MEMCPY2D.Bufferinstance allocated on the specifiedMemoryStack.static CUDA_MEMCPY2Dmalloc(org.lwjgl.system.MemoryStack stack) Returns a newCUDA_MEMCPY2Dinstance allocated on the specifiedMemoryStack.static CUDA_MEMCPY2DDeprecated.static CUDA_MEMCPY2D.BuffermallocStack(int capacity) Deprecated.static CUDA_MEMCPY2D.BuffermallocStack(int capacity, org.lwjgl.system.MemoryStack stack) Deprecated.static CUDA_MEMCPY2DmallocStack(org.lwjgl.system.MemoryStack stack) Deprecated.static longndstArray(long struct) Unsafe version ofdstArray().static voidndstArray(long struct, long value) Unsafe version ofdstArray.static longndstDevice(long struct) Unsafe version ofdstDevice().static voidndstDevice(long struct, long value) Unsafe version ofdstDevice.static @Nullable ByteBufferndstHost(long struct, int capacity) Unsafe version ofdstHost.static voidndstHost(long struct, @Nullable ByteBuffer value) Unsafe version ofdstHost.static intndstMemoryType(long struct) Unsafe version ofdstMemoryType().static voidndstMemoryType(long struct, int value) Unsafe version ofdstMemoryType.static longndstPitch(long struct) Unsafe version ofdstPitch().static voidndstPitch(long struct, long value) Unsafe version ofdstPitch.static longndstXInBytes(long struct) Unsafe version ofdstXInBytes().static voidndstXInBytes(long struct, long value) Unsafe version ofdstXInBytes.static longndstY(long struct) Unsafe version ofdstY().static voidndstY(long struct, long value) Unsafe version ofdstY.static longnHeight(long struct) Unsafe version ofHeight().static voidnHeight(long struct, long value) Unsafe version ofHeight.static longnsrcArray(long struct) Unsafe version ofsrcArray().static voidnsrcArray(long struct, long value) Unsafe version ofsrcArray.static longnsrcDevice(long struct) Unsafe version ofsrcDevice().static voidnsrcDevice(long struct, long value) Unsafe version ofsrcDevice.static @Nullable ByteBuffernsrcHost(long struct, int capacity) Unsafe version ofsrcHost.static voidnsrcHost(long struct, @Nullable ByteBuffer value) Unsafe version ofsrcHost.static intnsrcMemoryType(long struct) Unsafe version ofsrcMemoryType().static voidnsrcMemoryType(long struct, int value) Unsafe version ofsrcMemoryType.static longnsrcPitch(long struct) Unsafe version ofsrcPitch().static voidnsrcPitch(long struct, long value) Unsafe version ofsrcPitch.static longnsrcXInBytes(long struct) Unsafe version ofsrcXInBytes().static voidnsrcXInBytes(long struct, long value) Unsafe version ofsrcXInBytes.static longnsrcY(long struct) Unsafe version ofsrcY().static voidnsrcY(long struct, long value) Unsafe version ofsrcY.static longnWidthInBytes(long struct) Unsafe version ofWidthInBytes().static voidnWidthInBytes(long struct, long value) Unsafe version ofWidthInBytes.set(long srcXInBytes, long srcY, int srcMemoryType, @Nullable ByteBuffer srcHost, long srcDevice, long srcArray, long srcPitch, long dstXInBytes, long dstY, int dstMemoryType, @Nullable ByteBuffer dstHost, long dstDevice, long dstArray, long dstPitch, long WidthInBytes, long Height) Initializes this struct with the specified values.set(CUDA_MEMCPY2D src) Copies the specified struct data to this struct.intsizeof()longsrcArray()srcArray(long value) Sets the specified value to thesrcArrayfield.longsrcDevice(long value) Sets the specified value to thesrcDevicefield.@Nullable ByteBuffersrcHost(int capacity) srcHost(@Nullable ByteBuffer value) Sets the address of the specifiedByteBufferto thesrcHostfield.intsrcMemoryType(int value) Sets the specified value to thesrcMemoryTypefield.longsrcPitch()srcPitch(long value) Sets the specified value to thesrcPitchfield.longsrcXInBytes(long value) Sets the specified value to thesrcXInBytesfield.longsrcY()srcY(long value) Sets the specified value to thesrcYfield.longWidthInBytes(long value) Sets the specified value to theWidthInBytesfield.Methods inherited from class org.lwjgl.system.Struct
clear, free, isNull, validate, validateMethods inherited from class org.lwjgl.system.Pointer.Default
address, equals, hashCode, toStringMethods inherited from interface org.lwjgl.system.NativeResource
close, free
-
Field Details
-
SIZEOF
public static final int SIZEOFThe struct size in bytes. -
ALIGNOF
public static final int ALIGNOFThe struct alignment in bytes. -
SRCXINBYTES
public static final int SRCXINBYTESThe struct member offsets. -
SRCY
public static final int SRCYThe struct member offsets. -
SRCMEMORYTYPE
public static final int SRCMEMORYTYPEThe struct member offsets. -
SRCHOST
public static final int SRCHOSTThe struct member offsets. -
SRCDEVICE
public static final int SRCDEVICEThe struct member offsets. -
SRCARRAY
public static final int SRCARRAYThe struct member offsets. -
SRCPITCH
public static final int SRCPITCHThe struct member offsets. -
DSTXINBYTES
public static final int DSTXINBYTESThe struct member offsets. -
DSTY
public static final int DSTYThe struct member offsets. -
DSTMEMORYTYPE
public static final int DSTMEMORYTYPEThe struct member offsets. -
DSTHOST
public static final int DSTHOSTThe struct member offsets. -
DSTDEVICE
public static final int DSTDEVICEThe struct member offsets. -
DSTARRAY
public static final int DSTARRAYThe struct member offsets. -
DSTPITCH
public static final int DSTPITCHThe struct member offsets. -
WIDTHINBYTES
public static final int WIDTHINBYTESThe struct member offsets. -
HEIGHT
public static final int HEIGHTThe struct member offsets.
-
-
Constructor Details
-
CUDA_MEMCPY2D
Creates aCUDA_MEMCPY2Dinstance at the current position of the specifiedByteBuffercontainer. Changes to the buffer's content will be visible to the struct instance and vice versa.The created instance holds a strong reference to the container object.
-
-
Method Details
-
sizeof
public int sizeof()- Specified by:
sizeofin classorg.lwjgl.system.Struct<CUDA_MEMCPY2D>
-
srcXInBytes
public long srcXInBytes()- Returns:
- the value of the
srcXInBytesfield.
-
srcY
public long srcY()- Returns:
- the value of the
srcYfield.
-
srcMemoryType
public int srcMemoryType()- Returns:
- the value of the
srcMemoryTypefield.
-
srcHost
- Parameters:
capacity- the number of elements in the returned buffer- Returns:
- a
ByteBufferview of the data pointed to by thesrcHostfield.
-
srcDevice
public long srcDevice()- Returns:
- the value of the
srcDevicefield.
-
srcArray
public long srcArray()- Returns:
- the value of the
srcArrayfield.
-
srcPitch
public long srcPitch()- Returns:
- the value of the
srcPitchfield.
-
dstXInBytes
public long dstXInBytes()- Returns:
- the value of the
dstXInBytesfield.
-
dstY
public long dstY()- Returns:
- the value of the
dstYfield.
-
dstMemoryType
public int dstMemoryType()- Returns:
- the value of the
dstMemoryTypefield.
-
dstHost
- Parameters:
capacity- the number of elements in the returned buffer- Returns:
- a
ByteBufferview of the data pointed to by thedstHostfield.
-
dstDevice
public long dstDevice()- Returns:
- the value of the
dstDevicefield.
-
dstArray
public long dstArray()- Returns:
- the value of the
dstArrayfield.
-
dstPitch
public long dstPitch()- Returns:
- the value of the
dstPitchfield.
-
WidthInBytes
public long WidthInBytes()- Returns:
- the value of the
WidthInBytesfield.
-
Height
public long Height()- Returns:
- the value of the
Heightfield.
-
srcXInBytes
Sets the specified value to thesrcXInBytesfield. -
srcY
Sets the specified value to thesrcYfield. -
srcMemoryType
Sets the specified value to thesrcMemoryTypefield. -
srcHost
Sets the address of the specifiedByteBufferto thesrcHostfield. -
srcDevice
Sets the specified value to thesrcDevicefield. -
srcArray
Sets the specified value to thesrcArrayfield. -
srcPitch
Sets the specified value to thesrcPitchfield. -
dstXInBytes
Sets the specified value to thedstXInBytesfield. -
dstY
Sets the specified value to thedstYfield. -
dstMemoryType
Sets the specified value to thedstMemoryTypefield. -
dstHost
Sets the address of the specifiedByteBufferto thedstHostfield. -
dstDevice
Sets the specified value to thedstDevicefield. -
dstArray
Sets the specified value to thedstArrayfield. -
dstPitch
Sets the specified value to thedstPitchfield. -
WidthInBytes
Sets the specified value to theWidthInBytesfield. -
Height
Sets the specified value to theHeightfield. -
set
public CUDA_MEMCPY2D set(long srcXInBytes, long srcY, int srcMemoryType, @Nullable ByteBuffer srcHost, long srcDevice, long srcArray, long srcPitch, long dstXInBytes, long dstY, int dstMemoryType, @Nullable ByteBuffer dstHost, long dstDevice, long dstArray, long dstPitch, long WidthInBytes, long Height) Initializes this struct with the specified values. -
set
Copies the specified struct data to this struct.- Parameters:
src- the source struct- Returns:
- this struct
-
malloc
Returns a newCUDA_MEMCPY2Dinstance allocated withmemAlloc. The instance must be explicitly freed. -
calloc
Returns a newCUDA_MEMCPY2Dinstance allocated withmemCalloc. The instance must be explicitly freed. -
create
Returns a newCUDA_MEMCPY2Dinstance allocated withBufferUtils. -
create
Returns a newCUDA_MEMCPY2Dinstance for the specified memory address. -
createSafe
-
malloc
Returns a newCUDA_MEMCPY2D.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
Returns a newCUDA_MEMCPY2D.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
Returns a newCUDA_MEMCPY2D.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
Create aCUDA_MEMCPY2D.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
createSafe
-
mallocStack
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(MemoryStack)instead. -
callocStack
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(MemoryStack)instead. -
mallocStack
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(MemoryStack)instead. -
callocStack
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(MemoryStack)instead. -
mallocStack
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(int, MemoryStack)instead. -
callocStack
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(int, MemoryStack)instead. -
mallocStack
@Deprecated public static CUDA_MEMCPY2D.Buffer mallocStack(int capacity, org.lwjgl.system.MemoryStack stack) Deprecated.Deprecated for removal in 3.4.0. Usemalloc(int, MemoryStack)instead. -
callocStack
@Deprecated public static CUDA_MEMCPY2D.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack) Deprecated.Deprecated for removal in 3.4.0. Usecalloc(int, MemoryStack)instead. -
malloc
Returns a newCUDA_MEMCPY2Dinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
calloc
Returns a newCUDA_MEMCPY2Dinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocate
-
malloc
Returns a newCUDA_MEMCPY2D.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
capacity- the buffer capacitystack- the stack from which to allocate
-
calloc
Returns a newCUDA_MEMCPY2D.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
capacity- the buffer capacitystack- the stack from which to allocate
-
nsrcXInBytes
public static long nsrcXInBytes(long struct) Unsafe version ofsrcXInBytes(). -
nsrcY
public static long nsrcY(long struct) Unsafe version ofsrcY(). -
nsrcMemoryType
public static int nsrcMemoryType(long struct) Unsafe version ofsrcMemoryType(). -
nsrcHost
Unsafe version ofsrcHost. -
nsrcDevice
public static long nsrcDevice(long struct) Unsafe version ofsrcDevice(). -
nsrcArray
public static long nsrcArray(long struct) Unsafe version ofsrcArray(). -
nsrcPitch
public static long nsrcPitch(long struct) Unsafe version ofsrcPitch(). -
ndstXInBytes
public static long ndstXInBytes(long struct) Unsafe version ofdstXInBytes(). -
ndstY
public static long ndstY(long struct) Unsafe version ofdstY(). -
ndstMemoryType
public static int ndstMemoryType(long struct) Unsafe version ofdstMemoryType(). -
ndstHost
Unsafe version ofdstHost. -
ndstDevice
public static long ndstDevice(long struct) Unsafe version ofdstDevice(). -
ndstArray
public static long ndstArray(long struct) Unsafe version ofdstArray(). -
ndstPitch
public static long ndstPitch(long struct) Unsafe version ofdstPitch(). -
nWidthInBytes
public static long nWidthInBytes(long struct) Unsafe version ofWidthInBytes(). -
nHeight
public static long nHeight(long struct) Unsafe version ofHeight(). -
nsrcXInBytes
public static void nsrcXInBytes(long struct, long value) Unsafe version ofsrcXInBytes. -
nsrcY
public static void nsrcY(long struct, long value) Unsafe version ofsrcY. -
nsrcMemoryType
public static void nsrcMemoryType(long struct, int value) Unsafe version ofsrcMemoryType. -
nsrcHost
Unsafe version ofsrcHost. -
nsrcDevice
public static void nsrcDevice(long struct, long value) Unsafe version ofsrcDevice. -
nsrcArray
public static void nsrcArray(long struct, long value) Unsafe version ofsrcArray. -
nsrcPitch
public static void nsrcPitch(long struct, long value) Unsafe version ofsrcPitch. -
ndstXInBytes
public static void ndstXInBytes(long struct, long value) Unsafe version ofdstXInBytes. -
ndstY
public static void ndstY(long struct, long value) Unsafe version ofdstY. -
ndstMemoryType
public static void ndstMemoryType(long struct, int value) Unsafe version ofdstMemoryType. -
ndstHost
Unsafe version ofdstHost. -
ndstDevice
public static void ndstDevice(long struct, long value) Unsafe version ofdstDevice. -
ndstArray
public static void ndstArray(long struct, long value) Unsafe version ofdstArray. -
ndstPitch
public static void ndstPitch(long struct, long value) Unsafe version ofdstPitch. -
nWidthInBytes
public static void nWidthInBytes(long struct, long value) Unsafe version ofWidthInBytes. -
nHeight
public static void nHeight(long struct, long value) Unsafe version ofHeight.
-