Do more. Code less. Free software for GPU computing.
<scroll to top>
Functions

Array properties (dimensions, type, complexity, ...)

Basics

Functions

dim4 dims () const
 Fetch an object representing the dimensions of array.
int dims (unsigned) const
 Fetch size of specified dimension (zero-indexed).
int ndims () const
 How many dimensions (ignore trailing singletons)
int elements () const
 How many elements in array.
unsigned ngfor () const
 How many gfor() tiles (zero means none)
size_t bytes () const
 How many bytes (including all GFOR tiles) does this array occupy?
bool isempty () const
 Is empty (no elements)
bool isscalar () const
 Is scalar (one element)
bool isvector () const
 Is either row or column vector (or scalar), i.e. isrow() || iscolumn()
bool isrow () const
 Is row vector.
bool iscolumn () const
 Is column vector.
dtype type () const
 Type of array.
bool iscomplex () const
 Is complex-valued array?
bool isreal () const
 Is real-valued array?
bool issparse () const

Function Documentation

dim4 dims ( ) const [inherited]

Fetch an object representing the dimensions of array.

Examples:
examples/blackscholes/blackscholes.cpp, examples/image/image_demo.cpp, and examples/optical_flow/optical_flow.cpp.
int dims ( unsigned  ) const [inherited]

Fetch size of specified dimension (zero-indexed).

int ndims ( ) const [inherited]

How many dimensions (ignore trailing singletons)

int elements ( ) const [inherited]

How many elements in array.

Examples:
examples/misc/any.cpp, and examples/misc/gfor.cpp.
unsigned ngfor ( ) const [inherited]

How many gfor() tiles (zero means none)

size_t bytes ( ) const [inherited]

How many bytes (including all GFOR tiles) does this array occupy?

bool isempty ( ) const [inherited]

Is empty (no elements)

bool isscalar ( ) const [inherited]

Is scalar (one element)

bool isvector ( ) const [inherited]

Is either row or column vector (or scalar), i.e. isrow() || iscolumn()

bool isrow ( ) const [inherited]

Is row vector.

bool iscolumn ( ) const [inherited]

Is column vector.

dtype type ( ) const [inherited]

Type of array.

bool iscomplex ( ) const [inherited]

Is complex-valued array?

bool isreal ( ) const [inline, inherited]

Is real-valued array?

bool issparse ( ) const [inherited]
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines