Documentation
|
|
Modify dimensions of input array. More...
| array | moddims (const array &A, int dim0, int dim1=1, int dim2=1, int dim3=1) |
| This function changes the dimensions of an array. More... | |
| array | moddims (const array &A, const dim4 &dims) |
| This function changes the dimensions of an array. More... | |
Modify dimensions of input array.
| array af::moddims | ( | const array & | A, |
| int | dim0, | ||
| int | dim1 = 1, |
||
| int | dim2 = 1, |
||
| int | dim3 = 1 |
||
| ) |
This function changes the dimensions of an array.
Moddims returns an array which shares memory space with the input array and has the dimensions specified in the parameters.
No work is done (data is simply shared) so this is effectively a noop. No memory space allocated or deleted. The total number of elements must not change.
| [in] | A | input array |
| [in] | dim0 | new size of 1st dimension |
| [in] | dim1 | new size of 2nd dimension |
| [in] | dim2 | new size of 3rd dimension |
| [in] | dim3 | new size of 4th dimension |
| array af::moddims | ( | const array & | A, |
| const dim4 & | dims | ||
| ) |
This function changes the dimensions of an array.
Moddims returns an array which shares memory space with the input array and has the dimensions specified in the parameters.
No work is done (data is simply shared) so this is effectively a noop. No memory space allocated or deleted. The total number of elements must not change.
| [in] | A | input array |
| [in] | dims | new dimensions |