createUnintializedVector

fun createUnintializedVector(elemSize: Int, numElems: Int, alignment: Int): ReadWriteBuffer

Create a new array/vector and return a ByteBuffer to be filled later. Call endVector after this method to get an offset to the beginning of vector.

Return

ByteBuffer with position and limit set to the space allocated for the array.

Parameters

elemSize

the size of each element in bytes.

numElems

number of elements in the vector.

alignment

byte alignment.