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.NativeResourceThe opaque state struct for the XXH64 streaming API.Layout
struct XXH64_state_t { XXH64_hash_ttotal_len(); XXH64_hash_tv()[4]; XXH64_hash_tmem64()[4]; XXH32_hash_tmemsize(); XXH32_hash_treserved32(); XXH64_hash_treserved64(); }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classXXH64State.BufferAn array ofXXH64Statestructs.
-
Field Summary
Fields Modifier and Type Field Description static intALIGNOFThe struct alignment in bytes.static intMEM64
MEMSIZE
RESERVED32
RESERVED64The struct member offsets.static intSIZEOFThe struct size in bytes.static intTOTAL_LEN
VThe struct member offsets.
-
Constructor Summary
Constructors Constructor 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 Deprecated Methods Modifier and Type Method Description static XXH64Statecalloc()Returns a newXXH64Stateinstance allocated withmemCalloc.static XXH64State.Buffercalloc(int capacity)Returns a newXXH64State.Bufferinstance allocated withmemCalloc.static XXH64State.Buffercalloc(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newXXH64State.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static XXH64Statecalloc(org.lwjgl.system.MemoryStack stack)Returns a newXXH64Stateinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static XXH64StatecallocStack()Deprecated.static XXH64State.BuffercallocStack(int capacity)Deprecated.static XXH64State.BuffercallocStack(int capacity, org.lwjgl.system.MemoryStack stack)Deprecated.static XXH64StatecallocStack(org.lwjgl.system.MemoryStack stack)Deprecated.static XXH64Statecreate()Returns a newXXH64Stateinstance allocated withBufferUtils.static XXH64State.Buffercreate(int capacity)Returns a newXXH64State.Bufferinstance allocated withBufferUtils.static XXH64Statecreate(long address)Returns a newXXH64Stateinstance for the specified memory address.static XXH64State.Buffercreate(long address, int capacity)Create aXXH64State.Bufferinstance at the specified memory.static XXH64StatecreateSafe(long address)static XXH64State.BuffercreateSafe(long address, int capacity)static XXH64Statemalloc()Returns a newXXH64Stateinstance allocated withmemAlloc.static XXH64State.Buffermalloc(int capacity)Returns a newXXH64State.Bufferinstance allocated withmemAlloc.static XXH64State.Buffermalloc(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newXXH64State.Bufferinstance allocated on the specifiedMemoryStack.static XXH64Statemalloc(org.lwjgl.system.MemoryStack stack)Returns a newXXH64Stateinstance allocated on the specifiedMemoryStack.static XXH64StatemallocStack()Deprecated.static XXH64State.BuffermallocStack(int capacity)Deprecated.static XXH64State.BuffermallocStack(int capacity, org.lwjgl.system.MemoryStack stack)Deprecated.static XXH64StatemallocStack(org.lwjgl.system.MemoryStack stack)Deprecated.java.nio.LongBuffermem64()internal buffer for partial reads.longmem64(int index)internal buffer for partial reads.intmemsize()amount of data inmem64static java.nio.LongBuffernmem64(long struct)Unsafe version ofmem64().static longnmem64(long struct, int index)Unsafe version ofmem64.static intnmemsize(long struct)Unsafe version ofmemsize().static intnreserved32(long struct)Unsafe version ofreserved32().static longnreserved64(long struct)Unsafe version ofreserved64().static longntotal_len(long struct)Unsafe version oftotal_len().static java.nio.LongBuffernv(long struct)Unsafe version ofv().static longnv(long struct, int index)Unsafe version ofv.intreserved32()reserved field, needed for padding anywayslongreserved64()reserved field.intsizeof()longtotal_len()total length hashed.java.nio.LongBufferv()accumulator laneslongv(int index)accumulator lanes
-
-
-
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()
- Specified by:
sizeofin classorg.lwjgl.system.Struct
-
total_len
public long total_len()
total length hashed. This is always 64-bit.
-
v
public java.nio.LongBuffer v() public long v(int index)
accumulator lanes
-
mem64
public java.nio.LongBuffer mem64() public long mem64(int index)
internal buffer for partial reads. Treated asunsigned char[32].
-
memsize
public int memsize()
amount of data inmem64
-
reserved32
public int reserved32()
reserved field, needed for padding anyways
-
reserved64
public long reserved64()
reserved field. Do not read or write to it, it may be removed.
-
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)
Returns a newXXH64Stateinstance for the specified memory address.
-
createSafe
@Nullable public static XXH64State createSafe(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
-
createSafe
@Nullable public static XXH64State.Buffer createSafe(long address, int capacity)
-
mallocStack
@Deprecated public static XXH64State mallocStack()
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(MemoryStack)instead.
-
callocStack
@Deprecated public static XXH64State callocStack()
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(MemoryStack)instead.
-
mallocStack
@Deprecated public static XXH64State mallocStack(org.lwjgl.system.MemoryStack stack)
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(MemoryStack)instead.
-
callocStack
@Deprecated public static XXH64State callocStack(org.lwjgl.system.MemoryStack stack)
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(MemoryStack)instead.
-
mallocStack
@Deprecated public static XXH64State.Buffer mallocStack(int capacity)
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(int, MemoryStack)instead.
-
callocStack
@Deprecated public static XXH64State.Buffer callocStack(int capacity)
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(int, MemoryStack)instead.
-
mallocStack
@Deprecated public static XXH64State.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 XXH64State.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(int, MemoryStack)instead.
-
malloc
public static XXH64State malloc(org.lwjgl.system.MemoryStack stack)
Returns a newXXH64Stateinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
calloc
public static XXH64State calloc(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
-
malloc
public static XXH64State.Buffer malloc(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
-
calloc
public static XXH64State.Buffer calloc(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
-
ntotal_len
public static long ntotal_len(long struct)
Unsafe version oftotal_len().
-
nv
public static java.nio.LongBuffer nv(long struct)
Unsafe version ofv().
-
nv
public static long nv(long struct, int index)Unsafe version ofv.
-
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().
-
nreserved32
public static int nreserved32(long struct)
Unsafe version ofreserved32().
-
nreserved64
public static long nreserved64(long struct)
Unsafe version ofreserved64().
-
-