Arrays

type vx_array

Arrays are reference-counted handles to owned memory buffers that hold scalars. These buffers can be held in a number of physical encodings to perform lightweight compression that exploits the particular data distribution of the array’s values.

Every data type recognized by Vortex also has a canonical physical encoding format, which arrays can be canonicalized into for ease of access in compute functions.

Cloning an array is a cheap operation.

Unless stated explicitly, all operations with vx_array don’t take ownership of it, and thus the array must be freed by the caller.

const vx_array *vx_array_clone(const vx_array *ptr)

Increase reference count on vx_array

void vx_array_free(const vx_array *ptr)

Free a vx_array

Properties

size_t vx_array_len(const vx_array *array)

Get the length of the array.

const vx_dtype *vx_array_dtype(const vx_array *array)

Get array’s dtype