Package org.lwjgl.util.zstd
Class ZDICTFastCoverParams
- All Implemented Interfaces:
AutoCloseable
,NativeResource
,Pointer
k
and d
are the only required parameters. For others, value 0 means default.
Layout
struct ZDICT_fastCover_params_t {
unsigned k()
;
unsigned d()
;
unsigned f()
;
unsigned steps()
;
unsigned nbThreads()
;
double splitPoint()
;
unsigned accel()
;
ZDICT_params_t
zParams;
}
-
Nested Class Summary
Nested classes/interfaces inherited from class org.lwjgl.system.Struct
Struct.StructValidation
Nested classes/interfaces inherited from interface org.lwjgl.system.Pointer
Pointer.Default
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
The struct member offsets.static final int
The struct alignment in bytes.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct size in bytes.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct member offsets.Fields inherited from interface org.lwjgl.system.Pointer
BITS32, BITS64, CLONG_SHIFT, CLONG_SIZE, POINTER_SHIFT, POINTER_SIZE
-
Constructor Summary
ConstructorDescriptionZDICTFastCoverParams
(ByteBuffer container) Creates aZDICTFastCoverParams
instance at the current position of the specifiedByteBuffer
container. -
Method Summary
Modifier and TypeMethodDescriptionint
accel()
acceleration level: constraint:0 < accel <= 10
, higher means faster and less accurate, 0 means default(1)accel
(int value) Sets the specified value to theaccel()
field.static ZDICTFastCoverParams
calloc()
Returns a newZDICTFastCoverParams
instance allocated withmemCalloc
.static ZDICTFastCoverParams.Buffer
calloc
(int capacity) Returns a newZDICTFastCoverParams.Buffer
instance allocated withmemCalloc
.static ZDICTFastCoverParams.Buffer
calloc
(int capacity, MemoryStack stack) Returns a newZDICTFastCoverParams.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static ZDICTFastCoverParams
calloc
(MemoryStack stack) Returns a newZDICTFastCoverParams
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static ZDICTFastCoverParams
Deprecated.static ZDICTFastCoverParams.Buffer
callocStack
(int capacity) Deprecated.static ZDICTFastCoverParams.Buffer
callocStack
(int capacity, MemoryStack stack) Deprecated.static ZDICTFastCoverParams
callocStack
(MemoryStack stack) Deprecated.static ZDICTFastCoverParams
create()
Returns a newZDICTFastCoverParams
instance allocated withBufferUtils
.static ZDICTFastCoverParams.Buffer
create
(int capacity) Returns a newZDICTFastCoverParams.Buffer
instance allocated withBufferUtils
.static ZDICTFastCoverParams
create
(long address) Returns a newZDICTFastCoverParams
instance for the specified memory address.static ZDICTFastCoverParams.Buffer
create
(long address, int capacity) Create aZDICTFastCoverParams.Buffer
instance at the specified memory.static ZDICTFastCoverParams
createSafe
(long address) static ZDICTFastCoverParams.Buffer
createSafe
(long address, int capacity) int
d()
dmer
size : constraint:0 < d <= k
: Reasonable range[6, 16]
d
(int value) Sets the specified value to thed()
field.int
f()
log of size of frequency array : constraint:0 < f <= 31
: 1 means default(20)f
(int value) Sets the specified value to thef()
field.int
k()
segment size : constraint:0 < k
: Reasonable range[16, 2048+]
k
(int value) Sets the specified value to thek()
field.static ZDICTFastCoverParams
malloc()
Returns a newZDICTFastCoverParams
instance allocated withmemAlloc
.static ZDICTFastCoverParams.Buffer
malloc
(int capacity) Returns a newZDICTFastCoverParams.Buffer
instance allocated withmemAlloc
.static ZDICTFastCoverParams.Buffer
malloc
(int capacity, MemoryStack stack) Returns a newZDICTFastCoverParams.Buffer
instance allocated on the specifiedMemoryStack
.static ZDICTFastCoverParams
malloc
(MemoryStack stack) Returns a newZDICTFastCoverParams
instance allocated on the specifiedMemoryStack
.static ZDICTFastCoverParams
Deprecated.static ZDICTFastCoverParams.Buffer
mallocStack
(int capacity) Deprecated.static ZDICTFastCoverParams.Buffer
mallocStack
(int capacity, MemoryStack stack) Deprecated.static ZDICTFastCoverParams
mallocStack
(MemoryStack stack) Deprecated.static int
naccel
(long struct) Unsafe version ofaccel()
.static void
naccel
(long struct, int value) Unsafe version ofaccel
.int
number of threads : constraint:0 < nbThreads
: 1 means single-threaded : Only used for optimization : Ignored ifZSTD_MULTITHREAD
is not defined.nbThreads
(int value) Sets the specified value to thenbThreads()
field.static int
nd
(long struct) Unsafe version ofd()
.static void
nd
(long struct, int value) Unsafe version ofd
.static int
nf
(long struct) Unsafe version off()
.static void
nf
(long struct, int value) Unsafe version off
.static int
nk
(long struct) Unsafe version ofk()
.static void
nk
(long struct, int value) Unsafe version ofk
.static int
nnbThreads
(long struct) Unsafe version ofnbThreads()
.static void
nnbThreads
(long struct, int value) Unsafe version ofnbThreads
.static double
nsplitPoint
(long struct) Unsafe version ofsplitPoint()
.static void
nsplitPoint
(long struct, double value) Unsafe version ofsplitPoint
.static int
nsteps
(long struct) Unsafe version ofsteps()
.static void
nsteps
(long struct, int value) Unsafe version ofsteps
.static ZDICTParams
nzParams
(long struct) Unsafe version ofzParams()
.static void
nzParams
(long struct, ZDICTParams value) Unsafe version ofzParams
.set
(int k, int d, int f, int steps, int nbThreads, double splitPoint, int accel, ZDICTParams zParams) Initializes this struct with the specified values.set
(ZDICTFastCoverParams src) Copies the specified struct data to this struct.int
sizeof()
Returnssizeof(struct)
.double
percentage of samples used for training: Only used for optimization: the firstnbSamples * splitPoint
samples will be used to training, the lastnbSamples * (1 - splitPoint)
samples will be used for testing, 0 means default (0.75), 1.0 when all samples are used for both training and testing.splitPoint
(double value) Sets the specified value to thesplitPoint()
field.int
steps()
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 thezParams
field to the specifiedConsumer
.zParams
(ZDICTParams value) Copies the specifiedZDICTParams
to thezParams
field.Methods inherited from class org.lwjgl.system.Pointer.Default
address, equals, hashCode, toString
Methods 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. -
F
public static final int FThe 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. -
ACCEL
public static final int ACCELThe struct member offsets. -
ZPARAMS
public static final int ZPARAMSThe struct member offsets.
-
-
Constructor Details
-
ZDICTFastCoverParams
Creates aZDICTFastCoverParams
instance at the current position of the specifiedByteBuffer
container. 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()Description copied from class:Struct
Returnssizeof(struct)
.- Specified by:
sizeof
in classStruct<ZDICTFastCoverParams>
-
k
public int k()segment size : constraint:0 < k
: Reasonable range[16, 2048+]
-
d
public int d()dmer
size : constraint:0 < d <= k
: Reasonable range[6, 16]
-
f
public int f()log of size of frequency array : constraint:0 < f <= 31
: 1 means default(20) -
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_MULTITHREAD
is not defined. -
splitPoint
public double splitPoint()percentage of samples used for training: Only used for optimization: the firstnbSamples * splitPoint
samples will be used to training, the lastnbSamples * (1 - splitPoint)
samples will be used for testing, 0 means default (0.75), 1.0 when all samples are used for both training and testing. -
accel
public int accel()acceleration level: constraint:0 < accel <= 10
, higher means faster and less accurate, 0 means default(1) -
zParams
- Returns:
- a
ZDICTParams
view of thezParams
field.
-
k
Sets the specified value to thek()
field. -
d
Sets the specified value to thed()
field. -
f
Sets the specified value to thef()
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. -
accel
Sets the specified value to theaccel()
field. -
zParams
Copies the specifiedZDICTParams
to thezParams
field. -
zParams
Passes thezParams
field to the specifiedConsumer
. -
set
public ZDICTFastCoverParams set(int k, int d, int f, int steps, int nbThreads, double splitPoint, int accel, 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 newZDICTFastCoverParams
instance allocated withmemAlloc
. The instance must be explicitly freed. -
calloc
Returns a newZDICTFastCoverParams
instance allocated withmemCalloc
. The instance must be explicitly freed. -
create
Returns a newZDICTFastCoverParams
instance allocated withBufferUtils
. -
create
Returns a newZDICTFastCoverParams
instance for the specified memory address. -
createSafe
-
malloc
Returns a newZDICTFastCoverParams.Buffer
instance allocated withmemAlloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
calloc
Returns a newZDICTFastCoverParams.Buffer
instance allocated withmemCalloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
create
Returns a newZDICTFastCoverParams.Buffer
instance allocated withBufferUtils
.- Parameters:
capacity
- the buffer capacity
-
create
Create aZDICTFastCoverParams.Buffer
instance 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.Deprecated for removal in 3.4.0. Usemalloc(int, MemoryStack)
instead. -
callocStack
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(int, MemoryStack)
instead. -
malloc
Returns a newZDICTFastCoverParams
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocate
-
calloc
Returns a newZDICTFastCoverParams
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocate
-
malloc
Returns a newZDICTFastCoverParams.Buffer
instance allocated on the specifiedMemoryStack
.- Parameters:
capacity
- the buffer capacitystack
- the stack from which to allocate
-
calloc
Returns a newZDICTFastCoverParams.Buffer
instance allocated on the specifiedMemoryStack
and 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()
. -
nf
public static int nf(long struct) Unsafe version off()
. -
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()
. -
naccel
public static int naccel(long struct) Unsafe version ofaccel()
. -
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
. -
nf
public static void nf(long struct, int value) Unsafe version off
. -
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
. -
naccel
public static void naccel(long struct, int value) Unsafe version ofaccel
. -
nzParams
Unsafe version ofzParams
.
-