Public Attributes

va_tensor_type type
int num_dimensions
int64_t* dimensions
va_refcount ref_count
struct va_tensor* source
void* data
void(* destroy)(struct va_tensor*)

Detailed Description

A tensor is an array with a variable number of dimensions.

Member Data Documentation

void* va_tensor::data

Pointer to the first data element.

void(* va_tensor::destroy)(structva_tensor*)

Destructor function. Depending on how the tensor was originally allocated, it also needs to be deallocated differently. If destroy is non-null, va_tensor_free() will use it instead of va_tensor_destroy(), which is the default.

int64_t* va_tensor::dimensions

Pointer to an array that holds tensor dimensions. If the tensor is allocated using va_tensor_alloc(), dimensions will be stored right after the header.

int va_tensor::num_dimensions

The number of dimensions in the tensor.

va_refcount va_tensor::ref_count

The number of references to this tensor structure.

struct va_tensor* va_tensor::source

Pointer to a source tensor if data is shared.


The type of the tensor.