Class ZDICTCoverParams

java.lang.Object
org.lwjgl.system.Pointer.Default
org.lwjgl.system.Struct<ZDICTCoverParams>
org.lwjgl.util.zstd.ZDICTCoverParams
All Implemented Interfaces:
AutoCloseable, org.lwjgl.system.NativeResource, org.lwjgl.system.Pointer

public class ZDICTCoverParams extends org.lwjgl.system.Struct<ZDICTCoverParams> implements org.lwjgl.system.NativeResource
k and d are the only required parameters. For others, value 0 means default.

Layout


 struct ZDICT_cover_params_t {
     unsigned k();
     unsigned d();
     unsigned steps();
     unsigned nbThreads();
     double splitPoint();
     ZDICT_params_t zParams;
 }
  • Field Details

    • SIZEOF

      public static final int SIZEOF
      The struct size in bytes.
    • ALIGNOF

      public static final int ALIGNOF
      The struct alignment in bytes.
    • K

      public static final int K
      The struct member offsets.
    • D

      public static final int D
      The struct member offsets.
    • STEPS

      public static final int STEPS
      The struct member offsets.
    • NBTHREADS

      public static final int NBTHREADS
      The struct member offsets.
    • SPLITPOINT

      public static final int SPLITPOINT
      The struct member offsets.
    • ZPARAMS

      public static final int ZPARAMS
      The struct member offsets.
  • Constructor Details

    • ZDICTCoverParams

      public ZDICTCoverParams(ByteBuffer container)
      Creates a ZDICTCoverParams instance at the current position of the specified ByteBuffer 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()
      Specified by:
      sizeof in class org.lwjgl.system.Struct<ZDICTCoverParams>
    • 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]
    • 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 if ZSTD_MULTITHREAD is not defined.
    • splitPoint

      public double splitPoint()
      percentage of samples used for training: Only used for optimization: the first nbSamples * splitPoint samples will be used to training, the last nbSamples * (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.
    • zParams

      public ZDICTParams zParams()
      Returns:
      a ZDICTParams view of the zParams field.
    • k

      public ZDICTCoverParams k(int value)
      Sets the specified value to the k() field.
    • d

      public ZDICTCoverParams d(int value)
      Sets the specified value to the d() field.
    • steps

      public ZDICTCoverParams steps(int value)
      Sets the specified value to the steps() field.
    • nbThreads

      public ZDICTCoverParams nbThreads(int value)
      Sets the specified value to the nbThreads() field.
    • splitPoint

      public ZDICTCoverParams splitPoint(double value)
      Sets the specified value to the splitPoint() field.
    • zParams

      public ZDICTCoverParams zParams(ZDICTParams value)
      Copies the specified ZDICTParams to the zParams field.
    • zParams

      public ZDICTCoverParams zParams(Consumer<ZDICTParams> consumer)
      Passes the zParams field to the specified Consumer.
    • set

      public ZDICTCoverParams set(int k, int d, int steps, int nbThreads, double splitPoint, 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

      public static ZDICTCoverParams malloc()
      Returns a new ZDICTCoverParams instance allocated with memAlloc. The instance must be explicitly freed.
    • calloc

      public static ZDICTCoverParams calloc()
      Returns a new ZDICTCoverParams instance allocated with memCalloc. The instance must be explicitly freed.
    • create

      public static ZDICTCoverParams create()
      Returns a new ZDICTCoverParams instance allocated with BufferUtils.
    • create

      public static ZDICTCoverParams create(long address)
      Returns a new ZDICTCoverParams instance for the specified memory address.
    • createSafe

      public static @Nullable ZDICTCoverParams createSafe(long address)
      Like create, but returns null if address is NULL.
    • malloc

      public static ZDICTCoverParams.Buffer malloc(int capacity)
      Returns a new ZDICTCoverParams.Buffer instance allocated with memAlloc. The instance must be explicitly freed.
      Parameters:
      capacity - the buffer capacity
    • calloc

      public static ZDICTCoverParams.Buffer calloc(int capacity)
      Returns a new ZDICTCoverParams.Buffer instance allocated with memCalloc. The instance must be explicitly freed.
      Parameters:
      capacity - the buffer capacity
    • create

      public static ZDICTCoverParams.Buffer create(int capacity)
      Returns a new ZDICTCoverParams.Buffer instance allocated with BufferUtils.
      Parameters:
      capacity - the buffer capacity
    • create

      public static ZDICTCoverParams.Buffer create(long address, int capacity)
      Create a ZDICTCoverParams.Buffer instance at the specified memory.
      Parameters:
      address - the memory address
      capacity - the buffer capacity
    • createSafe

      public static @Nullable ZDICTCoverParams.Buffer createSafe(long address, int capacity)
      Like create, but returns null if address is NULL.
    • mallocStack

      @Deprecated public static ZDICTCoverParams mallocStack()
      Deprecated.
      Deprecated for removal in 3.4.0. Use malloc(MemoryStack) instead.
    • callocStack

      @Deprecated public static ZDICTCoverParams callocStack()
      Deprecated.
      Deprecated for removal in 3.4.0. Use calloc(MemoryStack) instead.
    • mallocStack

      @Deprecated public static ZDICTCoverParams mallocStack(org.lwjgl.system.MemoryStack stack)
      Deprecated.
      Deprecated for removal in 3.4.0. Use malloc(MemoryStack) instead.
    • callocStack

      @Deprecated public static ZDICTCoverParams callocStack(org.lwjgl.system.MemoryStack stack)
      Deprecated.
      Deprecated for removal in 3.4.0. Use calloc(MemoryStack) instead.
    • mallocStack

      @Deprecated public static ZDICTCoverParams.Buffer mallocStack(int capacity)
      Deprecated.
      Deprecated for removal in 3.4.0. Use malloc(int, MemoryStack) instead.
    • callocStack

      @Deprecated public static ZDICTCoverParams.Buffer callocStack(int capacity)
      Deprecated.
      Deprecated for removal in 3.4.0. Use calloc(int, MemoryStack) instead.
    • mallocStack

      @Deprecated public static ZDICTCoverParams.Buffer mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
      Deprecated.
      Deprecated for removal in 3.4.0. Use malloc(int, MemoryStack) instead.
    • callocStack

      @Deprecated public static ZDICTCoverParams.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
      Deprecated.
      Deprecated for removal in 3.4.0. Use calloc(int, MemoryStack) instead.
    • malloc

      public static ZDICTCoverParams malloc(org.lwjgl.system.MemoryStack stack)
      Returns a new ZDICTCoverParams instance allocated on the specified MemoryStack.
      Parameters:
      stack - the stack from which to allocate
    • calloc

      public static ZDICTCoverParams calloc(org.lwjgl.system.MemoryStack stack)
      Returns a new ZDICTCoverParams instance allocated on the specified MemoryStack and initializes all its bits to zero.
      Parameters:
      stack - the stack from which to allocate
    • malloc

      public static ZDICTCoverParams.Buffer malloc(int capacity, org.lwjgl.system.MemoryStack stack)
      Returns a new ZDICTCoverParams.Buffer instance allocated on the specified MemoryStack.
      Parameters:
      capacity - the buffer capacity
      stack - the stack from which to allocate
    • calloc

      public static ZDICTCoverParams.Buffer calloc(int capacity, org.lwjgl.system.MemoryStack stack)
      Returns a new ZDICTCoverParams.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero.
      Parameters:
      capacity - the buffer capacity
      stack - the stack from which to allocate
    • nk

      public static int nk(long struct)
      Unsafe version of k().
    • nd

      public static int nd(long struct)
      Unsafe version of d().
    • nsteps

      public static int nsteps(long struct)
      Unsafe version of steps().
    • nnbThreads

      public static int nnbThreads(long struct)
      Unsafe version of nbThreads().
    • nsplitPoint

      public static double nsplitPoint(long struct)
      Unsafe version of splitPoint().
    • nzParams

      public static ZDICTParams nzParams(long struct)
      Unsafe version of zParams().
    • nk

      public static void nk(long struct, int value)
      Unsafe version of k.
    • nd

      public static void nd(long struct, int value)
      Unsafe version of d.
    • nsteps

      public static void nsteps(long struct, int value)
      Unsafe version of steps.
    • nnbThreads

      public static void nnbThreads(long struct, int value)
      Unsafe version of nbThreads.
    • nsplitPoint

      public static void nsplitPoint(long struct, double value)
      Unsafe version of splitPoint.
    • nzParams

      public static void nzParams(long struct, ZDICTParams value)
      Unsafe version of zParams.