Package org.lwjgl.util.zstd
Class ZDICTCoverParams
java.lang.Object
org.lwjgl.system.Pointer.Default
org.lwjgl.system.Struct<ZDICTCoverParams>
org.lwjgl.util.zstd.ZDICTCoverParams
- All Implemented Interfaces:
AutoCloseable,org.lwjgl.system.NativeResource,org.lwjgl.system.Pointer
public class ZDICTCoverParams
extends org.lwjgl.system.Struct<ZDICTCoverParams>
implements org.lwjgl.system.NativeResource
k and d are the only required parameters. For others, value 0 means default.
Layout
struct ZDICT_cover_params_t {
unsigned k();
unsigned d();
unsigned steps();
unsigned nbThreads();
double splitPoint();
ZDICT_params_t zParams;
}-
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 member offsets.static final intThe struct size in bytes.static final intThe struct member offsets.static final intThe struct member offsets.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
ConstructorsConstructorDescriptionZDICTCoverParams(ByteBuffer container) Creates aZDICTCoverParamsinstance at the current position of the specifiedByteBuffercontainer. -
Method Summary
Modifier and TypeMethodDescriptionstatic ZDICTCoverParamscalloc()Returns a newZDICTCoverParamsinstance allocated withmemCalloc.static ZDICTCoverParams.Buffercalloc(int capacity) Returns a newZDICTCoverParams.Bufferinstance allocated withmemCalloc.static ZDICTCoverParams.Buffercalloc(int capacity, org.lwjgl.system.MemoryStack stack) Returns a newZDICTCoverParams.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static ZDICTCoverParamscalloc(org.lwjgl.system.MemoryStack stack) Returns a newZDICTCoverParamsinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static ZDICTCoverParamsDeprecated.static ZDICTCoverParams.BuffercallocStack(int capacity) Deprecated.static ZDICTCoverParams.BuffercallocStack(int capacity, org.lwjgl.system.MemoryStack stack) Deprecated.static ZDICTCoverParamscallocStack(org.lwjgl.system.MemoryStack stack) Deprecated.static ZDICTCoverParamscreate()Returns a newZDICTCoverParamsinstance allocated withBufferUtils.static ZDICTCoverParams.Buffercreate(int capacity) Returns a newZDICTCoverParams.Bufferinstance allocated withBufferUtils.static ZDICTCoverParamscreate(long address) Returns a newZDICTCoverParamsinstance for the specified memory address.static ZDICTCoverParams.Buffercreate(long address, int capacity) Create aZDICTCoverParams.Bufferinstance at the specified memory.static @Nullable ZDICTCoverParamscreateSafe(long address) static @Nullable ZDICTCoverParams.BuffercreateSafe(long address, int capacity) intd()dmersize : constraint:0 < d <= k: Reasonable range[6, 16]d(int value) Sets the specified value to thed()field.intk()segment size : constraint:0 < k: Reasonable range[16, 2048+]k(int value) Sets the specified value to thek()field.static ZDICTCoverParamsmalloc()Returns a newZDICTCoverParamsinstance allocated withmemAlloc.static ZDICTCoverParams.Buffermalloc(int capacity) Returns a newZDICTCoverParams.Bufferinstance allocated withmemAlloc.static ZDICTCoverParams.Buffermalloc(int capacity, org.lwjgl.system.MemoryStack stack) Returns a newZDICTCoverParams.Bufferinstance allocated on the specifiedMemoryStack.static ZDICTCoverParamsmalloc(org.lwjgl.system.MemoryStack stack) Returns a newZDICTCoverParamsinstance allocated on the specifiedMemoryStack.static ZDICTCoverParamsDeprecated.static ZDICTCoverParams.BuffermallocStack(int capacity) Deprecated.static ZDICTCoverParams.BuffermallocStack(int capacity, org.lwjgl.system.MemoryStack stack) Deprecated.static ZDICTCoverParamsmallocStack(org.lwjgl.system.MemoryStack stack) Deprecated.intnumber of threads : constraint:0 < nbThreads: 1 means single-threaded : Only used for optimization : Ignored ifZSTD_MULTITHREADis not defined.nbThreads(int value) Sets the specified value to thenbThreads()field.static intnd(long struct) Unsafe version ofd().static voidnd(long struct, int value) Unsafe version ofd.static intnk(long struct) Unsafe version ofk().static voidnk(long struct, int value) Unsafe version ofk.static intnnbThreads(long struct) Unsafe version ofnbThreads().static voidnnbThreads(long struct, int value) Unsafe version ofnbThreads.static doublensplitPoint(long struct) Unsafe version ofsplitPoint().static voidnsplitPoint(long struct, double value) Unsafe version ofsplitPoint.static intnsteps(long struct) Unsafe version ofsteps().static voidnsteps(long struct, int value) Unsafe version ofsteps.static ZDICTParamsnzParams(long struct) Unsafe version ofzParams().static voidnzParams(long struct, ZDICTParams value) Unsafe version ofzParams.set(int k, int d, int steps, int nbThreads, double splitPoint, ZDICTParams zParams) Initializes this struct with the specified values.set(ZDICTCoverParams src) Copies the specified struct data to this struct.intsizeof()doublepercentage of samples used for training: Only used for optimization: the firstnbSamples * splitPointsamples will be used to training, the lastnbSamples * (1 - splitPoint)samples will be used for testing, 0 means default (1.0), 1.0 when all samples are used for both training and testing.splitPoint(double value) Sets the specified value to thesplitPoint()field.intsteps()Number of steps : Only used for optimization : 0 means default (40) : Higher means more parameters checkedsteps(int value) Sets the specified value to thesteps()field.zParams()zParams(Consumer<ZDICTParams> consumer) Passes thezParamsfield to the specifiedConsumer.zParams(ZDICTParams value) Copies the specifiedZDICTParamsto thezParamsfield.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. -
K
public static final int KThe struct member offsets. -
D
public static final int DThe struct member offsets. -
STEPS
public static final int STEPSThe struct member offsets. -
NBTHREADS
public static final int NBTHREADSThe struct member offsets. -
SPLITPOINT
public static final int SPLITPOINTThe struct member offsets. -
ZPARAMS
public static final int ZPARAMSThe struct member offsets.
-
-
Constructor Details
-
ZDICTCoverParams
Creates aZDICTCoverParamsinstance 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<ZDICTCoverParams>
-
k
public int k()segment size : constraint:0 < k: Reasonable range[16, 2048+] -
d
public int d()dmersize : constraint:0 < d <= k: Reasonable range[6, 16] -
steps
public int steps()Number of steps : Only used for optimization : 0 means default (40) : Higher means more parameters checked -
nbThreads
public int nbThreads()number of threads : constraint:0 < nbThreads: 1 means single-threaded : Only used for optimization : Ignored ifZSTD_MULTITHREADis not defined. -
splitPoint
public double splitPoint()percentage of samples used for training: Only used for optimization: the firstnbSamples * splitPointsamples will be used to training, the lastnbSamples * (1 - splitPoint)samples will be used for testing, 0 means default (1.0), 1.0 when all samples are used for both training and testing. -
zParams
- Returns:
- a
ZDICTParamsview of thezParamsfield.
-
k
Sets the specified value to thek()field. -
d
Sets the specified value to thed()field. -
steps
Sets the specified value to thesteps()field. -
nbThreads
Sets the specified value to thenbThreads()field. -
splitPoint
Sets the specified value to thesplitPoint()field. -
zParams
Copies the specifiedZDICTParamsto thezParamsfield. -
zParams
Passes thezParamsfield to the specifiedConsumer. -
set
public ZDICTCoverParams set(int k, int d, int steps, int nbThreads, double splitPoint, ZDICTParams zParams) 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 newZDICTCoverParamsinstance allocated withmemAlloc. The instance must be explicitly freed. -
calloc
Returns a newZDICTCoverParamsinstance allocated withmemCalloc. The instance must be explicitly freed. -
create
Returns a newZDICTCoverParamsinstance allocated withBufferUtils. -
create
Returns a newZDICTCoverParamsinstance for the specified memory address. -
createSafe
-
malloc
Returns a newZDICTCoverParams.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
Returns a newZDICTCoverParams.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
Returns a newZDICTCoverParams.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
Create aZDICTCoverParams.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
createSafe
-
mallocStack
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(MemoryStack)instead. -
callocStack
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(MemoryStack)instead. -
mallocStack
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(MemoryStack)instead. -
callocStack
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(MemoryStack)instead. -
mallocStack
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(int, MemoryStack)instead. -
callocStack
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(int, MemoryStack)instead. -
mallocStack
@Deprecated public static ZDICTCoverParams.Buffer mallocStack(int capacity, org.lwjgl.system.MemoryStack stack) Deprecated.Deprecated for removal in 3.4.0. Usemalloc(int, MemoryStack)instead. -
callocStack
@Deprecated public static ZDICTCoverParams.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack) Deprecated.Deprecated for removal in 3.4.0. Usecalloc(int, MemoryStack)instead. -
malloc
Returns a newZDICTCoverParamsinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
calloc
Returns a newZDICTCoverParamsinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocate
-
malloc
Returns a newZDICTCoverParams.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
capacity- the buffer capacitystack- the stack from which to allocate
-
calloc
Returns a newZDICTCoverParams.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
capacity- the buffer capacitystack- the stack from which to allocate
-
nk
public static int nk(long struct) Unsafe version ofk(). -
nd
public static int nd(long struct) Unsafe version ofd(). -
nsteps
public static int nsteps(long struct) Unsafe version ofsteps(). -
nnbThreads
public static int nnbThreads(long struct) Unsafe version ofnbThreads(). -
nsplitPoint
public static double nsplitPoint(long struct) Unsafe version ofsplitPoint(). -
nzParams
Unsafe version ofzParams(). -
nk
public static void nk(long struct, int value) Unsafe version ofk. -
nd
public static void nd(long struct, int value) Unsafe version ofd. -
nsteps
public static void nsteps(long struct, int value) Unsafe version ofsteps. -
nnbThreads
public static void nnbThreads(long struct, int value) Unsafe version ofnbThreads. -
nsplitPoint
public static void nsplitPoint(long struct, double value) Unsafe version ofsplitPoint. -
nzParams
Unsafe version ofzParams.
-