Modify the input dimensions without changing the data order.
More...
|
AFAPI array | moddims (const array &in, const unsigned ndims, const dim_t *const dims) |
|
AFAPI array | moddims (const array &in, const dim4 &dims) |
|
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) |
|
AFAPI af_err | af_moddims (af_array *out, const af_array in, const unsigned ndims, const dim_t *const dims) |
|
Modify the input dimensions without changing the data order.
Simply modifies the metadata. This is a noop.
- Parameters
-
[out] | out | is the modded array |
[in] | in | is the input array |
[in] | ndims | is the number of dimensions |
[in] | dims | is the array containing the new dimensions |
AFAPI array af::moddims |
( |
const array & |
in, |
|
|
const unsigned |
ndims, |
|
|
const dim_t *const |
dims |
|
) |
| |
- Parameters
-
[in] | in | is the input array |
[in] | ndims | is the number of dimensions |
[in] | dims | is the array containing the new dimensions |
- Returns
- the modded output
- Examples:
- bagging.cpp, brain_segmentation.cpp, deep_belief_net.cpp, kmeans.cpp, knn.cpp, logistic_regression.cpp, naive_bayes.cpp, neural_network.cpp, perceptron.cpp, rbm.cpp, and vectorize.cpp.
- Parameters
-
[in] | in | is the input array |
[in] | dims | is the new dimensions |
- Returns
- the modded output
- Parameters
-
[in] | in | is the input array |
[in] | d0 | specifies the new size of the first dimension |
[in] | d1 | specifies the new size of the second dimension |
[in] | d2 | specifies the new size of the third dimension |
[in] | d3 | specifies the new size of the fourth dimension |
- Returns
- the modded array