Package org.lwjgl.cuda
Class CUexecAffinityParam
- java.lang.Object
-
- org.lwjgl.system.Pointer.Default
-
- org.lwjgl.system.Struct
-
- org.lwjgl.cuda.CUexecAffinityParam
-
- All Implemented Interfaces:
java.lang.AutoCloseable,org.lwjgl.system.NativeResource,org.lwjgl.system.Pointer
public class CUexecAffinityParam extends org.lwjgl.system.Struct implements org.lwjgl.system.NativeResourceExecution Affinity Parameters.Layout
struct CUexecAffinityParam { CUexecAffinityType type; union {CUexecAffinitySmCountsmCount; } param; }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classCUexecAffinityParam.BufferAn array ofCUexecAffinityParamstructs.
-
Field Summary
Fields Modifier and Type Field Description static intALIGNOFThe struct alignment in bytes.static intPARAM
PARAM_SMCOUNTThe struct member offsets.static intSIZEOFThe struct size in bytes.static intTYPEThe struct member offsets.
-
Constructor Summary
Constructors Constructor Description CUexecAffinityParam(java.nio.ByteBuffer container)Creates aCUexecAffinityParaminstance at the current position of the specifiedByteBuffercontainer.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static CUexecAffinityParamcalloc()Returns a newCUexecAffinityParaminstance allocated withmemCalloc.static CUexecAffinityParam.Buffercalloc(int capacity)Returns a newCUexecAffinityParam.Bufferinstance allocated withmemCalloc.static CUexecAffinityParam.Buffercalloc(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newCUexecAffinityParam.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static CUexecAffinityParamcalloc(org.lwjgl.system.MemoryStack stack)Returns a newCUexecAffinityParaminstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static CUexecAffinityParamcreate()Returns a newCUexecAffinityParaminstance allocated withBufferUtils.static CUexecAffinityParam.Buffercreate(int capacity)Returns a newCUexecAffinityParam.Bufferinstance allocated withBufferUtils.static CUexecAffinityParamcreate(long address)Returns a newCUexecAffinityParaminstance for the specified memory address.static CUexecAffinityParam.Buffercreate(long address, int capacity)Create aCUexecAffinityParam.Bufferinstance at the specified memory.static CUexecAffinityParamcreateSafe(long address)static CUexecAffinityParam.BuffercreateSafe(long address, int capacity)static CUexecAffinityParammalloc()Returns a newCUexecAffinityParaminstance allocated withmemAlloc.static CUexecAffinityParam.Buffermalloc(int capacity)Returns a newCUexecAffinityParam.Bufferinstance allocated withmemAlloc.static CUexecAffinityParam.Buffermalloc(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newCUexecAffinityParam.Bufferinstance allocated on the specifiedMemoryStack.static CUexecAffinityParammalloc(org.lwjgl.system.MemoryStack stack)Returns a newCUexecAffinityParaminstance allocated on the specifiedMemoryStack.static CUexecAffinitySmCountnparam_smCount(long struct)Unsafe version ofparam_smCount().static voidnparam_smCount(long struct, CUexecAffinitySmCount value)Unsafe version ofparam_smCount.static intntype(long struct)Unsafe version oftype().static voidntype(long struct, int value)Unsafe version oftype.CUexecAffinitySmCountparam_smCount()value forEXEC_AFFINITY_TYPE_SM_COUNTCUexecAffinityParamparam_smCount(java.util.function.Consumer<CUexecAffinitySmCount> consumer)Passes theparam_smCount()field to the specifiedConsumer.CUexecAffinityParamparam_smCount(CUexecAffinitySmCount value)Copies the specifiedCUexecAffinitySmCountto theparam_smCount()field.CUexecAffinityParamset(CUexecAffinityParam src)Copies the specified struct data to this struct.intsizeof()inttype()CUexecAffinityParamtype(int value)Sets the specified value to thetypefield.
-
-
-
Constructor Detail
-
CUexecAffinityParam
public CUexecAffinityParam(java.nio.ByteBuffer container)
Creates aCUexecAffinityParaminstance 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()
- Returns:
- the value of the
typefield.
-
param_smCount
public CUexecAffinitySmCount param_smCount()
value forEXEC_AFFINITY_TYPE_SM_COUNT
-
type
public CUexecAffinityParam type(int value)
Sets the specified value to thetypefield.
-
param_smCount
public CUexecAffinityParam param_smCount(CUexecAffinitySmCount value)
Copies the specifiedCUexecAffinitySmCountto theparam_smCount()field.
-
param_smCount
public CUexecAffinityParam param_smCount(java.util.function.Consumer<CUexecAffinitySmCount> consumer)
Passes theparam_smCount()field to the specifiedConsumer.
-
set
public CUexecAffinityParam set(CUexecAffinityParam src)
Copies the specified struct data to this struct.- Parameters:
src- the source struct- Returns:
- this struct
-
malloc
public static CUexecAffinityParam malloc()
Returns a newCUexecAffinityParaminstance allocated withmemAlloc. The instance must be explicitly freed.
-
calloc
public static CUexecAffinityParam calloc()
Returns a newCUexecAffinityParaminstance allocated withmemCalloc. The instance must be explicitly freed.
-
create
public static CUexecAffinityParam create()
Returns a newCUexecAffinityParaminstance allocated withBufferUtils.
-
create
public static CUexecAffinityParam create(long address)
Returns a newCUexecAffinityParaminstance for the specified memory address.
-
createSafe
@Nullable public static CUexecAffinityParam createSafe(long address)
-
malloc
public static CUexecAffinityParam.Buffer malloc(int capacity)
Returns a newCUexecAffinityParam.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
public static CUexecAffinityParam.Buffer calloc(int capacity)
Returns a newCUexecAffinityParam.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
public static CUexecAffinityParam.Buffer create(int capacity)
Returns a newCUexecAffinityParam.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
public static CUexecAffinityParam.Buffer create(long address, int capacity)
Create aCUexecAffinityParam.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
createSafe
@Nullable public static CUexecAffinityParam.Buffer createSafe(long address, int capacity)
-
malloc
public static CUexecAffinityParam malloc(org.lwjgl.system.MemoryStack stack)
Returns a newCUexecAffinityParaminstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
calloc
public static CUexecAffinityParam calloc(org.lwjgl.system.MemoryStack stack)
Returns a newCUexecAffinityParaminstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocate
-
malloc
public static CUexecAffinityParam.Buffer malloc(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newCUexecAffinityParam.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
calloc
public static CUexecAffinityParam.Buffer calloc(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newCUexecAffinityParam.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().
-
nparam_smCount
public static CUexecAffinitySmCount nparam_smCount(long struct)
Unsafe version ofparam_smCount().
-
ntype
public static void ntype(long struct, int value)Unsafe version oftype.
-
nparam_smCount
public static void nparam_smCount(long struct, CUexecAffinitySmCount value)Unsafe version ofparam_smCount.
-
-