Package org.lwjgl.util.xxhash
Class XXH64State
- java.lang.Object
-
- org.lwjgl.system.Pointer.Default
-
- org.lwjgl.system.Struct
-
- org.lwjgl.util.xxhash.XXH64State
-
- All Implemented Interfaces:
- java.lang.AutoCloseable, org.lwjgl.system.NativeResource, org.lwjgl.system.Pointer
public class XXH64State extends org.lwjgl.system.Struct implements org.lwjgl.system.NativeResource64-bit XXH state for stack allocation. Unstable API.Layout
struct XXH64_state_t { long long total_len; long long v1; long long v2; long long v3; long long v4; long long mem64[4]; unsigned memsize; unsigned reserved[2]; }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class and Description static classXXH64State.BufferAn array ofXXH64Statestructs.
-
Field Summary
Fields Modifier and Type Field and Description static intSIZEOFThe struct size in bytes.
-
Constructor Summary
Constructors Constructor and Description XXH64State(java.nio.ByteBuffer container)Creates aXXH64Stateinstance at the current position of the specifiedByteBuffercontainer.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method and Description static XXH64Statecalloc()Returns a newXXH64Stateinstance allocated withmemCalloc.static XXH64State.Buffercalloc(int capacity)Returns a newXXH64State.Bufferinstance allocated withmemCalloc.static XXH64StatecallocStack()Returns a newXXH64Stateinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.static XXH64State.BuffercallocStack(int capacity)Returns a newXXH64State.Bufferinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.static XXH64State.BuffercallocStack(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newXXH64State.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static XXH64StatecallocStack(org.lwjgl.system.MemoryStack stack)Returns a newXXH64Stateinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static XXH64Statecreate()Returns a newXXH64Stateinstance allocated withBufferUtils.static XXH64State.Buffercreate(int capacity)Returns a newXXH64State.Bufferinstance allocated withBufferUtils.static XXH64Statecreate(long address)static XXH64State.Buffercreate(long address, int capacity)Create aXXH64State.Bufferinstance at the specified memory.static XXH64Statemalloc()Returns a newXXH64Stateinstance allocated withmemAlloc.static XXH64State.Buffermalloc(int capacity)Returns a newXXH64State.Bufferinstance allocated withmemAlloc.static XXH64StatemallocStack()Returns a newXXH64Stateinstance allocated on the thread-localMemoryStack.static XXH64State.BuffermallocStack(int capacity)Returns a newXXH64State.Bufferinstance allocated on the thread-localMemoryStack.static XXH64State.BuffermallocStack(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newXXH64State.Bufferinstance allocated on the specifiedMemoryStack.static XXH64StatemallocStack(org.lwjgl.system.MemoryStack stack)Returns a newXXH64Stateinstance allocated on the specifiedMemoryStack.java.nio.LongBuffermem64()Returns aLongBufferview of themem64field.longmem64(int index)Returns the value at the specified index of themem64field.XXH64Statemem64(int index, long value)Sets the specified value at the specified index of themem64field.XXH64Statemem64(java.nio.LongBuffer value)Copies the specifiedLongBufferto themem64field.intmemsize()Returns the value of thememsizefield.XXH64Statememsize(int value)Sets the specified value to thememsizefield.java.nio.IntBufferreserved()Returns aIntBufferview of thereservedfield.intreserved(int index)Returns the value at the specified index of thereservedfield.XXH64Statereserved(java.nio.IntBuffer value)Copies the specifiedIntBufferto thereservedfield.XXH64Statereserved(int index, int value)Sets the specified value at the specified index of thereservedfield.XXH64Stateset(long total_len, long v1, long v2, long v3, long v4, java.nio.LongBuffer mem64, int memsize, java.nio.IntBuffer reserved)Initializes this struct with the specified values.XXH64Stateset(XXH64State src)Copies the specified struct data to this struct.intsizeof()Returnssizeof(struct).longtotal_len()Returns the value of thetotal_lenfield.XXH64Statetotal_len(long value)Sets the specified value to thetotal_lenfield.longv1()Returns the value of thev1field.XXH64Statev1(long value)Sets the specified value to thev1field.longv2()Returns the value of thev2field.XXH64Statev2(long value)Sets the specified value to thev2field.longv3()Returns the value of thev3field.XXH64Statev3(long value)Sets the specified value to thev3field.longv4()Returns the value of thev4field.XXH64Statev4(long value)Sets the specified value to thev4field.
-
-
-
Constructor Detail
-
XXH64State
public XXH64State(java.nio.ByteBuffer container)
Creates aXXH64Stateinstance 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
public long total_len()
Returns the value of thetotal_lenfield.
-
v1
public long v1()
Returns the value of thev1field.
-
v2
public long v2()
Returns the value of thev2field.
-
v3
public long v3()
Returns the value of thev3field.
-
v4
public long v4()
Returns the value of thev4field.
-
mem64
public java.nio.LongBuffer mem64()
Returns aLongBufferview of themem64field.
-
mem64
public long mem64(int index)
Returns the value at the specified index of themem64field.
-
memsize
public int memsize()
Returns the value of thememsizefield.
-
reserved
public java.nio.IntBuffer reserved()
Returns aIntBufferview of thereservedfield.
-
reserved
public int reserved(int index)
Returns the value at the specified index of thereservedfield.
-
total_len
public XXH64State total_len(long value)
Sets the specified value to thetotal_lenfield.
-
v1
public XXH64State v1(long value)
Sets the specified value to thev1field.
-
v2
public XXH64State v2(long value)
Sets the specified value to thev2field.
-
v3
public XXH64State v3(long value)
Sets the specified value to thev3field.
-
v4
public XXH64State v4(long value)
Sets the specified value to thev4field.
-
mem64
public XXH64State mem64(java.nio.LongBuffer value)
Copies the specifiedLongBufferto themem64field.
-
mem64
public XXH64State mem64(int index, long value)
Sets the specified value at the specified index of themem64field.
-
memsize
public XXH64State memsize(int value)
Sets the specified value to thememsizefield.
-
reserved
public XXH64State reserved(java.nio.IntBuffer value)
Copies the specifiedIntBufferto thereservedfield.
-
reserved
public XXH64State reserved(int index, int value)
Sets the specified value at the specified index of thereservedfield.
-
set
public XXH64State set(long total_len, long v1, long v2, long v3, long v4, java.nio.LongBuffer mem64, int memsize, java.nio.IntBuffer reserved)
Initializes this struct with the specified values.
-
set
public XXH64State set(XXH64State src)
Copies the specified struct data to this struct.- Parameters:
src- the source struct- Returns:
- this struct
-
malloc
public static XXH64State malloc()
Returns a newXXH64Stateinstance allocated withmemAlloc. The instance must be explicitly freed.
-
calloc
public static XXH64State calloc()
Returns a newXXH64Stateinstance allocated withmemCalloc. The instance must be explicitly freed.
-
create
public static XXH64State create()
Returns a newXXH64Stateinstance allocated withBufferUtils.
-
create
public static XXH64State create(long address)
-
malloc
public static XXH64State.Buffer malloc(int capacity)
Returns a newXXH64State.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
public static XXH64State.Buffer calloc(int capacity)
Returns a newXXH64State.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
public static XXH64State.Buffer create(int capacity)
Returns a newXXH64State.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
public static XXH64State.Buffer create(long address, int capacity)
Create aXXH64State.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
mallocStack
public static XXH64State mallocStack()
Returns a newXXH64Stateinstance allocated on the thread-localMemoryStack.
-
callocStack
public static XXH64State callocStack()
Returns a newXXH64Stateinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.
-
mallocStack
public static XXH64State mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a newXXH64Stateinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
callocStack
public static XXH64State callocStack(org.lwjgl.system.MemoryStack stack)
Returns a newXXH64Stateinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocate
-
mallocStack
public static XXH64State.Buffer mallocStack(int capacity)
Returns a newXXH64State.Bufferinstance allocated on the thread-localMemoryStack.- Parameters:
capacity- the buffer capacity
-
callocStack
public static XXH64State.Buffer callocStack(int capacity)
Returns a newXXH64State.Bufferinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.- Parameters:
capacity- the buffer capacity
-
mallocStack
public static XXH64State.Buffer mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newXXH64State.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
callocStack
public static XXH64State.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newXXH64State.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
-