Package org.lwjgl.util.xxhash
Class XXH3State
- java.lang.Object
-
- org.lwjgl.system.Pointer.Default
-
- org.lwjgl.system.Struct
-
- org.lwjgl.util.xxhash.XXH3State
-
- All Implemented Interfaces:
java.lang.AutoCloseable
,org.lwjgl.system.NativeResource
,org.lwjgl.system.Pointer
public class XXH3State extends org.lwjgl.system.Struct implements org.lwjgl.system.NativeResource
XXH3 state for stack allocation. Unstable API.Layout
struct XXH3_state_t { XXH32_hash_t acc[8]; unsigned char customSecret[192]; unsigned char buffer[256]; XXH32_hash_t bufferedSize; XXH32_hash_t nbStripesPerBlock; XXH32_hash_t nbStripesSoFar; XXH32_hash_t secretLimit; XXH32_hash_t reserved32; XXH32_hash_t reserved32_2; XXH32_hash_t totalLen; XXH32_hash_t seed; XXH32_hash_t reserved64; unsigned char const * secret; }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
XXH3State.Buffer
An array ofXXH3State
structs.
-
Field Summary
Fields Modifier and Type Field Description static int
ACC
The struct member offsets.static int
ALIGNOF
The struct alignment in bytes.static int
BUFFER
BUFFEREDSIZE
CUSTOMSECRET
NBSTRIPESPERBLOCK
NBSTRIPESSOFAR
RESERVED32
RESERVED32_2
RESERVED64
SECRET
SECRETLIMIT
SEEDThe struct member offsets.static int
SIZEOF
The struct size in bytes.static int
TOTALLEN
The struct member offsets.
-
Constructor Summary
Constructors Constructor Description XXH3State(java.nio.ByteBuffer container)
Creates aXXH3State
instance at the current position of the specifiedByteBuffer
container.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.nio.LongBuffer
acc()
Returns aLongBuffer
view of theacc
field.long
acc(int index)
Returns the value at the specified index of theacc
field.java.nio.ByteBuffer
buffer()
Returns aByteBuffer
view of thebuffer
field.byte
buffer(int index)
Returns the value at the specified index of thebuffer
field.int
bufferedSize()
Returns the value of thebufferedSize
field.static XXH3State
calloc()
Returns a newXXH3State
instance allocated withmemCalloc
.static XXH3State.Buffer
calloc(int capacity)
Returns a newXXH3State.Buffer
instance allocated withmemCalloc
.static XXH3State
callocStack()
Returns a newXXH3State
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.static XXH3State.Buffer
callocStack(int capacity)
Returns a newXXH3State.Buffer
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.static XXH3State.Buffer
callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newXXH3State.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static XXH3State
callocStack(org.lwjgl.system.MemoryStack stack)
Returns a newXXH3State
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static XXH3State
create()
Returns a newXXH3State
instance allocated withBufferUtils
.static XXH3State.Buffer
create(int capacity)
Returns a newXXH3State.Buffer
instance allocated withBufferUtils
.static XXH3State
create(long address)
Returns a newXXH3State
instance for the specified memory address.static XXH3State.Buffer
create(long address, int capacity)
Create aXXH3State.Buffer
instance at the specified memory.static XXH3State
createSafe(long address)
static XXH3State.Buffer
createSafe(long address, int capacity)
java.nio.ByteBuffer
customSecret()
Returns aByteBuffer
view of thecustomSecret
field.byte
customSecret(int index)
Returns the value at the specified index of thecustomSecret
field.static XXH3State
malloc()
Returns a newXXH3State
instance allocated withmemAlloc
.static XXH3State.Buffer
malloc(int capacity)
Returns a newXXH3State.Buffer
instance allocated withmemAlloc
.static XXH3State
mallocStack()
Returns a newXXH3State
instance allocated on the thread-localMemoryStack
.static XXH3State.Buffer
mallocStack(int capacity)
Returns a newXXH3State.Buffer
instance allocated on the thread-localMemoryStack
.static XXH3State.Buffer
mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newXXH3State.Buffer
instance allocated on the specifiedMemoryStack
.static XXH3State
mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a newXXH3State
instance allocated on the specifiedMemoryStack
.static java.nio.LongBuffer
nacc(long struct)
Unsafe version ofacc()
.static long
nacc(long struct, int index)
Unsafe version ofacc
.int
nbStripesPerBlock()
Returns the value of thenbStripesPerBlock
field.int
nbStripesSoFar()
Returns the value of thenbStripesSoFar
field.static java.nio.ByteBuffer
nbuffer(long struct)
Unsafe version ofbuffer()
.static byte
nbuffer(long struct, int index)
Unsafe version ofbuffer
.static int
nbufferedSize(long struct)
Unsafe version ofbufferedSize()
.static java.nio.ByteBuffer
ncustomSecret(long struct)
Unsafe version ofcustomSecret()
.static byte
ncustomSecret(long struct, int index)
Unsafe version ofcustomSecret
.static int
nnbStripesPerBlock(long struct)
Unsafe version ofnbStripesPerBlock()
.static int
nnbStripesSoFar(long struct)
Unsafe version ofnbStripesSoFar()
.static int
nreserved32(long struct)
Unsafe version ofreserved32()
.static int
nreserved32_2(long struct)
Unsafe version ofreserved32_2()
.static long
nreserved64(long struct)
Unsafe version ofreserved64()
.static java.nio.ByteBuffer
nsecret(long struct, int capacity)
Unsafe version ofsecret
.static int
nsecretLimit(long struct)
Unsafe version ofsecretLimit()
.static long
nseed(long struct)
Unsafe version ofseed()
.static long
ntotalLen(long struct)
Unsafe version oftotalLen()
.int
reserved32()
Returns the value of thereserved32
field.int
reserved32_2()
Returns the value of thereserved32_2
field.long
reserved64()
Returns the value of thereserved64
field.java.nio.ByteBuffer
secret(int capacity)
Returns aByteBuffer
view of the data pointed to by thesecret
field.int
secretLimit()
Returns the value of thesecretLimit
field.long
seed()
Returns the value of theseed
field.int
sizeof()
long
totalLen()
Returns the value of thetotalLen
field.
-
-
-
Constructor Detail
-
XXH3State
public XXH3State(java.nio.ByteBuffer container)
Creates aXXH3State
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
-
acc
public java.nio.LongBuffer acc()
Returns aLongBuffer
view of theacc
field.
-
acc
public long acc(int index)
Returns the value at the specified index of theacc
field.
-
customSecret
public java.nio.ByteBuffer customSecret()
Returns aByteBuffer
view of thecustomSecret
field.
-
customSecret
public byte customSecret(int index)
Returns the value at the specified index of thecustomSecret
field.
-
buffer
public java.nio.ByteBuffer buffer()
Returns aByteBuffer
view of thebuffer
field.
-
buffer
public byte buffer(int index)
Returns the value at the specified index of thebuffer
field.
-
bufferedSize
public int bufferedSize()
Returns the value of thebufferedSize
field.
-
nbStripesPerBlock
public int nbStripesPerBlock()
Returns the value of thenbStripesPerBlock
field.
-
nbStripesSoFar
public int nbStripesSoFar()
Returns the value of thenbStripesSoFar
field.
-
secretLimit
public int secretLimit()
Returns the value of thesecretLimit
field.
-
reserved32
public int reserved32()
Returns the value of thereserved32
field.
-
reserved32_2
public int reserved32_2()
Returns the value of thereserved32_2
field.
-
totalLen
public long totalLen()
Returns the value of thetotalLen
field.
-
seed
public long seed()
Returns the value of theseed
field.
-
reserved64
public long reserved64()
Returns the value of thereserved64
field.
-
secret
public java.nio.ByteBuffer secret(int capacity)
Returns aByteBuffer
view of the data pointed to by thesecret
field.- Parameters:
capacity
- the number of elements in the returned buffer
-
malloc
public static XXH3State malloc()
Returns a newXXH3State
instance allocated withmemAlloc
. The instance must be explicitly freed.
-
calloc
public static XXH3State calloc()
Returns a newXXH3State
instance allocated withmemCalloc
. The instance must be explicitly freed.
-
create
public static XXH3State create()
Returns a newXXH3State
instance allocated withBufferUtils
.
-
create
public static XXH3State create(long address)
Returns a newXXH3State
instance for the specified memory address.
-
createSafe
@Nullable public static XXH3State createSafe(long address)
-
malloc
public static XXH3State.Buffer malloc(int capacity)
Returns a newXXH3State.Buffer
instance allocated withmemAlloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
calloc
public static XXH3State.Buffer calloc(int capacity)
Returns a newXXH3State.Buffer
instance allocated withmemCalloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
create
public static XXH3State.Buffer create(int capacity)
Returns a newXXH3State.Buffer
instance allocated withBufferUtils
.- Parameters:
capacity
- the buffer capacity
-
create
public static XXH3State.Buffer create(long address, int capacity)
Create aXXH3State.Buffer
instance at the specified memory.- Parameters:
address
- the memory addresscapacity
- the buffer capacity
-
createSafe
@Nullable public static XXH3State.Buffer createSafe(long address, int capacity)
-
mallocStack
public static XXH3State mallocStack()
Returns a newXXH3State
instance allocated on the thread-localMemoryStack
.
-
callocStack
public static XXH3State callocStack()
Returns a newXXH3State
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.
-
mallocStack
public static XXH3State mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a newXXH3State
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocate
-
callocStack
public static XXH3State callocStack(org.lwjgl.system.MemoryStack stack)
Returns a newXXH3State
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocate
-
mallocStack
public static XXH3State.Buffer mallocStack(int capacity)
Returns a newXXH3State.Buffer
instance allocated on the thread-localMemoryStack
.- Parameters:
capacity
- the buffer capacity
-
callocStack
public static XXH3State.Buffer callocStack(int capacity)
Returns a newXXH3State.Buffer
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.- Parameters:
capacity
- the buffer capacity
-
mallocStack
public static XXH3State.Buffer mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newXXH3State.Buffer
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocatecapacity
- the buffer capacity
-
callocStack
public static XXH3State.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newXXH3State.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocatecapacity
- the buffer capacity
-
nacc
public static java.nio.LongBuffer nacc(long struct)
Unsafe version ofacc()
.
-
nacc
public static long nacc(long struct, int index)
Unsafe version ofacc
.
-
ncustomSecret
public static java.nio.ByteBuffer ncustomSecret(long struct)
Unsafe version ofcustomSecret()
.
-
ncustomSecret
public static byte ncustomSecret(long struct, int index)
Unsafe version ofcustomSecret
.
-
nbuffer
public static java.nio.ByteBuffer nbuffer(long struct)
Unsafe version ofbuffer()
.
-
nbuffer
public static byte nbuffer(long struct, int index)
Unsafe version ofbuffer
.
-
nbufferedSize
public static int nbufferedSize(long struct)
Unsafe version ofbufferedSize()
.
-
nnbStripesPerBlock
public static int nnbStripesPerBlock(long struct)
Unsafe version ofnbStripesPerBlock()
.
-
nnbStripesSoFar
public static int nnbStripesSoFar(long struct)
Unsafe version ofnbStripesSoFar()
.
-
nsecretLimit
public static int nsecretLimit(long struct)
Unsafe version ofsecretLimit()
.
-
nreserved32
public static int nreserved32(long struct)
Unsafe version ofreserved32()
.
-
nreserved32_2
public static int nreserved32_2(long struct)
Unsafe version ofreserved32_2()
.
-
ntotalLen
public static long ntotalLen(long struct)
Unsafe version oftotalLen()
.
-
nseed
public static long nseed(long struct)
Unsafe version ofseed()
.
-
nreserved64
public static long nreserved64(long struct)
Unsafe version ofreserved64()
.
-
nsecret
public static java.nio.ByteBuffer nsecret(long struct, int capacity)
Unsafe version ofsecret
.
-
-