Package org.lwjgl.cuda
Class CUmemAccessDesc
- java.lang.Object
-
- org.lwjgl.system.Pointer.Default
-
- org.lwjgl.system.Struct
-
- org.lwjgl.cuda.CUmemAccessDesc
-
- All Implemented Interfaces:
java.lang.AutoCloseable,org.lwjgl.system.NativeResource,org.lwjgl.system.Pointer
public class CUmemAccessDesc extends org.lwjgl.system.Struct implements org.lwjgl.system.NativeResourceMemory access descriptor.Layout
struct CUmemAccessDesc {CUmemLocationlocation(); CUmemAccess_flagsflags(); }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classCUmemAccessDesc.BufferAn array ofCUmemAccessDescstructs.
-
Constructor Summary
Constructors Constructor Description CUmemAccessDesc(java.nio.ByteBuffer container)Creates aCUmemAccessDescinstance at the current position of the specifiedByteBuffercontainer.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static CUmemAccessDesccalloc()Returns a newCUmemAccessDescinstance allocated withmemCalloc.static CUmemAccessDesc.Buffercalloc(int capacity)Returns a newCUmemAccessDesc.Bufferinstance allocated withmemCalloc.static CUmemAccessDesc.Buffercalloc(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newCUmemAccessDesc.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static CUmemAccessDesccalloc(org.lwjgl.system.MemoryStack stack)Returns a newCUmemAccessDescinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static CUmemAccessDesccreate()Returns a newCUmemAccessDescinstance allocated withBufferUtils.static CUmemAccessDesc.Buffercreate(int capacity)Returns a newCUmemAccessDesc.Bufferinstance allocated withBufferUtils.static CUmemAccessDesccreate(long address)Returns a newCUmemAccessDescinstance for the specified memory address.static CUmemAccessDesc.Buffercreate(long address, int capacity)Create aCUmemAccessDesc.Bufferinstance at the specified memory.static CUmemAccessDesccreateSafe(long address)static CUmemAccessDesc.BuffercreateSafe(long address, int capacity)intflags()CUmemProtaccessibility flags to set on the requestCUmemAccessDescflags(int value)Sets the specified value to theflags()field.CUmemLocationlocation()location on which the request is to change it's accessibilityCUmemAccessDesclocation(java.util.function.Consumer<CUmemLocation> consumer)Passes thelocation()field to the specifiedConsumer.CUmemAccessDesclocation(CUmemLocation value)Copies the specifiedCUmemLocationto thelocation()field.static CUmemAccessDescmalloc()Returns a newCUmemAccessDescinstance allocated withmemAlloc.static CUmemAccessDesc.Buffermalloc(int capacity)Returns a newCUmemAccessDesc.Bufferinstance allocated withmemAlloc.static CUmemAccessDesc.Buffermalloc(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newCUmemAccessDesc.Bufferinstance allocated on the specifiedMemoryStack.static CUmemAccessDescmalloc(org.lwjgl.system.MemoryStack stack)Returns a newCUmemAccessDescinstance allocated on the specifiedMemoryStack.static intnflags(long struct)Unsafe version offlags().static voidnflags(long struct, int value)Unsafe version offlags.static CUmemLocationnlocation(long struct)Unsafe version oflocation().static voidnlocation(long struct, CUmemLocation value)Unsafe version oflocation.CUmemAccessDescset(CUmemAccessDesc src)Copies the specified struct data to this struct.CUmemAccessDescset(CUmemLocation location, int flags)Initializes this struct with the specified values.intsizeof()
-
-
-
Constructor Detail
-
CUmemAccessDesc
public CUmemAccessDesc(java.nio.ByteBuffer container)
Creates aCUmemAccessDescinstance 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
-
location
public CUmemLocation location()
location on which the request is to change it's accessibility
-
flags
public int flags()
CUmemProtaccessibility flags to set on the request
-
location
public CUmemAccessDesc location(CUmemLocation value)
Copies the specifiedCUmemLocationto thelocation()field.
-
location
public CUmemAccessDesc location(java.util.function.Consumer<CUmemLocation> consumer)
Passes thelocation()field to the specifiedConsumer.
-
flags
public CUmemAccessDesc flags(int value)
Sets the specified value to theflags()field.
-
set
public CUmemAccessDesc set(CUmemLocation location, int flags)
Initializes this struct with the specified values.
-
set
public CUmemAccessDesc set(CUmemAccessDesc src)
Copies the specified struct data to this struct.- Parameters:
src- the source struct- Returns:
- this struct
-
malloc
public static CUmemAccessDesc malloc()
Returns a newCUmemAccessDescinstance allocated withmemAlloc. The instance must be explicitly freed.
-
calloc
public static CUmemAccessDesc calloc()
Returns a newCUmemAccessDescinstance allocated withmemCalloc. The instance must be explicitly freed.
-
create
public static CUmemAccessDesc create()
Returns a newCUmemAccessDescinstance allocated withBufferUtils.
-
create
public static CUmemAccessDesc create(long address)
Returns a newCUmemAccessDescinstance for the specified memory address.
-
createSafe
@Nullable public static CUmemAccessDesc createSafe(long address)
-
malloc
public static CUmemAccessDesc.Buffer malloc(int capacity)
Returns a newCUmemAccessDesc.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
public static CUmemAccessDesc.Buffer calloc(int capacity)
Returns a newCUmemAccessDesc.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
public static CUmemAccessDesc.Buffer create(int capacity)
Returns a newCUmemAccessDesc.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
public static CUmemAccessDesc.Buffer create(long address, int capacity)
Create aCUmemAccessDesc.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
createSafe
@Nullable public static CUmemAccessDesc.Buffer createSafe(long address, int capacity)
-
malloc
public static CUmemAccessDesc malloc(org.lwjgl.system.MemoryStack stack)
Returns a newCUmemAccessDescinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
calloc
public static CUmemAccessDesc calloc(org.lwjgl.system.MemoryStack stack)
Returns a newCUmemAccessDescinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocate
-
malloc
public static CUmemAccessDesc.Buffer malloc(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newCUmemAccessDesc.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
calloc
public static CUmemAccessDesc.Buffer calloc(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newCUmemAccessDesc.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
nlocation
public static CUmemLocation nlocation(long struct)
Unsafe version oflocation().
-
nflags
public static int nflags(long struct)
Unsafe version offlags().
-
nlocation
public static void nlocation(long struct, CUmemLocation value)Unsafe version oflocation.
-
nflags
public static void nflags(long struct, int value)Unsafe version offlags.
-
-