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.NativeResourcekanddare the only required parameters. For others, value 0 means default.Member documentation
k– segment size : constraint:0 < k: Reasonable range[16, 2048+]d–dmersize : constraint:0 < d <= k: Reasonable range[6, 16]steps– Number of steps : Only used for optimization : 0 means default (32) : Higher means more parameters checkednbThreads– Number of threads : constraint:0 < nbThreads: 1 means single-threaded : Only used for optimization : Ignored ifZSTD_MULTITHREADis not defined.
Layout
struct ZDICT_cover_params_t { unsigned k; unsigned d; unsigned steps; unsigned nbThreads;ZDICT_params_tzParams; }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classZDICTCoverParams.BufferAn array ofZDICTCoverParamsstructs.
-
Constructor Summary
Constructors Constructor Description ZDICTCoverParams(java.nio.ByteBuffer container)Creates aZDICTCoverParamsinstance at the current position of the specifiedByteBuffercontainer.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ZDICTCoverParamscalloc()Returns a newZDICTCoverParamsinstance allocated withmemCalloc.static ZDICTCoverParams.Buffercalloc(int capacity)Returns a newZDICTCoverParams.Bufferinstance allocated withmemCalloc.static ZDICTCoverParamscallocStack()Returns a newZDICTCoverParamsinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.static ZDICTCoverParams.BuffercallocStack(int capacity)Returns a newZDICTCoverParams.Bufferinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.static ZDICTCoverParams.BuffercallocStack(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newZDICTCoverParams.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static ZDICTCoverParamscallocStack(org.lwjgl.system.MemoryStack stack)Returns a newZDICTCoverParamsinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.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 ZDICTCoverParamscreateSafe(long address)static ZDICTCoverParams.BuffercreateSafe(long address, int capacity)intd()Returns the value of thedfield.ZDICTCoverParamsd(int value)Sets the specified value to thedfield.intk()Returns the value of thekfield.ZDICTCoverParamsk(int value)Sets the specified value to thekfield.static ZDICTCoverParamsmalloc()Returns a newZDICTCoverParamsinstance allocated withmemAlloc.static ZDICTCoverParams.Buffermalloc(int capacity)Returns a newZDICTCoverParams.Bufferinstance allocated withmemAlloc.static ZDICTCoverParamsmallocStack()Returns a newZDICTCoverParamsinstance allocated on the thread-localMemoryStack.static ZDICTCoverParams.BuffermallocStack(int capacity)Returns a newZDICTCoverParams.Bufferinstance allocated on the thread-localMemoryStack.static ZDICTCoverParams.BuffermallocStack(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newZDICTCoverParams.Bufferinstance allocated on the specifiedMemoryStack.static ZDICTCoverParamsmallocStack(org.lwjgl.system.MemoryStack stack)Returns a newZDICTCoverParamsinstance allocated on the specifiedMemoryStack.intnbThreads()Returns the value of thenbThreadsfield.ZDICTCoverParamsnbThreads(int value)Sets the specified value to thenbThreadsfield.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 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.ZDICTCoverParamsset(int k, int d, int steps, int nbThreads, ZDICTParams zParams)Initializes this struct with the specified values.ZDICTCoverParamsset(ZDICTCoverParams src)Copies the specified struct data to this struct.intsizeof()intsteps()Returns the value of thestepsfield.ZDICTCoverParamssteps(int value)Sets the specified value to thestepsfield.ZDICTParamszParams()Returns aZDICTParamsview of thezParamsfield.ZDICTCoverParamszParams(java.util.function.Consumer<ZDICTParams> consumer)Passes thezParamsfield to the specifiedConsumer.ZDICTCoverParamszParams(ZDICTParams value)Copies the specifiedZDICTParamsto thezParamsfield.
-
-
-
Constructor Detail
-
ZDICTCoverParams
public ZDICTCoverParams(java.nio.ByteBuffer container)
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 Detail
-
sizeof
public int sizeof()
- Specified by:
sizeofin classorg.lwjgl.system.Struct
-
k
public int k()
Returns the value of thekfield.
-
d
public int d()
Returns the value of thedfield.
-
steps
public int steps()
Returns the value of thestepsfield.
-
nbThreads
public int nbThreads()
Returns the value of thenbThreadsfield.
-
zParams
public ZDICTParams zParams()
Returns aZDICTParamsview of thezParamsfield.
-
zParams
public ZDICTCoverParams zParams(java.util.function.Consumer<ZDICTParams> consumer)
Passes thezParamsfield to the specifiedConsumer.
-
k
public ZDICTCoverParams k(int value)
Sets the specified value to thekfield.
-
d
public ZDICTCoverParams d(int value)
Sets the specified value to thedfield.
-
steps
public ZDICTCoverParams steps(int value)
Sets the specified value to thestepsfield.
-
nbThreads
public ZDICTCoverParams nbThreads(int value)
Sets the specified value to thenbThreadsfield.
-
zParams
public ZDICTCoverParams zParams(ZDICTParams value)
Copies the specifiedZDICTParamsto thezParamsfield.
-
set
public ZDICTCoverParams set(int k, int d, int steps, int nbThreads, 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 newZDICTCoverParamsinstance allocated withmemAlloc. The instance must be explicitly freed.
-
calloc
public static ZDICTCoverParams calloc()
Returns a newZDICTCoverParamsinstance allocated withmemCalloc. The instance must be explicitly freed.
-
create
public static ZDICTCoverParams create()
Returns a newZDICTCoverParamsinstance allocated withBufferUtils.
-
create
public static ZDICTCoverParams create(long address)
Returns a newZDICTCoverParamsinstance for the specified memory address.
-
createSafe
@Nullable public static ZDICTCoverParams createSafe(long address)
-
malloc
public static ZDICTCoverParams.Buffer malloc(int capacity)
Returns a newZDICTCoverParams.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
public static ZDICTCoverParams.Buffer calloc(int capacity)
Returns a newZDICTCoverParams.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
public static ZDICTCoverParams.Buffer create(int capacity)
Returns a newZDICTCoverParams.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
public static ZDICTCoverParams.Buffer create(long address, int capacity)
Create aZDICTCoverParams.Bufferinstance 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 newZDICTCoverParamsinstance allocated on the thread-localMemoryStack.
-
callocStack
public static ZDICTCoverParams callocStack()
Returns a newZDICTCoverParamsinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.
-
mallocStack
public static ZDICTCoverParams mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a newZDICTCoverParamsinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
callocStack
public static ZDICTCoverParams callocStack(org.lwjgl.system.MemoryStack stack)
Returns a newZDICTCoverParamsinstance allocated on the specifiedMemoryStackand 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.Bufferinstance allocated on the thread-localMemoryStack.- Parameters:
capacity- the buffer capacity
-
callocStack
public static ZDICTCoverParams.Buffer callocStack(int capacity)
Returns a newZDICTCoverParams.Bufferinstance allocated on the thread-localMemoryStackand 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.Bufferinstance 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.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().
-
nsteps
public static int nsteps(long struct)
Unsafe version ofsteps().
-
nnbThreads
public static int nnbThreads(long struct)
Unsafe version ofnbThreads().
-
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.
-
nzParams
public static void nzParams(long struct, ZDICTParams value)Unsafe version ofzParams.
-
-