Package org.lwjgl.cuda
Class CUmemLocation
- java.lang.Object
-
- org.lwjgl.system.Pointer.Default
-
- org.lwjgl.system.Struct
-
- org.lwjgl.cuda.CUmemLocation
-
- All Implemented Interfaces:
java.lang.AutoCloseable,org.lwjgl.system.NativeResource,org.lwjgl.system.Pointer
public class CUmemLocation extends org.lwjgl.system.Struct implements org.lwjgl.system.NativeResource
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classCUmemLocation.BufferAn array ofCUmemLocationstructs.
-
Constructor Summary
Constructors Constructor Description CUmemLocation(java.nio.ByteBuffer container)Creates aCUmemLocationinstance at the current position of the specifiedByteBuffercontainer.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static CUmemLocationcalloc()Returns a newCUmemLocationinstance allocated withmemCalloc.static CUmemLocation.Buffercalloc(int capacity)Returns a newCUmemLocation.Bufferinstance allocated withmemCalloc.static CUmemLocation.Buffercalloc(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newCUmemLocation.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static CUmemLocationcalloc(org.lwjgl.system.MemoryStack stack)Returns a newCUmemLocationinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static CUmemLocationcreate()Returns a newCUmemLocationinstance allocated withBufferUtils.static CUmemLocation.Buffercreate(int capacity)Returns a newCUmemLocation.Bufferinstance allocated withBufferUtils.static CUmemLocationcreate(long address)Returns a newCUmemLocationinstance for the specified memory address.static CUmemLocation.Buffercreate(long address, int capacity)Create aCUmemLocation.Bufferinstance at the specified memory.static CUmemLocationcreateSafe(long address)static CUmemLocation.BuffercreateSafe(long address, int capacity)intid()identifier for a given this location'sCUmemLocationTypeCUmemLocationid(int value)Sets the specified value to theid()field.static CUmemLocationmalloc()Returns a newCUmemLocationinstance allocated withmemAlloc.static CUmemLocation.Buffermalloc(int capacity)Returns a newCUmemLocation.Bufferinstance allocated withmemAlloc.static CUmemLocation.Buffermalloc(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newCUmemLocation.Bufferinstance allocated on the specifiedMemoryStack.static CUmemLocationmalloc(org.lwjgl.system.MemoryStack stack)Returns a newCUmemLocationinstance allocated on the specifiedMemoryStack.static intnid(long struct)Unsafe version ofid().static voidnid(long struct, int value)Unsafe version ofid.static intntype(long struct)Unsafe version oftype().static voidntype(long struct, int value)Unsafe version oftype.CUmemLocationset(int type, int id)Initializes this struct with the specified values.CUmemLocationset(CUmemLocation src)Copies the specified struct data to this struct.intsizeof()inttype()specifies the location type, which modifies the meaning of idCUmemLocationtype(int value)Sets the specified value to thetype()field.
-
-
-
Constructor Detail
-
CUmemLocation
public CUmemLocation(java.nio.ByteBuffer container)
Creates aCUmemLocationinstance 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
-
type
public int type()
specifies the location type, which modifies the meaning of id
-
id
public int id()
identifier for a given this location'sCUmemLocationType
-
type
public CUmemLocation type(int value)
Sets the specified value to thetype()field.
-
id
public CUmemLocation id(int value)
Sets the specified value to theid()field.
-
set
public CUmemLocation set(int type, int id)
Initializes this struct with the specified values.
-
set
public CUmemLocation set(CUmemLocation src)
Copies the specified struct data to this struct.- Parameters:
src- the source struct- Returns:
- this struct
-
malloc
public static CUmemLocation malloc()
Returns a newCUmemLocationinstance allocated withmemAlloc. The instance must be explicitly freed.
-
calloc
public static CUmemLocation calloc()
Returns a newCUmemLocationinstance allocated withmemCalloc. The instance must be explicitly freed.
-
create
public static CUmemLocation create()
Returns a newCUmemLocationinstance allocated withBufferUtils.
-
create
public static CUmemLocation create(long address)
Returns a newCUmemLocationinstance for the specified memory address.
-
createSafe
@Nullable public static CUmemLocation createSafe(long address)
-
malloc
public static CUmemLocation.Buffer malloc(int capacity)
Returns a newCUmemLocation.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
public static CUmemLocation.Buffer calloc(int capacity)
Returns a newCUmemLocation.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
public static CUmemLocation.Buffer create(int capacity)
Returns a newCUmemLocation.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
public static CUmemLocation.Buffer create(long address, int capacity)
Create aCUmemLocation.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
createSafe
@Nullable public static CUmemLocation.Buffer createSafe(long address, int capacity)
-
malloc
public static CUmemLocation malloc(org.lwjgl.system.MemoryStack stack)
Returns a newCUmemLocationinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
calloc
public static CUmemLocation calloc(org.lwjgl.system.MemoryStack stack)
Returns a newCUmemLocationinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocate
-
malloc
public static CUmemLocation.Buffer malloc(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newCUmemLocation.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
calloc
public static CUmemLocation.Buffer calloc(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newCUmemLocation.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
ntype
public static int ntype(long struct)
Unsafe version oftype().
-
nid
public static int nid(long struct)
Unsafe version ofid().
-
ntype
public static void ntype(long struct, int value)Unsafe version oftype.
-
nid
public static void nid(long struct, int value)Unsafe version ofid.
-
-