Reorder the input by in the specified order.
More...
Reorder the input by in the specified order.
Exchanges dimensions within an array. The order of the data along each dimension does not change.
AFAPI array randu(const dim4 &dims, const dtype ty=f32)
AFAPI array reorder(const array &in, const unsigned x, const unsigned y=1, const unsigned z=2, const unsigned w=3)
static af::array array(af::dim4 idims, cl_mem buf, af::dtype type, bool retain=false)
Create an af::array object from an OpenCL cl_mem buffer.
Definition: opencl.h:329
◆ af_reorder()
- Parameters
-
[out] | out | is the reordered array |
[in] | in | is the input matrix |
[in] | x | specifies which dimension should be first |
[in] | y | specifies which dimension should be second |
[in] | z | specifies which dimension should be third |
[in] | w | specifies which dimension should be fourth |
◆ reorder()
AFAPI array reorder |
( |
const array & |
in, |
|
|
const unsigned |
x, |
|
|
const unsigned |
y = 1 , |
|
|
const unsigned |
z = 2 , |
|
|
const unsigned |
w = 3 |
|
) |
| |
- Parameters
-
[in] | in | is the input array |
[in] | x | specifies which dimension should be first |
[in] | y | specifies which dimension should be second |
[in] | z | specifies which dimension should be third |
[in] | w | specifies which dimension should be fourth |
- Returns
- the reordered output