Package org.lwjgl.util.xxhash
Class XXH32State
java.lang.Object
org.lwjgl.system.Pointer.Default
org.lwjgl.system.Struct<XXH32State>
org.lwjgl.util.xxhash.XXH32State
- All Implemented Interfaces:
AutoCloseable,org.lwjgl.system.NativeResource,org.lwjgl.system.Pointer
public class XXH32State
extends org.lwjgl.system.Struct<XXH32State>
implements org.lwjgl.system.NativeResource
The opaque state struct for the XXH32 streaming API.
Layout
struct XXH32_state_t {
XXH32_hash_t total_len_32();
XXH32_hash_t large_len();
XXH32_hash_t acc()[4];
unsigned char buffer()[16];
XXH32_hash_t bufferedSize();
XXH32_hash_t reserved();
}-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class org.lwjgl.system.Struct
org.lwjgl.system.Struct.StructValidationNested classes/interfaces inherited from interface org.lwjgl.system.Pointer
org.lwjgl.system.Pointer.Default -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intThe struct member offsets.static final intThe struct alignment in bytes.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct size in bytes.static final intThe struct member offsets.Fields inherited from interface org.lwjgl.system.Pointer
BITS32, BITS64, CLONG_SHIFT, CLONG_SIZE, POINTER_SHIFT, POINTER_SIZE -
Constructor Summary
ConstructorsConstructorDescriptionXXH32State(ByteBuffer container) Creates aXXH32Stateinstance at the current position of the specifiedByteBuffercontainer. -
Method Summary
Modifier and TypeMethodDescriptionacc()accumulator lanesintacc(int index) accumulator lanesbuffer()internal buffer for partial readsbytebuffer(int index) internal buffer for partial readsintamount of data inbufferstatic XXH32Statecalloc()Returns a newXXH32Stateinstance allocated withmemCalloc.static XXH32State.Buffercalloc(int capacity) Returns a newXXH32State.Bufferinstance allocated withmemCalloc.static XXH32State.Buffercalloc(int capacity, org.lwjgl.system.MemoryStack stack) Returns a newXXH32State.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static XXH32Statecalloc(org.lwjgl.system.MemoryStack stack) Returns a newXXH32Stateinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static XXH32StateDeprecated.static XXH32State.BuffercallocStack(int capacity) Deprecated.static XXH32State.BuffercallocStack(int capacity, org.lwjgl.system.MemoryStack stack) Deprecated.static XXH32StatecallocStack(org.lwjgl.system.MemoryStack stack) Deprecated.static XXH32Statecreate()Returns a newXXH32Stateinstance allocated withBufferUtils.static XXH32State.Buffercreate(int capacity) Returns a newXXH32State.Bufferinstance allocated withBufferUtils.static XXH32Statecreate(long address) Returns a newXXH32Stateinstance for the specified memory address.static XXH32State.Buffercreate(long address, int capacity) Create aXXH32State.Bufferinstance at the specified memory.static @Nullable XXH32StatecreateSafe(long address) static @Nullable XXH32State.BuffercreateSafe(long address, int capacity) intwhether the hash is ≥ 16 (handlestotal_len_32overflow)static XXH32Statemalloc()Returns a newXXH32Stateinstance allocated withmemAlloc.static XXH32State.Buffermalloc(int capacity) Returns a newXXH32State.Bufferinstance allocated withmemAlloc.static XXH32State.Buffermalloc(int capacity, org.lwjgl.system.MemoryStack stack) Returns a newXXH32State.Bufferinstance allocated on the specifiedMemoryStack.static XXH32Statemalloc(org.lwjgl.system.MemoryStack stack) Returns a newXXH32Stateinstance allocated on the specifiedMemoryStack.static XXH32StateDeprecated.static XXH32State.BuffermallocStack(int capacity) Deprecated.static XXH32State.BuffermallocStack(int capacity, org.lwjgl.system.MemoryStack stack) Deprecated.static XXH32StatemallocStack(org.lwjgl.system.MemoryStack stack) Deprecated.static IntBuffernacc(long struct) Unsafe version ofacc().static intnacc(long struct, int index) Unsafe version ofacc.static ByteBuffernbuffer(long struct) Unsafe version ofbuffer().static bytenbuffer(long struct, int index) Unsafe version ofbuffer.static intnbufferedSize(long struct) Unsafe version ofbufferedSize().static intnlarge_len(long struct) Unsafe version oflarge_len().static intnreserved(long struct) Unsafe version ofreserved().static intntotal_len_32(long struct) Unsafe version oftotal_len_32().intreserved()reserved field.intsizeof()inttotal length hashed, modulo2^32Methods inherited from class org.lwjgl.system.Struct
clear, free, isNull, validate, validateMethods inherited from class org.lwjgl.system.Pointer.Default
address, equals, hashCode, toStringMethods inherited from interface org.lwjgl.system.NativeResource
close, free
-
Field Details
-
SIZEOF
public static final int SIZEOFThe struct size in bytes. -
ALIGNOF
public static final int ALIGNOFThe struct alignment in bytes. -
TOTAL_LEN_32
public static final int TOTAL_LEN_32The struct member offsets. -
LARGE_LEN
public static final int LARGE_LENThe struct member offsets. -
ACC
public static final int ACCThe struct member offsets. -
BUFFER
public static final int BUFFERThe struct member offsets. -
BUFFEREDSIZE
public static final int BUFFEREDSIZEThe struct member offsets. -
RESERVED
public static final int RESERVEDThe struct member offsets.
-
-
Constructor Details
-
XXH32State
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 Details
-
sizeof
public int sizeof()- Specified by:
sizeofin classorg.lwjgl.system.Struct<XXH32State>
-
total_len_32
public int total_len_32()total length hashed, modulo2^32 -
large_len
public int large_len()whether the hash is ≥ 16 (handlestotal_len_32overflow) -
acc
accumulator lanes -
acc
public int acc(int index) accumulator lanes -
buffer
internal buffer for partial reads -
buffer
public byte buffer(int index) internal buffer for partial reads -
bufferedSize
public int bufferedSize()amount of data inbuffer -
reserved
public int reserved()reserved field. Do not read nor write to it. -
malloc
Returns a newXXH32Stateinstance allocated withmemAlloc. The instance must be explicitly freed. -
calloc
Returns a newXXH32Stateinstance allocated withmemCalloc. The instance must be explicitly freed. -
create
Returns a newXXH32Stateinstance allocated withBufferUtils. -
create
Returns a newXXH32Stateinstance for the specified memory address. -
createSafe
-
malloc
Returns a newXXH32State.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
Returns a newXXH32State.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
Returns a newXXH32State.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
Create aXXH32State.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
createSafe
-
mallocStack
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(MemoryStack)instead. -
callocStack
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(MemoryStack)instead. -
mallocStack
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(MemoryStack)instead. -
callocStack
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(MemoryStack)instead. -
mallocStack
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(int, MemoryStack)instead. -
callocStack
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(int, MemoryStack)instead. -
mallocStack
@Deprecated public static XXH32State.Buffer mallocStack(int capacity, org.lwjgl.system.MemoryStack stack) Deprecated.Deprecated for removal in 3.4.0. Usemalloc(int, MemoryStack)instead. -
callocStack
@Deprecated public static XXH32State.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack) Deprecated.Deprecated for removal in 3.4.0. Usecalloc(int, MemoryStack)instead. -
malloc
Returns a newXXH32Stateinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
calloc
Returns a newXXH32Stateinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocate
-
malloc
Returns a newXXH32State.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
capacity- the buffer capacitystack- the stack from which to allocate
-
calloc
Returns a newXXH32State.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
capacity- the buffer capacitystack- the stack from which to allocate
-
ntotal_len_32
public static int ntotal_len_32(long struct) Unsafe version oftotal_len_32(). -
nlarge_len
public static int nlarge_len(long struct) Unsafe version oflarge_len(). -
nacc
Unsafe version ofacc(). -
nacc
public static int nacc(long struct, int index) Unsafe version ofacc. -
nbuffer
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(). -
nreserved
public static int nreserved(long struct) Unsafe version ofreserved().
-