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.NativeResourcekanddare the only required parameters. For others, value 0 means default.Layout
struct ZDICT_fastCover_params_t { unsignedk(); unsignedd(); unsignedf(); unsignedsteps(); unsignednbThreads(); doublesplitPoint(); unsignedaccel();ZDICT_params_tzParams; }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classZDICTFastCoverParams.BufferAn array ofZDICTFastCoverParamsstructs.
-
Field Summary
Fields Modifier and Type Field Description static intACCELThe struct member offsets.static intALIGNOFThe struct alignment in bytes.static intD
F
K
NBTHREADSThe struct member offsets.static intSIZEOFThe struct size in bytes.static intSPLITPOINT
STEPS
ZPARAMSThe struct member offsets.
-
Constructor Summary
Constructors Constructor Description ZDICTFastCoverParams(java.nio.ByteBuffer container)Creates aZDICTFastCoverParamsinstance at the current position of the specifiedByteBuffercontainer.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description intaccel()acceleration level: constraint:0 < accel <= 10, higher means faster and less accurate, 0 means default(1)ZDICTFastCoverParamsaccel(int value)Sets the specified value to theaccel()field.static ZDICTFastCoverParamscalloc()Returns a newZDICTFastCoverParamsinstance allocated withmemCalloc.static ZDICTFastCoverParams.Buffercalloc(int capacity)Returns a newZDICTFastCoverParams.Bufferinstance allocated withmemCalloc.static ZDICTFastCoverParams.Buffercalloc(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newZDICTFastCoverParams.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static ZDICTFastCoverParamscalloc(org.lwjgl.system.MemoryStack stack)Returns a newZDICTFastCoverParamsinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static ZDICTFastCoverParamscallocStack()Deprecated.static ZDICTFastCoverParams.BuffercallocStack(int capacity)Deprecated.static ZDICTFastCoverParams.BuffercallocStack(int capacity, org.lwjgl.system.MemoryStack stack)Deprecated.static ZDICTFastCoverParamscallocStack(org.lwjgl.system.MemoryStack stack)Deprecated.static ZDICTFastCoverParamscreate()Returns a newZDICTFastCoverParamsinstance allocated withBufferUtils.static ZDICTFastCoverParams.Buffercreate(int capacity)Returns a newZDICTFastCoverParams.Bufferinstance allocated withBufferUtils.static ZDICTFastCoverParamscreate(long address)Returns a newZDICTFastCoverParamsinstance for the specified memory address.static ZDICTFastCoverParams.Buffercreate(long address, int capacity)Create aZDICTFastCoverParams.Bufferinstance at the specified memory.static ZDICTFastCoverParamscreateSafe(long address)static ZDICTFastCoverParams.BuffercreateSafe(long address, int capacity)intd()dmersize : constraint:0 < d <= k: Reasonable range[6, 16]ZDICTFastCoverParamsd(int value)Sets the specified value to thed()field.intf()log of size of frequency array : constraint:0 < f <= 31: 1 means default(20)ZDICTFastCoverParamsf(int value)Sets the specified value to thef()field.intk()segment size : constraint:0 < k: Reasonable range[16, 2048+]ZDICTFastCoverParamsk(int value)Sets the specified value to thek()field.static ZDICTFastCoverParamsmalloc()Returns a newZDICTFastCoverParamsinstance allocated withmemAlloc.static ZDICTFastCoverParams.Buffermalloc(int capacity)Returns a newZDICTFastCoverParams.Bufferinstance allocated withmemAlloc.static ZDICTFastCoverParams.Buffermalloc(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newZDICTFastCoverParams.Bufferinstance allocated on the specifiedMemoryStack.static ZDICTFastCoverParamsmalloc(org.lwjgl.system.MemoryStack stack)Returns a newZDICTFastCoverParamsinstance allocated on the specifiedMemoryStack.static ZDICTFastCoverParamsmallocStack()Deprecated.static ZDICTFastCoverParams.BuffermallocStack(int capacity)Deprecated.static ZDICTFastCoverParams.BuffermallocStack(int capacity, org.lwjgl.system.MemoryStack stack)Deprecated.static ZDICTFastCoverParamsmallocStack(org.lwjgl.system.MemoryStack stack)Deprecated.static intnaccel(long struct)Unsafe version ofaccel().static voidnaccel(long struct, int value)Unsafe version ofaccel.intnbThreads()number of threads : constraint:0 < nbThreads: 1 means single-threaded : Only used for optimization : Ignored ifZSTD_MULTITHREADis not defined.ZDICTFastCoverParamsnbThreads(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 intnf(long struct)Unsafe version off().static voidnf(long struct, int value)Unsafe version off.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.ZDICTFastCoverParamsset(int k, int d, int f, int steps, int nbThreads, double splitPoint, int accel, ZDICTParams zParams)Initializes this struct with the specified values.ZDICTFastCoverParamsset(ZDICTFastCoverParams src)Copies the specified struct data to this struct.intsizeof()doublesplitPoint()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 (0.75), 1.0 when all samples are used for both training and testing.ZDICTFastCoverParamssplitPoint(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 checkedZDICTFastCoverParamssteps(int value)Sets the specified value to thesteps()field.ZDICTParamszParams()ZDICTFastCoverParamszParams(java.util.function.Consumer<ZDICTParams> consumer)Passes thezParamsfield to the specifiedConsumer.ZDICTFastCoverParamszParams(ZDICTParams value)Copies the specifiedZDICTParamsto thezParamsfield.
-
-
-
Constructor Detail
-
ZDICTFastCoverParams
public ZDICTFastCoverParams(java.nio.ByteBuffer container)
Creates aZDICTFastCoverParamsinstance 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
-
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]
-
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_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 (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
public ZDICTParams zParams()
- Returns:
- a
ZDICTParamsview of thezParamsfield.
-
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 specifiedZDICTParamsto thezParamsfield.
-
zParams
public ZDICTFastCoverParams zParams(java.util.function.Consumer<ZDICTParams> consumer)
Passes thezParamsfield 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 newZDICTFastCoverParamsinstance allocated withmemAlloc. The instance must be explicitly freed.
-
calloc
public static ZDICTFastCoverParams calloc()
Returns a newZDICTFastCoverParamsinstance allocated withmemCalloc. The instance must be explicitly freed.
-
create
public static ZDICTFastCoverParams create()
Returns a newZDICTFastCoverParamsinstance allocated withBufferUtils.
-
create
public static ZDICTFastCoverParams create(long address)
Returns a newZDICTFastCoverParamsinstance for the specified memory address.
-
createSafe
@Nullable public static ZDICTFastCoverParams createSafe(long address)
-
malloc
public static ZDICTFastCoverParams.Buffer malloc(int capacity)
Returns a newZDICTFastCoverParams.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
public static ZDICTFastCoverParams.Buffer calloc(int capacity)
Returns a newZDICTFastCoverParams.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
public static ZDICTFastCoverParams.Buffer create(int capacity)
Returns a newZDICTFastCoverParams.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
public static ZDICTFastCoverParams.Buffer create(long address, int capacity)
Create aZDICTFastCoverParams.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
createSafe
@Nullable public static ZDICTFastCoverParams.Buffer createSafe(long address, int capacity)
-
mallocStack
@Deprecated public static ZDICTFastCoverParams mallocStack()
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(MemoryStack)instead.
-
callocStack
@Deprecated public static ZDICTFastCoverParams callocStack()
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(MemoryStack)instead.
-
mallocStack
@Deprecated public static ZDICTFastCoverParams mallocStack(org.lwjgl.system.MemoryStack stack)
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(MemoryStack)instead.
-
callocStack
@Deprecated public static ZDICTFastCoverParams callocStack(org.lwjgl.system.MemoryStack stack)
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(MemoryStack)instead.
-
mallocStack
@Deprecated public static ZDICTFastCoverParams.Buffer mallocStack(int capacity)
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(int, MemoryStack)instead.
-
callocStack
@Deprecated public static ZDICTFastCoverParams.Buffer callocStack(int capacity)
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(int, MemoryStack)instead.
-
mallocStack
@Deprecated public static ZDICTFastCoverParams.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 ZDICTFastCoverParams.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(int, MemoryStack)instead.
-
malloc
public static ZDICTFastCoverParams malloc(org.lwjgl.system.MemoryStack stack)
Returns a newZDICTFastCoverParamsinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
calloc
public static ZDICTFastCoverParams calloc(org.lwjgl.system.MemoryStack stack)
Returns a newZDICTFastCoverParamsinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocate
-
malloc
public static ZDICTFastCoverParams.Buffer malloc(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newZDICTFastCoverParams.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
calloc
public static ZDICTFastCoverParams.Buffer calloc(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newZDICTFastCoverParams.Bufferinstance allocated on the specifiedMemoryStackand 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.
-
-