Package org.lwjgl.util.zstd
Class ZDICTFastCoverParams
- java.lang.Object
-
- org.lwjgl.system.Pointer.Default
-
- org.lwjgl.system.Struct
-
- org.lwjgl.util.zstd.ZDICTFastCoverParams
-
- All Implemented Interfaces:
java.lang.AutoCloseable
,org.lwjgl.system.NativeResource
,org.lwjgl.system.Pointer
public class ZDICTFastCoverParams extends org.lwjgl.system.Struct implements org.lwjgl.system.NativeResource
k
andd
are the only required parameters. For others, value 0 means default.Member documentation
k
– segment size : constraint:0 < k
: Reasonable range[16, 2048+]
d
–dmer
size : constraint:0 < d <= k
: Reasonable range[6, 16]
f
– log of size of frequency array : constraint:0 < f <= 31
: 1 means default(20)steps
– Number of steps : Only used for optimization : 0 means default (40) : Higher means more parameters checkednbThreads
– number of threads : constraint:0 < nbThreads
: 1 means single-threaded : Only used for optimization : Ignored ifZSTD_MULTITHREAD
is not defined.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
– acceleration level: constraint:0 < accel <= 10
, higher means faster and less accurate, 0 means default(1)
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 Modifier and Type Class Description static class
ZDICTFastCoverParams.Buffer
An array ofZDICTFastCoverParams
structs.
-
Field Summary
Fields Modifier and Type Field Description static int
ACCEL
The struct member offsets.static int
ALIGNOF
The struct alignment in bytes.static int
D
F
K
NBTHREADSThe struct member offsets.static int
SIZEOF
The struct size in bytes.static int
SPLITPOINT
STEPS
ZPARAMSThe struct member offsets.
-
Constructor Summary
Constructors Constructor Description ZDICTFastCoverParams(java.nio.ByteBuffer container)
Creates aZDICTFastCoverParams
instance at the current position of the specifiedByteBuffer
container.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description int
accel()
Returns the value of theaccel
field.ZDICTFastCoverParams
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
callocStack()
Returns a newZDICTFastCoverParams
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.static ZDICTFastCoverParams.Buffer
callocStack(int capacity)
Returns a newZDICTFastCoverParams.Buffer
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.static ZDICTFastCoverParams.Buffer
callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newZDICTFastCoverParams.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static ZDICTFastCoverParams
callocStack(org.lwjgl.system.MemoryStack stack)
Returns a newZDICTFastCoverParams
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.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()
Returns the value of thed
field.ZDICTFastCoverParams
d(int value)
Sets the specified value to thed
field.int
f()
Returns the value of thef
field.ZDICTFastCoverParams
f(int value)
Sets the specified value to thef
field.int
k()
Returns the value of thek
field.ZDICTFastCoverParams
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
mallocStack()
Returns a newZDICTFastCoverParams
instance allocated on the thread-localMemoryStack
.static ZDICTFastCoverParams.Buffer
mallocStack(int capacity)
Returns a newZDICTFastCoverParams.Buffer
instance allocated on the thread-localMemoryStack
.static ZDICTFastCoverParams.Buffer
mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newZDICTFastCoverParams.Buffer
instance allocated on the specifiedMemoryStack
.static ZDICTFastCoverParams
mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a newZDICTFastCoverParams
instance allocated on the specifiedMemoryStack
.static int
naccel(long struct)
Unsafe version ofaccel()
.static void
naccel(long struct, int value)
Unsafe version ofaccel
.int
nbThreads()
Returns the value of thenbThreads
field.ZDICTFastCoverParams
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
.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.ZDICTFastCoverParams
set(ZDICTFastCoverParams src)
Copies the specified struct data to this struct.int
sizeof()
double
splitPoint()
Returns the value of thesplitPoint
field.ZDICTFastCoverParams
splitPoint(double value)
Sets the specified value to thesplitPoint
field.int
steps()
Returns the value of thesteps
field.ZDICTFastCoverParams
steps(int value)
Sets the specified value to thesteps
field.ZDICTParams
zParams()
Returns aZDICTParams
view of thezParams
field.ZDICTFastCoverParams
zParams(java.util.function.Consumer<ZDICTParams> consumer)
Passes thezParams
field to the specifiedConsumer
.ZDICTFastCoverParams
zParams(ZDICTParams value)
Copies the specifiedZDICTParams
to thezParams
field.
-
-
-
Constructor Detail
-
ZDICTFastCoverParams
public ZDICTFastCoverParams(java.nio.ByteBuffer container)
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 Detail
-
sizeof
public int sizeof()
- Specified by:
sizeof
in classorg.lwjgl.system.Struct
-
k
public int k()
Returns the value of thek
field.
-
d
public int d()
Returns the value of thed
field.
-
f
public int f()
Returns the value of thef
field.
-
steps
public int steps()
Returns the value of thesteps
field.
-
nbThreads
public int nbThreads()
Returns the value of thenbThreads
field.
-
splitPoint
public double splitPoint()
Returns the value of thesplitPoint
field.
-
accel
public int accel()
Returns the value of theaccel
field.
-
zParams
public ZDICTParams zParams()
Returns aZDICTParams
view of thezParams
field.
-
k
public ZDICTFastCoverParams k(int value)
Sets the specified value to thek
field.
-
d
public ZDICTFastCoverParams d(int value)
Sets the specified value to thed
field.
-
f
public ZDICTFastCoverParams f(int value)
Sets the specified value to thef
field.
-
steps
public ZDICTFastCoverParams steps(int value)
Sets the specified value to thesteps
field.
-
nbThreads
public ZDICTFastCoverParams nbThreads(int value)
Sets the specified value to thenbThreads
field.
-
splitPoint
public ZDICTFastCoverParams splitPoint(double value)
Sets the specified value to thesplitPoint
field.
-
accel
public ZDICTFastCoverParams accel(int value)
Sets the specified value to theaccel
field.
-
zParams
public ZDICTFastCoverParams zParams(ZDICTParams value)
Copies the specifiedZDICTParams
to thezParams
field.
-
zParams
public ZDICTFastCoverParams zParams(java.util.function.Consumer<ZDICTParams> consumer)
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
public ZDICTFastCoverParams set(ZDICTFastCoverParams src)
Copies the specified struct data to this struct.- Parameters:
src
- the source struct- Returns:
- this struct
-
malloc
public static ZDICTFastCoverParams malloc()
Returns a newZDICTFastCoverParams
instance allocated withmemAlloc
. The instance must be explicitly freed.
-
calloc
public static ZDICTFastCoverParams calloc()
Returns a newZDICTFastCoverParams
instance allocated withmemCalloc
. The instance must be explicitly freed.
-
create
public static ZDICTFastCoverParams create()
Returns a newZDICTFastCoverParams
instance allocated withBufferUtils
.
-
create
public static ZDICTFastCoverParams create(long address)
Returns a newZDICTFastCoverParams
instance for the specified memory address.
-
createSafe
@Nullable public static ZDICTFastCoverParams createSafe(long address)
-
malloc
public static ZDICTFastCoverParams.Buffer malloc(int capacity)
Returns a newZDICTFastCoverParams.Buffer
instance allocated withmemAlloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
calloc
public static ZDICTFastCoverParams.Buffer calloc(int capacity)
Returns a newZDICTFastCoverParams.Buffer
instance allocated withmemCalloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
create
public static ZDICTFastCoverParams.Buffer create(int capacity)
Returns a newZDICTFastCoverParams.Buffer
instance allocated withBufferUtils
.- Parameters:
capacity
- the buffer capacity
-
create
public static ZDICTFastCoverParams.Buffer create(long address, int capacity)
Create aZDICTFastCoverParams.Buffer
instance at the specified memory.- Parameters:
address
- the memory addresscapacity
- the buffer capacity
-
createSafe
@Nullable public static ZDICTFastCoverParams.Buffer createSafe(long address, int capacity)
-
mallocStack
public static ZDICTFastCoverParams mallocStack()
Returns a newZDICTFastCoverParams
instance allocated on the thread-localMemoryStack
.
-
callocStack
public static ZDICTFastCoverParams callocStack()
Returns a newZDICTFastCoverParams
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.
-
mallocStack
public static ZDICTFastCoverParams mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a newZDICTFastCoverParams
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocate
-
callocStack
public static ZDICTFastCoverParams callocStack(org.lwjgl.system.MemoryStack stack)
Returns a newZDICTFastCoverParams
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocate
-
mallocStack
public static ZDICTFastCoverParams.Buffer mallocStack(int capacity)
Returns a newZDICTFastCoverParams.Buffer
instance allocated on the thread-localMemoryStack
.- Parameters:
capacity
- the buffer capacity
-
callocStack
public static ZDICTFastCoverParams.Buffer callocStack(int capacity)
Returns a newZDICTFastCoverParams.Buffer
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.- Parameters:
capacity
- the buffer capacity
-
mallocStack
public static ZDICTFastCoverParams.Buffer mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newZDICTFastCoverParams.Buffer
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocatecapacity
- the buffer capacity
-
callocStack
public static ZDICTFastCoverParams.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newZDICTFastCoverParams.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocatecapacity
- the buffer capacity
-
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
public static ZDICTParams nzParams(long struct)
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
public static void nzParams(long struct, ZDICTParams value)
Unsafe version ofzParams
.
-
-