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.NativeResource
64-bit XXH state for stack allocation. Unstable API.Layout
struct XXH64_state_t { XXH32_hash_t total_len; XXH32_hash_t v1; XXH32_hash_t v2; XXH32_hash_t v3; XXH32_hash_t v4; XXH32_hash_t mem64[4]; XXH32_hash_t memsize; XXH32_hash_t reserved[2]; }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
XXH64State.Buffer
An array ofXXH64State
structs.
-
Constructor Summary
Constructors Constructor Description XXH64State(java.nio.ByteBuffer container)
Creates aXXH64State
instance at the current position of the specifiedByteBuffer
container.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static XXH64State
calloc()
Returns a newXXH64State
instance allocated withmemCalloc
.static XXH64State.Buffer
calloc(int capacity)
Returns a newXXH64State.Buffer
instance allocated withmemCalloc
.static XXH64State
callocStack()
Returns a newXXH64State
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.static XXH64State.Buffer
callocStack(int capacity)
Returns a newXXH64State.Buffer
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.static XXH64State.Buffer
callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newXXH64State.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static XXH64State
callocStack(org.lwjgl.system.MemoryStack stack)
Returns a newXXH64State
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static XXH64State
create()
Returns a newXXH64State
instance allocated withBufferUtils
.static XXH64State.Buffer
create(int capacity)
Returns a newXXH64State.Buffer
instance allocated withBufferUtils
.static XXH64State
create(long address)
Returns a newXXH64State
instance for the specified memory address.static XXH64State.Buffer
create(long address, int capacity)
Create aXXH64State.Buffer
instance at the specified memory.static XXH64State
createSafe(long address)
static XXH64State.Buffer
createSafe(long address, int capacity)
static XXH64State
malloc()
Returns a newXXH64State
instance allocated withmemAlloc
.static XXH64State.Buffer
malloc(int capacity)
Returns a newXXH64State.Buffer
instance allocated withmemAlloc
.static XXH64State
mallocStack()
Returns a newXXH64State
instance allocated on the thread-localMemoryStack
.static XXH64State.Buffer
mallocStack(int capacity)
Returns a newXXH64State.Buffer
instance allocated on the thread-localMemoryStack
.static XXH64State.Buffer
mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newXXH64State.Buffer
instance allocated on the specifiedMemoryStack
.static XXH64State
mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a newXXH64State
instance allocated on the specifiedMemoryStack
.java.nio.LongBuffer
mem64()
Returns aLongBuffer
view of themem64
field.long
mem64(int index)
Returns the value at the specified index of themem64
field.int
memsize()
Returns the value of thememsize
field.static java.nio.LongBuffer
nmem64(long struct)
Unsafe version ofmem64()
.static long
nmem64(long struct, int index)
Unsafe version ofmem64
.static int
nmemsize(long struct)
Unsafe version ofmemsize()
.static java.nio.IntBuffer
nreserved(long struct)
Unsafe version ofreserved()
.static int
nreserved(long struct, int index)
Unsafe version ofreserved
.static long
ntotal_len(long struct)
Unsafe version oftotal_len()
.static long
nv1(long struct)
Unsafe version ofv1()
.static long
nv2(long struct)
Unsafe version ofv2()
.static long
nv3(long struct)
Unsafe version ofv3()
.static long
nv4(long struct)
Unsafe version ofv4()
.java.nio.IntBuffer
reserved()
Returns aIntBuffer
view of thereserved
field.int
reserved(int index)
Returns the value at the specified index of thereserved
field.int
sizeof()
long
total_len()
Returns the value of thetotal_len
field.long
v1()
Returns the value of thev1
field.long
v2()
Returns the value of thev2
field.long
v3()
Returns the value of thev3
field.long
v4()
Returns the value of thev4
field.
-
-
-
Constructor Detail
-
XXH64State
public XXH64State(java.nio.ByteBuffer container)
Creates aXXH64State
instance at the current position of the specifiedByteBuffer
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 classorg.lwjgl.system.Struct
-
total_len
public long total_len()
Returns the value of thetotal_len
field.
-
v1
public long v1()
Returns the value of thev1
field.
-
v2
public long v2()
Returns the value of thev2
field.
-
v3
public long v3()
Returns the value of thev3
field.
-
v4
public long v4()
Returns the value of thev4
field.
-
mem64
public java.nio.LongBuffer mem64()
Returns aLongBuffer
view of themem64
field.
-
mem64
public long mem64(int index)
Returns the value at the specified index of themem64
field.
-
memsize
public int memsize()
Returns the value of thememsize
field.
-
reserved
public java.nio.IntBuffer reserved()
Returns aIntBuffer
view of thereserved
field.
-
reserved
public int reserved(int index)
Returns the value at the specified index of thereserved
field.
-
malloc
public static XXH64State malloc()
Returns a newXXH64State
instance allocated withmemAlloc
. The instance must be explicitly freed.
-
calloc
public static XXH64State calloc()
Returns a newXXH64State
instance allocated withmemCalloc
. The instance must be explicitly freed.
-
create
public static XXH64State create()
Returns a newXXH64State
instance allocated withBufferUtils
.
-
create
public static XXH64State create(long address)
Returns a newXXH64State
instance for the specified memory address.
-
createSafe
@Nullable public static XXH64State createSafe(long address)
-
malloc
public static XXH64State.Buffer malloc(int capacity)
Returns a newXXH64State.Buffer
instance allocated withmemAlloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
calloc
public static XXH64State.Buffer calloc(int capacity)
Returns a newXXH64State.Buffer
instance allocated withmemCalloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
create
public static XXH64State.Buffer create(int capacity)
Returns a newXXH64State.Buffer
instance allocated withBufferUtils
.- Parameters:
capacity
- the buffer capacity
-
create
public static XXH64State.Buffer create(long address, int capacity)
Create aXXH64State.Buffer
instance at the specified memory.- Parameters:
address
- the memory addresscapacity
- the buffer capacity
-
createSafe
@Nullable public static XXH64State.Buffer createSafe(long address, int capacity)
-
mallocStack
public static XXH64State mallocStack()
Returns a newXXH64State
instance allocated on the thread-localMemoryStack
.
-
callocStack
public static XXH64State callocStack()
Returns a newXXH64State
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.
-
mallocStack
public static XXH64State mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a newXXH64State
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocate
-
callocStack
public static XXH64State callocStack(org.lwjgl.system.MemoryStack stack)
Returns a newXXH64State
instance allocated on the specifiedMemoryStack
and 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.Buffer
instance allocated on the thread-localMemoryStack
.- Parameters:
capacity
- the buffer capacity
-
callocStack
public static XXH64State.Buffer callocStack(int capacity)
Returns a newXXH64State.Buffer
instance allocated on the thread-localMemoryStack
and 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.Buffer
instance 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.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocatecapacity
- the buffer capacity
-
ntotal_len
public static long ntotal_len(long struct)
Unsafe version oftotal_len()
.
-
nv1
public static long nv1(long struct)
Unsafe version ofv1()
.
-
nv2
public static long nv2(long struct)
Unsafe version ofv2()
.
-
nv3
public static long nv3(long struct)
Unsafe version ofv3()
.
-
nv4
public static long nv4(long struct)
Unsafe version ofv4()
.
-
nmem64
public static java.nio.LongBuffer nmem64(long struct)
Unsafe version ofmem64()
.
-
nmem64
public static long nmem64(long struct, int index)
Unsafe version ofmem64
.
-
nmemsize
public static int nmemsize(long struct)
Unsafe version ofmemsize()
.
-
nreserved
public static java.nio.IntBuffer nreserved(long struct)
Unsafe version ofreserved()
.
-
nreserved
public static int nreserved(long struct, int index)
Unsafe version ofreserved
.
-
-