Class XXH32State

  • All Implemented Interfaces:
    java.lang.AutoCloseable, org.lwjgl.system.NativeResource, org.lwjgl.system.Pointer

    public class XXH32State
    extends org.lwjgl.system.Struct
    implements org.lwjgl.system.NativeResource
    The opaque state struct for the XXH32 streaming API.

    Layout

    
     struct XXH32_state_t {
         XXH32_hash_t total_len_32();
         XXH32_hash_t large_len();
         XXH32_hash_t v()[4];
         XXH32_hash_t mem32()[4];
         XXH32_hash_t memsize();
         XXH32_hash_t reserved();
     }
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  XXH32State.Buffer
      An array of XXH32State structs.
      • Nested classes/interfaces inherited from interface org.lwjgl.system.Pointer

        org.lwjgl.system.Pointer.Default
      • Nested classes/interfaces inherited from class org.lwjgl.system.Struct

        org.lwjgl.system.Struct.StructValidation
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static int ALIGNOF
      The struct alignment in bytes.
      static int LARGE_LEN
      MEM32
      MEMSIZE
      RESERVED
      The struct member offsets.
      static int SIZEOF
      The struct size in bytes.
      static int TOTAL_LEN_32
      V
      The struct member offsets.
      • Fields inherited from interface org.lwjgl.system.Pointer

        BITS32, BITS64, CLONG_SHIFT, CLONG_SIZE, POINTER_SHIFT, POINTER_SIZE
    • Constructor Summary

      Constructors 
      Constructor Description
      XXH32State​(java.nio.ByteBuffer container)
      Creates a XXH32State instance at the current position of the specified ByteBuffer container.
    • Field Detail

      • SIZEOF

        The struct size in bytes.
      • ALIGNOF

        The struct alignment in bytes.
      • TOTAL_LEN_32, LARGE_LEN, V, MEM32, MEMSIZE, RESERVED

        The struct member offsets.
    • Constructor Detail

      • XXH32State

        public XXH32State​(java.nio.ByteBuffer container)
        Creates a XXH32State 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 Detail

      • sizeof

        public int sizeof()
        Specified by:
        sizeof in class org.lwjgl.system.Struct
      • total_len_32

        public int total_len_32()
        total length hashed, modulo 2^32
      • large_len

        public int large_len()
        whether the hash is ≥ 16 (handles total_len_32 overflow)
      • v

        public java.nio.IntBuffer v()
        
        public int v​(int index)
        
        accumulator lanes
      • mem32

        public java.nio.IntBuffer mem32()
        
        public int mem32​(int index)
        
        internal buffer for partial reads. Treated as unsigned char[16].
      • memsize

        public int memsize()
        amount of data in mem32
      • reserved

        public int reserved()
        reserved field. Do not read or write to it, it may be removed.
      • malloc

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

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

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

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

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

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

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

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

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

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

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

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

        @Deprecated
        public static XXH32State.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 XXH32State.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 XXH32State malloc​(org.lwjgl.system.MemoryStack stack)
        Returns a new XXH32State instance allocated on the specified MemoryStack.
        Parameters:
        stack - the stack from which to allocate
      • calloc

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

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

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

        public static int ntotal_len_32​(long struct)
        Unsafe version of total_len_32().
      • nlarge_len

        public static int nlarge_len​(long struct)
        Unsafe version of large_len().
      • nv

        public static java.nio.IntBuffer nv​(long struct)
        Unsafe version of v().
      • nv

        public static int nv​(long struct,
                             int index)
        Unsafe version of v.
      • nmem32

        public static java.nio.IntBuffer nmem32​(long struct)
        Unsafe version of mem32().
      • nmem32

        public static int nmem32​(long struct,
                                 int index)
        Unsafe version of mem32.
      • nmemsize

        public static int nmemsize​(long struct)
        Unsafe version of memsize().
      • nreserved

        public static int nreserved​(long struct)
        Unsafe version of reserved().