#include "cpp_apigen_demo/array.h"
template <class T, int Rank> class cpp_apigen_demo::Array;

Defines a multi-dimensional array view.

Template Parameters:
class T

Array element type.

int Rank

Number of dimensions.

Constructors

Array(T *data, std::array<int, Rank> shape,
      DataOrder
 order = DataOrder::C
)
;

Constructs an array.

Array(const Array<U, Rank> &other);

Converts from a compatible array.

Methods

T *data() const;

Returns the data pointer.

const std::array<int, Rank> &shape() const;

Returns the shape pointer.

DataOrder order() const;

Returns the data order.

T operator[](int index)
T operator[](std::array<int, Rank> index);

Returns the element at the specified index or index vector.


Last update: Apr 16, 2024