43#if AF_API_VERSION >= 38
44#if AF_COMPILER_CXX_RVALUE_REFERENCES
48 dim4(
dim4 &&other) AF_NOEXCEPT =
default;
53 dim4 &operator=(
dim4 other) AF_NOEXCEPT;
65 dim4(
const unsigned ndims,
const dim_t *
const dims);
127 ostr << dims[0] <<
" "
Generic object that represents size and shape.
dim4(const unsigned ndims, const dim_t *const dims)
Constructs a dim4 object from a C array of dim_t objects.
dim4 & operator-=(const dim4 &other)
Element-wise subtraction of the dim4 objects.
const dim_t & operator[](const unsigned dim) const
Returns the reference to the element at a give index.
dim_t & operator[](const unsigned dim)
Returns the reference to the element at a give index.
const dim_t * get() const
Returns the underlying pointer to the dim4 object.
dim4(const dim4 &other)
Copy constructor.
dim4 & operator*=(const dim4 &other)
Element-wise multiplication of the dim4 objects.
dim_t elements()
Returns the number of elements represented by this dim4.
dim_t ndims()
Returns the number of axis whose values are greater than one.
bool operator!=(const dim4 &other) const
Returns true if two dim4s store different values.
dim4(dim_t first, dim_t second=1, dim_t third=1, dim_t fourth=1)
Creates an new dim4 given a set of dimension.
dim_t elements() const
Returns the number of elements represented by this dim4.
bool operator==(const dim4 &other) const
Returns true if the two dim4 represent the same shape.
dim4 & operator+=(const dim4 &other)
Element-wise addition of the dim4 objects.
dim_t ndims() const
Returns the number of axis whose values are greater than one.
dim_t * get()
Returns the underlying pointer to the dim4 object.
dim4()
Default constructor. Creates an invalid dim4 object.
seq is used to create sequences for indexing af::array
AFAPI array operator+(const array &lhs, const array &rhs)
Adds two arrays or an array and a value.
AFAPI array operator*(const array &lhs, const array &rhs)
Multiplies two arrays or an array and a value.
AFAPI array operator<<(const array &lhs, const array &rhs)
Performs an left shift operation on two arrays or an array and a value.
AFAPI array operator>>(const array &lhs, const array &rhs)
Performs an right shift operation on two arrays or an array and a value.
AFAPI array operator-(const array &lhs, const array &rhs)
Subtracts two arrays or an array and a value.
AFAPI dim_t calcDim(const af_seq &seq, const dim_t &parentDim)
Returns the number of elements that will be represented by seq if applied on an array.
AFAPI size_t seqElements(const af_seq &seq)
Returns the number of elements that the af_seq object represents.
AFAPI bool isSpan(const af_seq &seq)
Returns true if the af_seq object represents the entire range of an axis.
C-style struct to creating sequences for indexing.