Package org.lwjgl.cuda
Class CUstreamAttrValue
- java.lang.Object
-
- org.lwjgl.system.Pointer.Default
-
- org.lwjgl.system.Struct
-
- org.lwjgl.cuda.CUstreamAttrValue
-
- All Implemented Interfaces:
java.lang.AutoCloseable,org.lwjgl.system.NativeResource,org.lwjgl.system.Pointer
public class CUstreamAttrValue extends org.lwjgl.system.Struct implements org.lwjgl.system.NativeResourceStream attributes union, used withStreamSetAttribute/StreamGetAttribute.Layout
union CUstreamAttrValue {CUaccessPolicyWindowaccessPolicyWindow(); CUsynchronizationPolicysyncPolicy(); }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classCUstreamAttrValue.BufferAn array ofCUstreamAttrValuestructs.
-
Field Summary
Fields Modifier and Type Field Description static intACCESSPOLICYWINDOWThe struct member offsets.static intALIGNOFThe struct alignment in bytes.static intSIZEOFThe struct size in bytes.static intSYNCPOLICYThe struct member offsets.
-
Constructor Summary
Constructors Constructor Description CUstreamAttrValue(java.nio.ByteBuffer container)Creates aCUstreamAttrValueinstance at the current position of the specifiedByteBuffercontainer.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description CUaccessPolicyWindowaccessPolicyWindow()attributeCUaccessPolicyWindowCUstreamAttrValueaccessPolicyWindow(java.util.function.Consumer<CUaccessPolicyWindow> consumer)Passes theaccessPolicyWindow()field to the specifiedConsumer.CUstreamAttrValueaccessPolicyWindow(CUaccessPolicyWindow value)Copies the specifiedCUaccessPolicyWindowto theaccessPolicyWindow()field.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 CUstreamAttrValuecreateSafe(long address)static 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.CUstreamAttrValueset(CUstreamAttrValue src)Copies the specified struct data to this struct.intsizeof()intsyncPolicy()value forSTREAM_ATTRIBUTE_SYNCHRONIZATION_POLICYCUstreamAttrValuesyncPolicy(int value)Sets the specified value to thesyncPolicy()field.
-
-
-
Constructor Detail
-
CUstreamAttrValue
public CUstreamAttrValue(java.nio.ByteBuffer container)
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 Detail
-
sizeof
public int sizeof()
- Specified by:
sizeofin classorg.lwjgl.system.Struct
-
accessPolicyWindow
public CUaccessPolicyWindow accessPolicyWindow()
attributeCUaccessPolicyWindow
-
syncPolicy
public int syncPolicy()
value forSTREAM_ATTRIBUTE_SYNCHRONIZATION_POLICY
-
accessPolicyWindow
public CUstreamAttrValue accessPolicyWindow(CUaccessPolicyWindow value)
Copies the specifiedCUaccessPolicyWindowto theaccessPolicyWindow()field.
-
accessPolicyWindow
public CUstreamAttrValue accessPolicyWindow(java.util.function.Consumer<CUaccessPolicyWindow> consumer)
Passes theaccessPolicyWindow()field to the specifiedConsumer.
-
syncPolicy
public CUstreamAttrValue syncPolicy(int value)
Sets the specified value to thesyncPolicy()field.
-
set
public CUstreamAttrValue set(CUstreamAttrValue src)
Copies the specified struct data to this struct.- Parameters:
src- the source struct- Returns:
- this struct
-
malloc
public static CUstreamAttrValue malloc()
Returns a newCUstreamAttrValueinstance allocated withmemAlloc. The instance must be explicitly freed.
-
calloc
public static CUstreamAttrValue calloc()
Returns a newCUstreamAttrValueinstance allocated withmemCalloc. The instance must be explicitly freed.
-
create
public static CUstreamAttrValue create()
Returns a newCUstreamAttrValueinstance allocated withBufferUtils.
-
create
public static CUstreamAttrValue create(long address)
Returns a newCUstreamAttrValueinstance for the specified memory address.
-
createSafe
@Nullable public static CUstreamAttrValue createSafe(long address)
-
malloc
public static CUstreamAttrValue.Buffer malloc(int capacity)
Returns a newCUstreamAttrValue.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
public static CUstreamAttrValue.Buffer calloc(int capacity)
Returns a newCUstreamAttrValue.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
public static CUstreamAttrValue.Buffer create(int capacity)
Returns a newCUstreamAttrValue.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
public static CUstreamAttrValue.Buffer create(long address, int capacity)
Create aCUstreamAttrValue.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
createSafe
@Nullable public static CUstreamAttrValue.Buffer createSafe(long address, int capacity)
-
malloc
public static CUstreamAttrValue malloc(org.lwjgl.system.MemoryStack stack)
Returns a newCUstreamAttrValueinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
calloc
public static CUstreamAttrValue calloc(org.lwjgl.system.MemoryStack stack)
Returns a newCUstreamAttrValueinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocate
-
malloc
public static CUstreamAttrValue.Buffer malloc(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newCUstreamAttrValue.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
calloc
public static CUstreamAttrValue.Buffer calloc(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newCUstreamAttrValue.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
naccessPolicyWindow
public static CUaccessPolicyWindow naccessPolicyWindow(long struct)
Unsafe version ofaccessPolicyWindow().
-
nsyncPolicy
public static int nsyncPolicy(long struct)
Unsafe version ofsyncPolicy().
-
naccessPolicyWindow
public static void naccessPolicyWindow(long struct, CUaccessPolicyWindow value)Unsafe version ofaccessPolicyWindow.
-
nsyncPolicy
public static void nsyncPolicy(long struct, int value)Unsafe version ofsyncPolicy.
-
-