Class MeowHash

    • Field Detail

      • SIZEOF

        The struct size in bytes.
      • ALIGNOF

        The struct alignment in bytes.
      • U128, U64, U32

        The struct member offsets.
    • Constructor Detail

      • MeowHash

        public MeowHash​(java.nio.ByteBuffer container)
        Creates a MeowHash instance at the current position of the specified ByteBuffer 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()
        Description copied from class: Struct
        Returns sizeof(struct).
        Specified by:
        sizeof in class Struct
      • u64

        public java.nio.LongBuffer u64()
        Returns a LongBuffer view of the u64 field.
      • u64

        public long u64​(int index)
        Returns the value at the specified index of the u64 field.
      • u32

        public java.nio.IntBuffer u32()
        Returns a IntBuffer view of the u32 field.
      • u32

        public int u32​(int index)
        Returns the value at the specified index of the u32 field.
      • malloc

        public static MeowHash malloc()
        Returns a new MeowHash instance allocated with memAlloc. The instance must be explicitly freed.
      • calloc

        public static MeowHash calloc()
        Returns a new MeowHash instance allocated with memCalloc. The instance must be explicitly freed.
      • create

        public static MeowHash create()
        Returns a new MeowHash instance allocated with BufferUtils.
      • create

        public static MeowHash create​(long address)
        Returns a new MeowHash instance for the specified memory address.
      • createSafe

        @Nullable
        public static MeowHash createSafe​(long address)
        Like create, but returns null if address is NULL.
      • malloc

        public static MeowHash.Buffer malloc​(int capacity)
        Returns a new MeowHash.Buffer instance allocated with memAlloc. The instance must be explicitly freed.
        Parameters:
        capacity - the buffer capacity
      • calloc

        public static MeowHash.Buffer calloc​(int capacity)
        Returns a new MeowHash.Buffer instance allocated with memCalloc. The instance must be explicitly freed.
        Parameters:
        capacity - the buffer capacity
      • create

        public static MeowHash.Buffer create​(long address,
                                             int capacity)
        Create a MeowHash.Buffer instance at the specified memory.
        Parameters:
        address - the memory address
        capacity - the buffer capacity
      • createSafe

        @Nullable
        public static MeowHash.Buffer createSafe​(long address,
                                                 int capacity)
        Like create, but returns null if address is NULL.
      • mallocStack

        public static MeowHash mallocStack()
        Returns a new MeowHash instance allocated on the thread-local MemoryStack.
      • callocStack

        public static MeowHash callocStack()
        Returns a new MeowHash instance allocated on the thread-local MemoryStack and initializes all its bits to zero.
      • mallocStack

        public static MeowHash mallocStack​(MemoryStack stack)
        Returns a new MeowHash instance allocated on the specified MemoryStack.
        Parameters:
        stack - the stack from which to allocate
      • callocStack

        public static MeowHash callocStack​(MemoryStack stack)
        Returns a new MeowHash instance allocated on the specified MemoryStack and initializes all its bits to zero.
        Parameters:
        stack - the stack from which to allocate
      • callocStack

        public static MeowHash.Buffer callocStack​(int capacity)
        Returns a new MeowHash.Buffer instance allocated on the thread-local MemoryStack and initializes all its bits to zero.
        Parameters:
        capacity - the buffer capacity
      • callocStack

        public static MeowHash.Buffer callocStack​(int capacity,
                                                  MemoryStack stack)
        Returns a new MeowHash.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero.
        Parameters:
        stack - the stack from which to allocate
        capacity - the buffer capacity
      • nu128

        public static MeowU128 nu128​(long struct)
        Unsafe version of u128().
      • nu64

        public static java.nio.LongBuffer nu64​(long struct)
        Unsafe version of u64().
      • nu64

        public static long nu64​(long struct,
                                int index)
        Unsafe version of u64.
      • nu32

        public static java.nio.IntBuffer nu32​(long struct)
        Unsafe version of u32().
      • nu32

        public static int nu32​(long struct,
                               int index)
        Unsafe version of u32.