Modify the dimensions of an array without changing the order of its elements. More...
Functions | |
| AFAPI array | moddims (const array &in, const dim4 &dims) |
C++ Interface for modifying the dimensions of an input array to the shape specified by a dim4 object. | |
| AFAPI array | moddims (const array &in, const dim_t d0, const dim_t d1=1, const dim_t d2=1, const dim_t d3=1) |
| C++ Interface for modifying the dimensions of an input array to the shape specified by dimension length parameters. | |
| AFAPI array | moddims (const array &in, const unsigned ndims, const dim_t *const dims) |
C++ Interface for modifying the dimensions of an input array to the shape specified by an array of ndims dimensions. | |
| AFAPI af_err | af_moddims (af_array *out, const af_array in, const unsigned ndims, const dim_t *const dims) |
C Interface for modifying the dimensions of an input array to the shape specified by an array of ndims dimensions. | |
Modify the dimensions of an array without changing the order of its elements.
This function only modifies array metadata and requires no computation. It is a NOOP.
Examples:
| AFAPI af_err af_moddims | ( | af_array * | out, |
| const af_array | in, | ||
| const unsigned | ndims, | ||
| const dim_t *const | dims | ||
| ) |
C Interface for modifying the dimensions of an input array to the shape specified by an array of ndims dimensions.
| [out] | out | the modded output |
| [in] | in | the input array |
| [in] | ndims | the number of dimensions |
| [in] | dims | the array of new dimension sizes |
C++ Interface for modifying the dimensions of an input array to the shape specified by a dim4 object.
| [in] | in | the input array |
| [in] | dims | the array of new dimension sizes |
| AFAPI array moddims | ( | const array & | in, |
| const dim_t | d0, | ||
| const dim_t | d1 = 1, |
||
| const dim_t | d2 = 1, |
||
| const dim_t | d3 = 1 |
||
| ) |
C++ Interface for modifying the dimensions of an input array to the shape specified by dimension length parameters.
| [in] | in | the input array |
| [in] | d0 | the new size of the first dimension |
| [in] | d1 | the new size of the second dimension (optional) |
| [in] | d2 | the new size of the third dimension (optional) |
| [in] | d3 | the new size of the fourth dimension (optional) |
C++ Interface for modifying the dimensions of an input array to the shape specified by an array of ndims dimensions.
| [in] | in | the input array |
| [in] | ndims | the number of dimensions |
| [in] | dims | the array of new dimension sizes |