Returns the number of elements in an array. More...

int elements () const
 

Detailed Description

Returns the number of elements in an array.

Gets the total number of elements in the array.

array a = constant(0,4,5,6);
printf("%d\n", a.elements());
//Returns 120 (4x5x6)

Function Documentation

int elements ( ) const
Returns
Number of elements in the array object
Examples:
examples/getting_started/gfor.cpp, and examples/machine_learning/neuralnetwork.cpp.