A high-performance general-purpose compute library

Shift an array. More...

Functions

AFAPI array shift (const array &in, const int x, const int y=0, const int z=0, const int w=0)
 C++ Interface to shift an array. More...
 
AFAPI af_err af_shift (af_array *out, const af_array in, const int x, const int y, const int z, const int w)
 C Interface to shift an array. More...
 

Detailed Description

Shift an array.

Circular shift array values along a specified dimesion.


Function Documentation

◆ af_shift()

AFAPI af_err af_shift ( af_array out,
const af_array  in,
const int  x,
const int  y,
const int  z,
const int  w 
)

C Interface to shift an array.

Parameters
[out]outshifted array
[in]ininput array
[in]xspecifies the shift along first dimension
[in]yspecifies the shift along second dimension
[in]zspecifies the shift along third dimension
[in]wspecifies the shift along fourth dimension
Returns
AF_SUCCESS, if function returns successfully, else an af_err code is given

◆ shift()

AFAPI array shift ( const array in,
const int  x,
const int  y = 0,
const int  z = 0,
const int  w = 0 
)

C++ Interface to shift an array.

Parameters
[in]ininput array
[in]xspecifies the shift along the first dimension
[in]yspecifies the shift along the second dimension
[in]zspecifies the shift along the third dimension
[in]wspecifies the shift along the fourth dimension
Returns
shifted array