Do more. Code less. Free software for GPU computing.
<scroll to top>

Shift values in matrix (wrap around)

Matrix manipulation

Device pointer interface: Shift is host pointer

Shift the contents of an array along specified dimensions and wrap.
Parameters:
[out]d_outShifted array
[in]ndimsNumber of dimensions in array dims
[in]dimsArray of dimensions
[in]nshiftsNumber of shifts in array shifts
[in]h_shiftsArray(on host) indicating extent of shift along each dimension, e.g. [1 0 -2] shifts forward once in first dimension, none in second dimension, and back twice in third dimension.
[in]d_inOriginal array.
[in]batchNumber of tiles of input

afError af_shift_B (bool *d_out, unsigned ndims, const unsigned *dims, int nshifts, const int *h_shifts, const bool *d_in, unsigned batch)
 Boolean (8-bit) array shift.
afError af_shift_I (int *d_out, unsigned ndims, const unsigned *dims, int nshifts, const int *h_shifts, const int *d_in, unsigned batch)
 32-bit signed integer array shift.
afError af_shift_U (unsigned *d_out, unsigned ndims, const unsigned *dims, int nshifts, const int *h_shifts, const unsigned *d_in, unsigned batch)
 32-bit unsigned integer array shift.
afError af_shift_S (float *d_out, unsigned ndims, const unsigned *dims, int nshifts, const int *h_shifts, const float *d_in, unsigned batch)
 Single-precision array shift.
afError af_shift_D (double *d_out, unsigned ndims, const unsigned *dims, int nshifts, const int *h_shifts, const double *d_in, unsigned batch)
 Double-precision array shift.
afError af_shift_C (cuComplex *d_out, unsigned ndims, const unsigned *dims, int nshifts, const int *h_shifts, const cuComplex *d_in, unsigned batch)
 Complex single-precision array shift.
afError af_shift_Z (cuDoubleComplex *d_out, unsigned ndims, const unsigned *dims, int nshifts, const int *h_shifts, const cuDoubleComplex *d_in, unsigned batch)
 Complex double-precision array shift.

Device pointer interface: Shift is device pointer

Shift the contents of an array along specified dimensions and wrap.
Parameters:
[out]d_outShifted array
[in]ndimsNumber of dimensions in array dims
[in]dimsArray of dimensions
[in]nshiftsNumber of shifts in array shifts
[in]d_shiftsArray(on device) indicating extent of shift along each dimension, e.g. [1 0 -2] shifts forward once in first dimension, none in second dimension, and back twice in third dimension.
[in]d_inOriginal array.
[in]batchNumber of tiles of input.
[in]batch_shiftNumber of tiles of shift.

afError af_shiftd_B (bool *d_out, unsigned ndims, const unsigned *dims, int nshifts, const int *d_shifts, const bool *d_in, unsigned batch, unsigned batch_shift)
 Boolean (8-bit) array shift.
afError af_shiftd_I (int *d_out, unsigned ndims, const unsigned *dims, int nshifts, const int *d_shifts, const int *d_in, unsigned batch, unsigned batch_shift)
 32-bit signed integer array shift.
afError af_shiftd_U (unsigned *d_out, unsigned ndims, const unsigned *dims, int nshifts, const int *d_shifts, const unsigned *d_in, unsigned batch, unsigned batch_shift)
 32-bit unsigned integer array shift.
afError af_shiftd_S (float *d_out, unsigned ndims, const unsigned *dims, int nshifts, const int *d_shifts, const float *d_in, unsigned batch, unsigned batch_shift)
 Single-precision array shift.
afError af_shiftd_D (double *d_out, unsigned ndims, const unsigned *dims, int nshifts, const int *d_shifts, const double *d_in, unsigned batch, unsigned batch_shift)
 Double-precision array shift.
afError af_shiftd_C (cuComplex *d_out, unsigned ndims, const unsigned *dims, int nshifts, const int *d_shifts, const cuComplex *d_in, unsigned batch, unsigned batch_shift)
 Complex single-precision array shift.
afError af_shiftd_Z (cuDoubleComplex *d_out, unsigned ndims, const unsigned *dims, int nshifts, const int *d_shifts, const cuDoubleComplex *d_in, unsigned batch, unsigned batch_shift)
 Complex double-precision array shift.

Function Documentation

afError af_shift_B ( bool *  d_out,
unsigned  ndims,
const unsigned *  dims,
int  nshifts,
const int *  h_shifts,
const bool *  d_in,
unsigned  batch 
)

Boolean (8-bit) array shift.

afError af_shift_I ( int *  d_out,
unsigned  ndims,
const unsigned *  dims,
int  nshifts,
const int *  h_shifts,
const int *  d_in,
unsigned  batch 
)

32-bit signed integer array shift.

afError af_shift_U ( unsigned *  d_out,
unsigned  ndims,
const unsigned *  dims,
int  nshifts,
const int *  h_shifts,
const unsigned *  d_in,
unsigned  batch 
)

32-bit unsigned integer array shift.

afError af_shift_S ( float *  d_out,
unsigned  ndims,
const unsigned *  dims,
int  nshifts,
const int *  h_shifts,
const float *  d_in,
unsigned  batch 
)

Single-precision array shift.

afError af_shift_D ( double *  d_out,
unsigned  ndims,
const unsigned *  dims,
int  nshifts,
const int *  h_shifts,
const double *  d_in,
unsigned  batch 
)

Double-precision array shift.

afError af_shift_C ( cuComplex *  d_out,
unsigned  ndims,
const unsigned *  dims,
int  nshifts,
const int *  h_shifts,
const cuComplex *  d_in,
unsigned  batch 
)

Complex single-precision array shift.

afError af_shift_Z ( cuDoubleComplex *  d_out,
unsigned  ndims,
const unsigned *  dims,
int  nshifts,
const int *  h_shifts,
const cuDoubleComplex *  d_in,
unsigned  batch 
)

Complex double-precision array shift.

afError af_shiftd_B ( bool *  d_out,
unsigned  ndims,
const unsigned *  dims,
int  nshifts,
const int *  d_shifts,
const bool *  d_in,
unsigned  batch,
unsigned  batch_shift 
)

Boolean (8-bit) array shift.

afError af_shiftd_I ( int *  d_out,
unsigned  ndims,
const unsigned *  dims,
int  nshifts,
const int *  d_shifts,
const int *  d_in,
unsigned  batch,
unsigned  batch_shift 
)

32-bit signed integer array shift.

afError af_shiftd_U ( unsigned *  d_out,
unsigned  ndims,
const unsigned *  dims,
int  nshifts,
const int *  d_shifts,
const unsigned *  d_in,
unsigned  batch,
unsigned  batch_shift 
)

32-bit unsigned integer array shift.

afError af_shiftd_S ( float *  d_out,
unsigned  ndims,
const unsigned *  dims,
int  nshifts,
const int *  d_shifts,
const float *  d_in,
unsigned  batch,
unsigned  batch_shift 
)

Single-precision array shift.

afError af_shiftd_D ( double *  d_out,
unsigned  ndims,
const unsigned *  dims,
int  nshifts,
const int *  d_shifts,
const double *  d_in,
unsigned  batch,
unsigned  batch_shift 
)

Double-precision array shift.

afError af_shiftd_C ( cuComplex *  d_out,
unsigned  ndims,
const unsigned *  dims,
int  nshifts,
const int *  d_shifts,
const cuComplex *  d_in,
unsigned  batch,
unsigned  batch_shift 
)

Complex single-precision array shift.

afError af_shiftd_Z ( cuDoubleComplex *  d_out,
unsigned  ndims,
const unsigned *  dims,
int  nshifts,
const int *  d_shifts,
const cuDoubleComplex *  d_in,
unsigned  batch,
unsigned  batch_shift 
)

Complex double-precision array shift.

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines