Package org.lwjgl.util.zstd
Class ZDICTCoverParams
- java.lang.Object
-
- org.lwjgl.system.Pointer.Default
-
- org.lwjgl.system.Struct
-
- org.lwjgl.util.zstd.ZDICTCoverParams
-
- All Implemented Interfaces:
java.lang.AutoCloseable
,org.lwjgl.system.NativeResource
,org.lwjgl.system.Pointer
public class ZDICTCoverParams 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]
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 (1.0), 1.0 when all samples are used for both training and testing.
Layout
struct ZDICT_cover_params_t { unsigned k; unsigned d; unsigned steps; unsigned nbThreads; double splitPoint;
ZDICT_params_t
zParams; }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ZDICTCoverParams.Buffer
An array ofZDICTCoverParams
structs.
-
Constructor Summary
Constructors Constructor Description ZDICTCoverParams(java.nio.ByteBuffer container)
Creates aZDICTCoverParams
instance at the current position of the specifiedByteBuffer
container.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ZDICTCoverParams
calloc()
Returns a newZDICTCoverParams
instance allocated withmemCalloc
.static ZDICTCoverParams.Buffer
calloc(int capacity)
Returns a newZDICTCoverParams.Buffer
instance allocated withmemCalloc
.static ZDICTCoverParams
callocStack()
Returns a newZDICTCoverParams
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.static ZDICTCoverParams.Buffer
callocStack(int capacity)
Returns a newZDICTCoverParams.Buffer
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.static ZDICTCoverParams.Buffer
callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newZDICTCoverParams.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static ZDICTCoverParams
callocStack(org.lwjgl.system.MemoryStack stack)
Returns a newZDICTCoverParams
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static ZDICTCoverParams
create()
Returns a newZDICTCoverParams
instance allocated withBufferUtils
.static ZDICTCoverParams.Buffer
create(int capacity)
Returns a newZDICTCoverParams.Buffer
instance allocated withBufferUtils
.static ZDICTCoverParams
create(long address)
Returns a newZDICTCoverParams
instance for the specified memory address.static ZDICTCoverParams.Buffer
create(long address, int capacity)
Create aZDICTCoverParams.Buffer
instance at the specified memory.static ZDICTCoverParams
createSafe(long address)
static ZDICTCoverParams.Buffer
createSafe(long address, int capacity)
int
d()
Returns the value of thed
field.ZDICTCoverParams
d(int value)
Sets the specified value to thed
field.int
k()
Returns the value of thek
field.ZDICTCoverParams
k(int value)
Sets the specified value to thek
field.static ZDICTCoverParams
malloc()
Returns a newZDICTCoverParams
instance allocated withmemAlloc
.static ZDICTCoverParams.Buffer
malloc(int capacity)
Returns a newZDICTCoverParams.Buffer
instance allocated withmemAlloc
.static ZDICTCoverParams
mallocStack()
Returns a newZDICTCoverParams
instance allocated on the thread-localMemoryStack
.static ZDICTCoverParams.Buffer
mallocStack(int capacity)
Returns a newZDICTCoverParams.Buffer
instance allocated on the thread-localMemoryStack
.static ZDICTCoverParams.Buffer
mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newZDICTCoverParams.Buffer
instance allocated on the specifiedMemoryStack
.static ZDICTCoverParams
mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a newZDICTCoverParams
instance allocated on the specifiedMemoryStack
.int
nbThreads()
Returns the value of thenbThreads
field.ZDICTCoverParams
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
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
.ZDICTCoverParams
set(int k, int d, int steps, int nbThreads, double splitPoint, ZDICTParams zParams)
Initializes this struct with the specified values.ZDICTCoverParams
set(ZDICTCoverParams src)
Copies the specified struct data to this struct.int
sizeof()
double
splitPoint()
Returns the value of thesplitPoint
field.ZDICTCoverParams
splitPoint(double value)
Sets the specified value to thesplitPoint
field.int
steps()
Returns the value of thesteps
field.ZDICTCoverParams
steps(int value)
Sets the specified value to thesteps
field.ZDICTParams
zParams()
Returns aZDICTParams
view of thezParams
field.ZDICTCoverParams
zParams(java.util.function.Consumer<ZDICTParams> consumer)
Passes thezParams
field to the specifiedConsumer
.ZDICTCoverParams
zParams(ZDICTParams value)
Copies the specifiedZDICTParams
to thezParams
field.
-
-
-
Constructor Detail
-
ZDICTCoverParams
public ZDICTCoverParams(java.nio.ByteBuffer container)
Creates aZDICTCoverParams
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.
-
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.
-
zParams
public ZDICTParams zParams()
Returns aZDICTParams
view of thezParams
field.
-
k
public ZDICTCoverParams k(int value)
Sets the specified value to thek
field.
-
d
public ZDICTCoverParams d(int value)
Sets the specified value to thed
field.
-
steps
public ZDICTCoverParams steps(int value)
Sets the specified value to thesteps
field.
-
nbThreads
public ZDICTCoverParams nbThreads(int value)
Sets the specified value to thenbThreads
field.
-
splitPoint
public ZDICTCoverParams splitPoint(double value)
Sets the specified value to thesplitPoint
field.
-
zParams
public ZDICTCoverParams zParams(ZDICTParams value)
Copies the specifiedZDICTParams
to thezParams
field.
-
zParams
public ZDICTCoverParams zParams(java.util.function.Consumer<ZDICTParams> consumer)
Passes thezParams
field 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
public ZDICTCoverParams set(ZDICTCoverParams src)
Copies the specified struct data to this struct.- Parameters:
src
- the source struct- Returns:
- this struct
-
malloc
public static ZDICTCoverParams malloc()
Returns a newZDICTCoverParams
instance allocated withmemAlloc
. The instance must be explicitly freed.
-
calloc
public static ZDICTCoverParams calloc()
Returns a newZDICTCoverParams
instance allocated withmemCalloc
. The instance must be explicitly freed.
-
create
public static ZDICTCoverParams create()
Returns a newZDICTCoverParams
instance allocated withBufferUtils
.
-
create
public static ZDICTCoverParams create(long address)
Returns a newZDICTCoverParams
instance for the specified memory address.
-
createSafe
@Nullable public static ZDICTCoverParams createSafe(long address)
-
malloc
public static ZDICTCoverParams.Buffer malloc(int capacity)
Returns a newZDICTCoverParams.Buffer
instance allocated withmemAlloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
calloc
public static ZDICTCoverParams.Buffer calloc(int capacity)
Returns a newZDICTCoverParams.Buffer
instance allocated withmemCalloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
create
public static ZDICTCoverParams.Buffer create(int capacity)
Returns a newZDICTCoverParams.Buffer
instance allocated withBufferUtils
.- Parameters:
capacity
- the buffer capacity
-
create
public static ZDICTCoverParams.Buffer create(long address, int capacity)
Create aZDICTCoverParams.Buffer
instance at the specified memory.- Parameters:
address
- the memory addresscapacity
- the buffer capacity
-
createSafe
@Nullable public static ZDICTCoverParams.Buffer createSafe(long address, int capacity)
-
mallocStack
public static ZDICTCoverParams mallocStack()
Returns a newZDICTCoverParams
instance allocated on the thread-localMemoryStack
.
-
callocStack
public static ZDICTCoverParams callocStack()
Returns a newZDICTCoverParams
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.
-
mallocStack
public static ZDICTCoverParams mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a newZDICTCoverParams
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocate
-
callocStack
public static ZDICTCoverParams callocStack(org.lwjgl.system.MemoryStack stack)
Returns a newZDICTCoverParams
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocate
-
mallocStack
public static ZDICTCoverParams.Buffer mallocStack(int capacity)
Returns a newZDICTCoverParams.Buffer
instance allocated on the thread-localMemoryStack
.- Parameters:
capacity
- the buffer capacity
-
callocStack
public static ZDICTCoverParams.Buffer callocStack(int capacity)
Returns a newZDICTCoverParams.Buffer
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.- Parameters:
capacity
- the buffer capacity
-
mallocStack
public static ZDICTCoverParams.Buffer mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newZDICTCoverParams.Buffer
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocatecapacity
- the buffer capacity
-
callocStack
public static ZDICTCoverParams.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newZDICTCoverParams.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()
.
-
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
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
.
-
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
public static void nzParams(long struct, ZDICTParams value)
Unsafe version ofzParams
.
-
-