Class InputVector

All Implemented Interfaces:
Proxy

@Generated("org.javagi.JavaGI") public class InputVector extends ProxyInstance
Structure used for scatter/gather data input. You generally pass in an array of GInputVectors and the operation will store the read data starting in the first buffer, switching to the next as needed.
Since:
2.22
  • Constructor Details

    • InputVector

      public InputVector(MemorySegment address)
      Create a InputVector proxy instance for the provided memory address.
      Parameters:
      address - the memory address of the native object
    • InputVector

      public InputVector(Arena arena)
      Allocate a new InputVector.
      Parameters:
      arena - to control the memory allocation scope
    • InputVector

      public InputVector()
      Allocate a new InputVector. The memory is allocated with Arena.ofAuto().
    • InputVector

      public InputVector(MemorySegment buffer, long size, Arena arena)
      Allocate a new InputVector with the fields set to the provided values.
      Parameters:
      buffer - value for the field buffer
      size - value for the field size
      arena - to control the memory allocation scope
    • InputVector

      public InputVector(MemorySegment buffer, long size)
      Allocate a new InputVector with the fields set to the provided values. The memory is allocated with Arena.ofAuto().
      Parameters:
      buffer - value for the field buffer
      size - value for the field size
  • Method Details

    • getMemoryLayout

      public static MemoryLayout getMemoryLayout()
      The memory layout of the native struct.
      Returns:
      the memory layout
    • readBuffer

      public MemorySegment readBuffer()
      Read the value of the field buffer.
      Returns:
      The value of the field buffer
    • writeBuffer

      public void writeBuffer(MemorySegment buffer)
      Write a value in the field buffer.
      Parameters:
      buffer - The new value for the field buffer
    • readSize

      public long readSize()
      Read the value of the field size.
      Returns:
      The value of the field size
    • writeSize

      public void writeSize(long size)
      Write a value in the field size.
      Parameters:
      size - The new value for the field size