Reorder an array according to the specified dimensions.
More...
Reorder an array according to the specified dimensions.
Exchanges data of an array such that the requested change in dimension is satisfied. The linear ordering of data within the array is preserved.
a [2 2 3 1]
1.0000 3.0000
2.0000 4.0000
1.0000 3.0000
2.0000 4.0000
1.0000 3.0000
2.0000 4.0000
1.0000 2.0000
3.0000 4.0000
1.0000 2.0000
3.0000 4.0000
1.0000 2.0000
3.0000 4.0000
1.0000 2.0000
1.0000 2.0000
1.0000 2.0000
3.0000 4.0000
3.0000 4.0000
3.0000 4.0000
AFAPI array reorder(const array &in, const unsigned x, const unsigned y=1, const unsigned z=2, const unsigned w=3)
◆ 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 af::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