Package org.lwjgl.cuda
Class CUDA_MEMCPY2D
- java.lang.Object
-
- org.lwjgl.system.Pointer.Default
-
- org.lwjgl.system.Struct
-
- org.lwjgl.cuda.CUDA_MEMCPY2D
-
- All Implemented Interfaces:
java.lang.AutoCloseable,org.lwjgl.system.NativeResource,org.lwjgl.system.Pointer
public class CUDA_MEMCPY2D extends org.lwjgl.system.Struct implements org.lwjgl.system.NativeResource2D memory copy parameters.Layout
struct CUDA_MEMCPY2D { size_tsrcXInBytes(); size_tsrcY(); CUmemorytypesrcMemoryType(); void const *srcHost(int); CUdeviceptrsrcDevice(); CUarraysrcArray(); size_tsrcPitch(); size_tdstXInBytes(); size_tdstY(); CUmemorytypedstMemoryType(); void *dstHost(int); CUdeviceptrdstDevice(); CUarraydstArray(); size_tdstPitch(); size_tWidthInBytes(); size_tHeight(); }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classCUDA_MEMCPY2D.BufferAn array ofCUDA_MEMCPY2Dstructs.
-
Field Summary
Fields Modifier and Type Field Description static intALIGNOFThe struct alignment in bytes.static intDSTARRAY
DSTDEVICE
DSTHOST
DSTMEMORYTYPE
DSTPITCH
DSTXINBYTES
DSTY
HEIGHTThe struct member offsets.static intSIZEOFThe struct size in bytes.static intSRCARRAY
SRCDEVICE
SRCHOST
SRCMEMORYTYPE
SRCPITCH
SRCXINBYTES
SRCY
WIDTHINBYTESThe struct member offsets.
-
Constructor Summary
Constructors Constructor Description CUDA_MEMCPY2D(java.nio.ByteBuffer container)Creates aCUDA_MEMCPY2Dinstance at the current position of the specifiedByteBuffercontainer.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static 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_MEMCPY2DcallocStack()Deprecated.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 CUDA_MEMCPY2DcreateSafe(long address)static CUDA_MEMCPY2D.BuffercreateSafe(long address, int capacity)longdstArray()Destination array referenceCUDA_MEMCPY2DdstArray(long value)Sets the specified value to thedstArray()field.longdstDevice()Destination device pointerCUDA_MEMCPY2DdstDevice(long value)Sets the specified value to thedstDevice()field.java.nio.ByteBufferdstHost(int capacity)CUDA_MEMCPY2DdstHost(java.nio.ByteBuffer value)Sets the address of the specifiedByteBufferto thedstHost(int)field.intdstMemoryType()Destination memory type (host, device, array)CUDA_MEMCPY2DdstMemoryType(int value)Sets the specified value to thedstMemoryType()field.longdstPitch()Destination pitch (ignored when dst is array)CUDA_MEMCPY2DdstPitch(long value)Sets the specified value to thedstPitch()field.longdstXInBytes()Destination X in bytesCUDA_MEMCPY2DdstXInBytes(long value)Sets the specified value to thedstXInBytes()field.longdstY()Destination YCUDA_MEMCPY2DdstY(long value)Sets the specified value to thedstY()field.longHeight()Height of 2D memory copyCUDA_MEMCPY2DHeight(long value)Sets the specified value to theHeight()field.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_MEMCPY2DmallocStack()Deprecated.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 java.nio.ByteBufferndstHost(long struct, int capacity)Unsafe version ofdstHost.static voidndstHost(long struct, java.nio.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 java.nio.ByteBuffernsrcHost(long struct, int capacity)Unsafe version ofsrcHost.static voidnsrcHost(long struct, java.nio.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.CUDA_MEMCPY2Dset(long srcXInBytes, long srcY, int srcMemoryType, java.nio.ByteBuffer srcHost, long srcDevice, long srcArray, long srcPitch, long dstXInBytes, long dstY, int dstMemoryType, java.nio.ByteBuffer dstHost, long dstDevice, long dstArray, long dstPitch, long WidthInBytes, long Height)Initializes this struct with the specified values.CUDA_MEMCPY2Dset(CUDA_MEMCPY2D src)Copies the specified struct data to this struct.intsizeof()longsrcArray()Source array referenceCUDA_MEMCPY2DsrcArray(long value)Sets the specified value to thesrcArray()field.longsrcDevice()Source device pointerCUDA_MEMCPY2DsrcDevice(long value)Sets the specified value to thesrcDevice()field.java.nio.ByteBuffersrcHost(int capacity)CUDA_MEMCPY2DsrcHost(java.nio.ByteBuffer value)Sets the address of the specifiedByteBufferto thesrcHost(int)field.intsrcMemoryType()Source memory type (host, device, array)CUDA_MEMCPY2DsrcMemoryType(int value)Sets the specified value to thesrcMemoryType()field.longsrcPitch()Source pitch (ignored when src is array)CUDA_MEMCPY2DsrcPitch(long value)Sets the specified value to thesrcPitch()field.longsrcXInBytes()Source X in bytesCUDA_MEMCPY2DsrcXInBytes(long value)Sets the specified value to thesrcXInBytes()field.longsrcY()Source YCUDA_MEMCPY2DsrcY(long value)Sets the specified value to thesrcY()field.longWidthInBytes()Width of 2D memory copy in bytesCUDA_MEMCPY2DWidthInBytes(long value)Sets the specified value to theWidthInBytes()field.
-
-
-
Constructor Detail
-
CUDA_MEMCPY2D
public CUDA_MEMCPY2D(java.nio.ByteBuffer container)
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 Detail
-
sizeof
public int sizeof()
- Specified by:
sizeofin classorg.lwjgl.system.Struct
-
srcXInBytes
public long srcXInBytes()
Source X in bytes
-
srcY
public long srcY()
Source Y
-
srcMemoryType
public int srcMemoryType()
Source memory type (host, device, array)
-
srcHost
@Nullable public java.nio.ByteBuffer srcHost(int capacity)
- Parameters:
capacity- the number of elements in the returned buffer- Returns:
- Source host pointer
-
srcDevice
public long srcDevice()
Source device pointer
-
srcArray
public long srcArray()
Source array reference
-
srcPitch
public long srcPitch()
Source pitch (ignored when src is array)
-
dstXInBytes
public long dstXInBytes()
Destination X in bytes
-
dstY
public long dstY()
Destination Y
-
dstMemoryType
public int dstMemoryType()
Destination memory type (host, device, array)
-
dstHost
@Nullable public java.nio.ByteBuffer dstHost(int capacity)
- Parameters:
capacity- the number of elements in the returned buffer- Returns:
- Destination host pointer
-
dstDevice
public long dstDevice()
Destination device pointer
-
dstArray
public long dstArray()
Destination array reference
-
dstPitch
public long dstPitch()
Destination pitch (ignored when dst is array)
-
WidthInBytes
public long WidthInBytes()
Width of 2D memory copy in bytes
-
Height
public long Height()
Height of 2D memory copy
-
srcXInBytes
public CUDA_MEMCPY2D srcXInBytes(long value)
Sets the specified value to thesrcXInBytes()field.
-
srcY
public CUDA_MEMCPY2D srcY(long value)
Sets the specified value to thesrcY()field.
-
srcMemoryType
public CUDA_MEMCPY2D srcMemoryType(int value)
Sets the specified value to thesrcMemoryType()field.
-
srcHost
public CUDA_MEMCPY2D srcHost(@Nullable java.nio.ByteBuffer value)
Sets the address of the specifiedByteBufferto thesrcHost(int)field.
-
srcDevice
public CUDA_MEMCPY2D srcDevice(long value)
Sets the specified value to thesrcDevice()field.
-
srcArray
public CUDA_MEMCPY2D srcArray(long value)
Sets the specified value to thesrcArray()field.
-
srcPitch
public CUDA_MEMCPY2D srcPitch(long value)
Sets the specified value to thesrcPitch()field.
-
dstXInBytes
public CUDA_MEMCPY2D dstXInBytes(long value)
Sets the specified value to thedstXInBytes()field.
-
dstY
public CUDA_MEMCPY2D dstY(long value)
Sets the specified value to thedstY()field.
-
dstMemoryType
public CUDA_MEMCPY2D dstMemoryType(int value)
Sets the specified value to thedstMemoryType()field.
-
dstHost
public CUDA_MEMCPY2D dstHost(@Nullable java.nio.ByteBuffer value)
Sets the address of the specifiedByteBufferto thedstHost(int)field.
-
dstDevice
public CUDA_MEMCPY2D dstDevice(long value)
Sets the specified value to thedstDevice()field.
-
dstArray
public CUDA_MEMCPY2D dstArray(long value)
Sets the specified value to thedstArray()field.
-
dstPitch
public CUDA_MEMCPY2D dstPitch(long value)
Sets the specified value to thedstPitch()field.
-
WidthInBytes
public CUDA_MEMCPY2D WidthInBytes(long value)
Sets the specified value to theWidthInBytes()field.
-
Height
public CUDA_MEMCPY2D Height(long value)
Sets the specified value to theHeight()field.
-
set
public CUDA_MEMCPY2D set(long srcXInBytes, long srcY, int srcMemoryType, @Nullable java.nio.ByteBuffer srcHost, long srcDevice, long srcArray, long srcPitch, long dstXInBytes, long dstY, int dstMemoryType, @Nullable java.nio.ByteBuffer dstHost, long dstDevice, long dstArray, long dstPitch, long WidthInBytes, long Height)
Initializes this struct with the specified values.
-
set
public CUDA_MEMCPY2D set(CUDA_MEMCPY2D src)
Copies the specified struct data to this struct.- Parameters:
src- the source struct- Returns:
- this struct
-
malloc
public static CUDA_MEMCPY2D malloc()
Returns a newCUDA_MEMCPY2Dinstance allocated withmemAlloc. The instance must be explicitly freed.
-
calloc
public static CUDA_MEMCPY2D calloc()
Returns a newCUDA_MEMCPY2Dinstance allocated withmemCalloc. The instance must be explicitly freed.
-
create
public static CUDA_MEMCPY2D create()
Returns a newCUDA_MEMCPY2Dinstance allocated withBufferUtils.
-
create
public static CUDA_MEMCPY2D create(long address)
Returns a newCUDA_MEMCPY2Dinstance for the specified memory address.
-
createSafe
@Nullable public static CUDA_MEMCPY2D createSafe(long address)
-
malloc
public static CUDA_MEMCPY2D.Buffer malloc(int capacity)
Returns a newCUDA_MEMCPY2D.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
public static CUDA_MEMCPY2D.Buffer calloc(int capacity)
Returns a newCUDA_MEMCPY2D.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
public static CUDA_MEMCPY2D.Buffer create(int capacity)
Returns a newCUDA_MEMCPY2D.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
public static CUDA_MEMCPY2D.Buffer create(long address, int capacity)
Create aCUDA_MEMCPY2D.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
createSafe
@Nullable public static CUDA_MEMCPY2D.Buffer createSafe(long address, int capacity)
-
mallocStack
@Deprecated public static CUDA_MEMCPY2D mallocStack()
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(MemoryStack)instead.
-
callocStack
@Deprecated public static CUDA_MEMCPY2D callocStack()
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(MemoryStack)instead.
-
mallocStack
@Deprecated public static CUDA_MEMCPY2D mallocStack(org.lwjgl.system.MemoryStack stack)
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(MemoryStack)instead.
-
callocStack
@Deprecated public static CUDA_MEMCPY2D callocStack(org.lwjgl.system.MemoryStack stack)
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(MemoryStack)instead.
-
mallocStack
@Deprecated public static CUDA_MEMCPY2D.Buffer mallocStack(int capacity)
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(int, MemoryStack)instead.
-
callocStack
@Deprecated public static CUDA_MEMCPY2D.Buffer callocStack(int capacity)
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
public static CUDA_MEMCPY2D malloc(org.lwjgl.system.MemoryStack stack)
Returns a newCUDA_MEMCPY2Dinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
calloc
public static CUDA_MEMCPY2D calloc(org.lwjgl.system.MemoryStack stack)
Returns a newCUDA_MEMCPY2Dinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocate
-
malloc
public static CUDA_MEMCPY2D.Buffer malloc(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newCUDA_MEMCPY2D.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
calloc
public static CUDA_MEMCPY2D.Buffer calloc(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newCUDA_MEMCPY2D.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
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
@Nullable public static java.nio.ByteBuffer nsrcHost(long struct, int capacity)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
@Nullable public static java.nio.ByteBuffer ndstHost(long struct, int capacity)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
public static void nsrcHost(long struct, @Nullable java.nio.ByteBuffer value)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
public static void ndstHost(long struct, @Nullable java.nio.ByteBuffer value)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.
-
-