Package org.lwjgl.cuda
Class CUstreamAttrValue
java.lang.Object
org.lwjgl.system.Pointer.Default
org.lwjgl.system.Struct<CUstreamAttrValue>
org.lwjgl.cuda.CUstreamAttrValue
- All Implemented Interfaces:
AutoCloseable,org.lwjgl.system.NativeResource,org.lwjgl.system.Pointer
public class CUstreamAttrValue
extends org.lwjgl.system.Struct<CUstreamAttrValue>
implements org.lwjgl.system.NativeResource
Layout
union CUstreamAttrValue {
CUaccessPolicyWindow accessPolicyWindow;
CUsynchronizationPolicy syncPolicy;
}-
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 member offsets.static final intThe struct alignment in bytes.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
ConstructorsConstructorDescriptionCUstreamAttrValue(ByteBuffer container) Creates aCUstreamAttrValueinstance at the current position of the specifiedByteBuffercontainer. -
Method Summary
Modifier and TypeMethodDescriptionaccessPolicyWindow(Consumer<CUaccessPolicyWindow> consumer) Passes theaccessPolicyWindowfield to the specifiedConsumer.Copies the specifiedCUaccessPolicyWindowto theaccessPolicyWindowfield.static CUstreamAttrValuecalloc()Returns a newCUstreamAttrValueinstance allocated withmemCalloc.static CUstreamAttrValue.Buffercalloc(int capacity) Returns a newCUstreamAttrValue.Bufferinstance allocated withmemCalloc.static CUstreamAttrValue.Buffercalloc(int capacity, org.lwjgl.system.MemoryStack stack) Returns a newCUstreamAttrValue.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static CUstreamAttrValuecalloc(org.lwjgl.system.MemoryStack stack) Returns a newCUstreamAttrValueinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static CUstreamAttrValuecreate()Returns a newCUstreamAttrValueinstance allocated withBufferUtils.static CUstreamAttrValue.Buffercreate(int capacity) Returns a newCUstreamAttrValue.Bufferinstance allocated withBufferUtils.static CUstreamAttrValuecreate(long address) Returns a newCUstreamAttrValueinstance for the specified memory address.static CUstreamAttrValue.Buffercreate(long address, int capacity) Create aCUstreamAttrValue.Bufferinstance at the specified memory.static @Nullable CUstreamAttrValuecreateSafe(long address) static @Nullable CUstreamAttrValue.BuffercreateSafe(long address, int capacity) static CUstreamAttrValuemalloc()Returns a newCUstreamAttrValueinstance allocated withmemAlloc.static CUstreamAttrValue.Buffermalloc(int capacity) Returns a newCUstreamAttrValue.Bufferinstance allocated withmemAlloc.static CUstreamAttrValue.Buffermalloc(int capacity, org.lwjgl.system.MemoryStack stack) Returns a newCUstreamAttrValue.Bufferinstance allocated on the specifiedMemoryStack.static CUstreamAttrValuemalloc(org.lwjgl.system.MemoryStack stack) Returns a newCUstreamAttrValueinstance allocated on the specifiedMemoryStack.static CUaccessPolicyWindownaccessPolicyWindow(long struct) Unsafe version ofaccessPolicyWindow().static voidnaccessPolicyWindow(long struct, CUaccessPolicyWindow value) Unsafe version ofaccessPolicyWindow.static intnsyncPolicy(long struct) Unsafe version ofsyncPolicy().static voidnsyncPolicy(long struct, int value) Unsafe version ofsyncPolicy.set(CUstreamAttrValue src) Copies the specified struct data to this struct.intsizeof()intsyncPolicy(int value) Sets the specified value to thesyncPolicyfield.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. -
ACCESSPOLICYWINDOW
public static final int ACCESSPOLICYWINDOWThe struct member offsets. -
SYNCPOLICY
public static final int SYNCPOLICYThe struct member offsets.
-
-
Constructor Details
-
CUstreamAttrValue
Creates aCUstreamAttrValueinstance 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<CUstreamAttrValue>
-
accessPolicyWindow
- Returns:
- a
CUaccessPolicyWindowview of theaccessPolicyWindowfield.
-
syncPolicy
public int syncPolicy()- Returns:
- the value of the
syncPolicyfield.
-
accessPolicyWindow
Copies the specifiedCUaccessPolicyWindowto theaccessPolicyWindowfield. -
accessPolicyWindow
Passes theaccessPolicyWindowfield to the specifiedConsumer. -
syncPolicy
Sets the specified value to thesyncPolicyfield. -
set
Copies the specified struct data to this struct.- Parameters:
src- the source struct- Returns:
- this struct
-
malloc
Returns a newCUstreamAttrValueinstance allocated withmemAlloc. The instance must be explicitly freed. -
calloc
Returns a newCUstreamAttrValueinstance allocated withmemCalloc. The instance must be explicitly freed. -
create
Returns a newCUstreamAttrValueinstance allocated withBufferUtils. -
create
Returns a newCUstreamAttrValueinstance for the specified memory address. -
createSafe
-
malloc
Returns a newCUstreamAttrValue.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
Returns a newCUstreamAttrValue.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
Returns a newCUstreamAttrValue.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
Create aCUstreamAttrValue.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
createSafe
-
malloc
Returns a newCUstreamAttrValueinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
calloc
Returns a newCUstreamAttrValueinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocate
-
malloc
Returns a newCUstreamAttrValue.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
capacity- the buffer capacitystack- the stack from which to allocate
-
calloc
Returns a newCUstreamAttrValue.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
capacity- the buffer capacitystack- the stack from which to allocate
-
naccessPolicyWindow
Unsafe version ofaccessPolicyWindow(). -
nsyncPolicy
public static int nsyncPolicy(long struct) Unsafe version ofsyncPolicy(). -
naccessPolicyWindow
Unsafe version ofaccessPolicyWindow. -
nsyncPolicy
public static void nsyncPolicy(long struct, int value) Unsafe version ofsyncPolicy.
-