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
    32-bit XXH state for stack allocation. Unstable API.

    Layout

     struct XXH32_state_t {
         unsigned total_len_32;
         unsigned large_len;
         unsigned v1;
         unsigned v2;
         unsigned v3;
         unsigned v4;
         unsigned mem32[4];
         unsigned memsize;
         unsigned reserved;
     }
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class and 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
    • Field Summary

      Fields 
      Modifier and Type Field and Description
      static int SIZEOF
      The struct size in bytes.
      • Fields inherited from interface org.lwjgl.system.Pointer

        POINTER_SHIFT, POINTER_SIZE
    • Constructor Summary

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

      • SIZEOF

        public static final int SIZEOF
        The struct size in bytes.
    • 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()
        Description copied from class: org.lwjgl.system.Struct
        Returns sizeof(struct).
        Specified by:
        sizeof in class org.lwjgl.system.Struct
      • total_len_32

        public int total_len_32()
        Returns the value of the total_len_32 field.
      • large_len

        public int large_len()
        Returns the value of the large_len field.
      • v1

        public int v1()
        Returns the value of the v1 field.
      • v2

        public int v2()
        Returns the value of the v2 field.
      • v3

        public int v3()
        Returns the value of the v3 field.
      • v4

        public int v4()
        Returns the value of the v4 field.
      • mem32

        public java.nio.IntBuffer mem32()
        Returns a IntBuffer view of the mem32 field.
      • mem32

        public int mem32(int index)
        Returns the value at the specified index of the mem32 field.
      • memsize

        public int memsize()
        Returns the value of the memsize field.
      • reserved

        public int reserved()
        Returns the value of the reserved field.
      • total_len_32

        public XXH32State total_len_32(int value)
        Sets the specified value to the total_len_32 field.
      • large_len

        public XXH32State large_len(int value)
        Sets the specified value to the large_len field.
      • v1

        public XXH32State v1(int value)
        Sets the specified value to the v1 field.
      • v2

        public XXH32State v2(int value)
        Sets the specified value to the v2 field.
      • v3

        public XXH32State v3(int value)
        Sets the specified value to the v3 field.
      • v4

        public XXH32State v4(int value)
        Sets the specified value to the v4 field.
      • mem32

        public XXH32State mem32(java.nio.IntBuffer value)
        Copies the specified IntBuffer to the mem32 field.
      • mem32

        public XXH32State mem32(int index,
                                int value)
        Sets the specified value at the specified index of the mem32 field.
      • memsize

        public XXH32State memsize(int value)
        Sets the specified value to the memsize field.
      • reserved

        public XXH32State reserved(int value)
        Sets the specified value to the reserved field.
      • set

        public XXH32State set(int total_len_32,
                              int large_len,
                              int v1,
                              int v2,
                              int v3,
                              int v4,
                              java.nio.IntBuffer mem32,
                              int memsize,
                              int reserved)
        Initializes this struct with the specified values.
      • set

        public XXH32State set(XXH32State src)
        Copies the specified struct data to this struct.
        Parameters:
        src - the source struct
        Returns:
        this struct
      • 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 or null if the 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
      • mallocStack

        public static XXH32State mallocStack()
        Returns a new XXH32State instance allocated on the thread-local MemoryStack.
      • callocStack

        public static XXH32State callocStack()
        Returns a new XXH32State instance allocated on the thread-local MemoryStack and initializes all its bits to zero.
      • mallocStack

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

        public static XXH32State callocStack(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
      • mallocStack

        public static XXH32State.Buffer mallocStack(int capacity)
        Returns a new XXH32State.Buffer instance allocated on the thread-local MemoryStack.
        Parameters:
        capacity - the buffer capacity
      • callocStack

        public static XXH32State.Buffer callocStack(int capacity)
        Returns a new XXH32State.Buffer instance allocated on the thread-local MemoryStack and initializes all its bits to zero.
        Parameters:
        capacity - the buffer capacity
      • mallocStack

        public static XXH32State.Buffer mallocStack(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
      • callocStack

        public static XXH32State.Buffer callocStack(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