Package org.lwjgl.cuda
Class CUlaunchAttribute
java.lang.Object
org.lwjgl.system.Pointer.Default
org.lwjgl.system.Struct<CUlaunchAttribute>
org.lwjgl.cuda.CUlaunchAttribute
- All Implemented Interfaces:
AutoCloseable,org.lwjgl.system.NativeResource,org.lwjgl.system.Pointer
public class CUlaunchAttribute
extends org.lwjgl.system.Struct<CUlaunchAttribute>
implements org.lwjgl.system.NativeResource
Layout
struct CUlaunchAttribute {
CUlaunchAttributeID id;
char pad[4];
CUlaunchAttributeValue value;
}-
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 size in bytes.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
ConstructorsConstructorDescriptionCUlaunchAttribute(ByteBuffer container) Creates aCUlaunchAttributeinstance at the current position of the specifiedByteBuffercontainer. -
Method Summary
Modifier and TypeMethodDescriptionstatic CUlaunchAttributecalloc()Returns a newCUlaunchAttributeinstance allocated withmemCalloc.static CUlaunchAttribute.Buffercalloc(int capacity) Returns a newCUlaunchAttribute.Bufferinstance allocated withmemCalloc.static CUlaunchAttribute.Buffercalloc(int capacity, org.lwjgl.system.MemoryStack stack) Returns a newCUlaunchAttribute.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static CUlaunchAttributecalloc(org.lwjgl.system.MemoryStack stack) Returns a newCUlaunchAttributeinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static CUlaunchAttributecreate()Returns a newCUlaunchAttributeinstance allocated withBufferUtils.static CUlaunchAttribute.Buffercreate(int capacity) Returns a newCUlaunchAttribute.Bufferinstance allocated withBufferUtils.static CUlaunchAttributecreate(long address) Returns a newCUlaunchAttributeinstance for the specified memory address.static CUlaunchAttribute.Buffercreate(long address, int capacity) Create aCUlaunchAttribute.Bufferinstance at the specified memory.static @Nullable CUlaunchAttributecreateSafe(long address) static @Nullable CUlaunchAttribute.BuffercreateSafe(long address, int capacity) intid()id(int value) Sets the specified value to theidfield.static CUlaunchAttributemalloc()Returns a newCUlaunchAttributeinstance allocated withmemAlloc.static CUlaunchAttribute.Buffermalloc(int capacity) Returns a newCUlaunchAttribute.Bufferinstance allocated withmemAlloc.static CUlaunchAttribute.Buffermalloc(int capacity, org.lwjgl.system.MemoryStack stack) Returns a newCUlaunchAttribute.Bufferinstance allocated on the specifiedMemoryStack.static CUlaunchAttributemalloc(org.lwjgl.system.MemoryStack stack) Returns a newCUlaunchAttributeinstance allocated on the specifiedMemoryStack.static intnid(long struct) Unsafe version ofid().static voidnid(long struct, int value) Unsafe version ofid.static ByteBuffernpad(long struct) Unsafe version ofpad().static bytenpad(long struct, int index) Unsafe version ofpad.static voidnpad(long struct, int index, byte value) Unsafe version ofpad.static voidnpad(long struct, ByteBuffer value) Unsafe version ofpad.static CUlaunchAttributeValuenvalue(long struct) Unsafe version ofvalue().static voidnvalue(long struct, CUlaunchAttributeValue value) Unsafe version ofvalue.pad()bytepad(int index) pad(int index, byte value) Sets the specified value at the specified index of thepadfield.pad(ByteBuffer value) Copies the specifiedByteBufferto thepadfield.set(int id, ByteBuffer pad, CUlaunchAttributeValue value) Initializes this struct with the specified values.set(CUlaunchAttribute src) Copies the specified struct data to this struct.intsizeof()value()value(Consumer<CUlaunchAttributeValue> consumer) Passes thevaluefield to the specifiedConsumer.value(CUlaunchAttributeValue value) Copies the specifiedCUlaunchAttributeValueto thevaluefield.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. -
ID
public static final int IDThe struct member offsets. -
PAD
public static final int PADThe struct member offsets. -
VALUE
public static final int VALUEThe struct member offsets.
-
-
Constructor Details
-
CUlaunchAttribute
Creates aCUlaunchAttributeinstance 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<CUlaunchAttribute>
-
id
public int id()- Returns:
- the value of the
idfield.
-
pad
- Returns:
- a
ByteBufferview of thepadfield.
-
pad
public byte pad(int index) - Returns:
- the value at the specified index of the
padfield.
-
value
- Returns:
- a
CUlaunchAttributeValueview of thevaluefield.
-
id
Sets the specified value to theidfield. -
pad
Copies the specifiedByteBufferto thepadfield. -
pad
Sets the specified value at the specified index of thepadfield. -
value
Copies the specifiedCUlaunchAttributeValueto thevaluefield. -
value
Passes thevaluefield to the specifiedConsumer. -
set
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 newCUlaunchAttributeinstance allocated withmemAlloc. The instance must be explicitly freed. -
calloc
Returns a newCUlaunchAttributeinstance allocated withmemCalloc. The instance must be explicitly freed. -
create
Returns a newCUlaunchAttributeinstance allocated withBufferUtils. -
create
Returns a newCUlaunchAttributeinstance for the specified memory address. -
createSafe
-
malloc
Returns a newCUlaunchAttribute.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
Returns a newCUlaunchAttribute.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
Returns a newCUlaunchAttribute.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
Create aCUlaunchAttribute.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
createSafe
-
malloc
Returns a newCUlaunchAttributeinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
calloc
Returns a newCUlaunchAttributeinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocate
-
malloc
Returns a newCUlaunchAttribute.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
capacity- the buffer capacitystack- the stack from which to allocate
-
calloc
Returns a newCUlaunchAttribute.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
capacity- the buffer capacitystack- the stack from which to allocate
-
nid
public static int nid(long struct) Unsafe version ofid(). -
npad
Unsafe version ofpad(). -
npad
public static byte npad(long struct, int index) Unsafe version ofpad. -
nvalue
Unsafe version ofvalue(). -
nid
public static void nid(long struct, int value) Unsafe version ofid. -
npad
Unsafe version ofpad. -
npad
public static void npad(long struct, int index, byte value) Unsafe version ofpad. -
nvalue
Unsafe version ofvalue.
-