Package org.lwjgl.util.xxhash
Class XXH32State
- java.lang.Object
-
- org.lwjgl.system.Pointer.Default
-
- org.lwjgl.system.Struct
-
- org.lwjgl.util.xxhash.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.NativeResource32-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 classXXH32State.BufferAn array ofXXH32Statestructs.
-
Field Summary
Fields Modifier and Type Field and Description static intSIZEOFThe struct size in bytes.
-
Constructor Summary
Constructors Constructor and Description XXH32State(java.nio.ByteBuffer container)Creates aXXH32Stateinstance at the current position of the specifiedByteBuffercontainer.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method and Description static XXH32Statecalloc()Returns a newXXH32Stateinstance allocated withmemCalloc.static XXH32State.Buffercalloc(int capacity)Returns a newXXH32State.Bufferinstance allocated withmemCalloc.static XXH32StatecallocStack()Returns a newXXH32Stateinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.static XXH32State.BuffercallocStack(int capacity)Returns a newXXH32State.Bufferinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.static XXH32State.BuffercallocStack(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newXXH32State.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static XXH32StatecallocStack(org.lwjgl.system.MemoryStack stack)Returns a newXXH32Stateinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static XXH32Statecreate()Returns a newXXH32Stateinstance allocated withBufferUtils.static XXH32State.Buffercreate(int capacity)Returns a newXXH32State.Bufferinstance allocated withBufferUtils.static XXH32Statecreate(long address)static XXH32State.Buffercreate(long address, int capacity)Create aXXH32State.Bufferinstance at the specified memory.intlarge_len()Returns the value of thelarge_lenfield.XXH32Statelarge_len(int value)Sets the specified value to thelarge_lenfield.static XXH32Statemalloc()Returns a newXXH32Stateinstance allocated withmemAlloc.static XXH32State.Buffermalloc(int capacity)Returns a newXXH32State.Bufferinstance allocated withmemAlloc.static XXH32StatemallocStack()Returns a newXXH32Stateinstance allocated on the thread-localMemoryStack.static XXH32State.BuffermallocStack(int capacity)Returns a newXXH32State.Bufferinstance allocated on the thread-localMemoryStack.static XXH32State.BuffermallocStack(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newXXH32State.Bufferinstance allocated on the specifiedMemoryStack.static XXH32StatemallocStack(org.lwjgl.system.MemoryStack stack)Returns a newXXH32Stateinstance allocated on the specifiedMemoryStack.java.nio.IntBuffermem32()Returns aIntBufferview of themem32field.intmem32(int index)Returns the value at the specified index of themem32field.XXH32Statemem32(java.nio.IntBuffer value)Copies the specifiedIntBufferto themem32field.XXH32Statemem32(int index, int value)Sets the specified value at the specified index of themem32field.intmemsize()Returns the value of thememsizefield.XXH32Statememsize(int value)Sets the specified value to thememsizefield.intreserved()Returns the value of thereservedfield.XXH32Statereserved(int value)Sets the specified value to thereservedfield.XXH32Stateset(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.XXH32Stateset(XXH32State src)Copies the specified struct data to this struct.intsizeof()Returnssizeof(struct).inttotal_len_32()Returns the value of thetotal_len_32field.XXH32Statetotal_len_32(int value)Sets the specified value to thetotal_len_32field.intv1()Returns the value of thev1field.XXH32Statev1(int value)Sets the specified value to thev1field.intv2()Returns the value of thev2field.XXH32Statev2(int value)Sets the specified value to thev2field.intv3()Returns the value of thev3field.XXH32Statev3(int value)Sets the specified value to thev3field.intv4()Returns the value of thev4field.XXH32Statev4(int value)Sets the specified value to thev4field.
-
-
-
Constructor Detail
-
XXH32State
public XXH32State(java.nio.ByteBuffer container)
Creates aXXH32Stateinstance 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()
Description copied from class:org.lwjgl.system.StructReturnssizeof(struct).- Specified by:
sizeofin classorg.lwjgl.system.Struct
-
total_len_32
public int total_len_32()
Returns the value of thetotal_len_32field.
-
large_len
public int large_len()
Returns the value of thelarge_lenfield.
-
v1
public int v1()
Returns the value of thev1field.
-
v2
public int v2()
Returns the value of thev2field.
-
v3
public int v3()
Returns the value of thev3field.
-
v4
public int v4()
Returns the value of thev4field.
-
mem32
public java.nio.IntBuffer mem32()
Returns aIntBufferview of themem32field.
-
mem32
public int mem32(int index)
Returns the value at the specified index of themem32field.
-
memsize
public int memsize()
Returns the value of thememsizefield.
-
reserved
public int reserved()
Returns the value of thereservedfield.
-
total_len_32
public XXH32State total_len_32(int value)
Sets the specified value to thetotal_len_32field.
-
large_len
public XXH32State large_len(int value)
Sets the specified value to thelarge_lenfield.
-
v1
public XXH32State v1(int value)
Sets the specified value to thev1field.
-
v2
public XXH32State v2(int value)
Sets the specified value to thev2field.
-
v3
public XXH32State v3(int value)
Sets the specified value to thev3field.
-
v4
public XXH32State v4(int value)
Sets the specified value to thev4field.
-
mem32
public XXH32State mem32(java.nio.IntBuffer value)
Copies the specifiedIntBufferto themem32field.
-
mem32
public XXH32State mem32(int index, int value)
Sets the specified value at the specified index of themem32field.
-
memsize
public XXH32State memsize(int value)
Sets the specified value to thememsizefield.
-
reserved
public XXH32State reserved(int value)
Sets the specified value to thereservedfield.
-
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 newXXH32Stateinstance allocated withmemAlloc. The instance must be explicitly freed.
-
calloc
public static XXH32State calloc()
Returns a newXXH32Stateinstance allocated withmemCalloc. The instance must be explicitly freed.
-
create
public static XXH32State create()
Returns a newXXH32Stateinstance allocated withBufferUtils.
-
create
public static XXH32State create(long address)
-
malloc
public static XXH32State.Buffer malloc(int capacity)
Returns a newXXH32State.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
public static XXH32State.Buffer calloc(int capacity)
Returns a newXXH32State.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
public static XXH32State.Buffer create(int capacity)
Returns a newXXH32State.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
public static XXH32State.Buffer create(long address, int capacity)
Create aXXH32State.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
mallocStack
public static XXH32State mallocStack()
Returns a newXXH32Stateinstance allocated on the thread-localMemoryStack.
-
callocStack
public static XXH32State callocStack()
Returns a newXXH32Stateinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.
-
mallocStack
public static XXH32State mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a newXXH32Stateinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
callocStack
public static XXH32State callocStack(org.lwjgl.system.MemoryStack stack)
Returns a newXXH32Stateinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocate
-
mallocStack
public static XXH32State.Buffer mallocStack(int capacity)
Returns a newXXH32State.Bufferinstance allocated on the thread-localMemoryStack.- Parameters:
capacity- the buffer capacity
-
callocStack
public static XXH32State.Buffer callocStack(int capacity)
Returns a newXXH32State.Bufferinstance allocated on the thread-localMemoryStackand 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 newXXH32State.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
callocStack
public static XXH32State.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newXXH32State.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
-