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

Reorder Matrix Dimensions

Matrix manipulation

Reorder (rearrange) the dimensions of an array. More...

Device pointer interface: Reorder the input matrix

Parameters:
[out]d_outShifted array
[in]ndimsNumber of dimensions in array dims
[in]dimsDimensions of d_in
[in]npermsNumber of dimensions indicated in the permutation array perms
[in]permsZero-based array indicating new order of dimensions, e.g. [1 0 2] swaps the first two dimensions, [2 1 0] swaps the first and third dimensions.
[in]d_inOriginal array.
[in]batchNumber of tiles in batch.

afError af_reorder_B (bool *d_out, unsigned ndims, const unsigned *dims, int nperms, const int *perms, const bool *d_in, unsigned batch)
 Boolean (8-bit) array reorder.
afError af_reorder_I (int *d_out, unsigned ndims, const unsigned *dims, int nperms, const int *perms, const int *d_in, unsigned batch)
 Integer array reorder.
afError af_reorder_U (unsigned *d_out, unsigned ndims, const unsigned *dims, int nperms, const int *perms, const unsigned *d_in, unsigned batch)
 Unsigned integer array reorder.
afError af_reorder_S (float *d_out, unsigned ndims, const unsigned *dims, int nperms, const int *perms, const float *d_in, unsigned batch)
 Single-precision array reorder.
afError af_reorder_D (double *d_out, unsigned ndims, const unsigned *dims, int nperms, const int *perms, const double *d_in, unsigned batch)
 Double-precision array reorder.
afError af_reorder_C (cuComplex *d_out, unsigned ndims, const unsigned *dims, int nperms, const int *perms, const cuComplex *d_in, unsigned batch)
 Complex single-precision array reorder.
afError af_reorder_Z (cuDoubleComplex *d_out, unsigned ndims, const unsigned *dims, int nperms, const int *perms, const cuDoubleComplex *d_in, unsigned batch)
 Complex double-precision array reorder.

Detailed Description

Reorder (rearrange) the dimensions of an array.

Transpose is a special case of reorder: swap the first two dimension


Function Documentation

afError af_reorder_B ( bool *  d_out,
unsigned  ndims,
const unsigned *  dims,
int  nperms,
const int *  perms,
const bool *  d_in,
unsigned  batch 
)

Boolean (8-bit) array reorder.

afError af_reorder_I ( int *  d_out,
unsigned  ndims,
const unsigned *  dims,
int  nperms,
const int *  perms,
const int *  d_in,
unsigned  batch 
)

Integer array reorder.

afError af_reorder_U ( unsigned *  d_out,
unsigned  ndims,
const unsigned *  dims,
int  nperms,
const int *  perms,
const unsigned *  d_in,
unsigned  batch 
)

Unsigned integer array reorder.

afError af_reorder_S ( float *  d_out,
unsigned  ndims,
const unsigned *  dims,
int  nperms,
const int *  perms,
const float *  d_in,
unsigned  batch 
)

Single-precision array reorder.

afError af_reorder_D ( double *  d_out,
unsigned  ndims,
const unsigned *  dims,
int  nperms,
const int *  perms,
const double *  d_in,
unsigned  batch 
)

Double-precision array reorder.

afError af_reorder_C ( cuComplex *  d_out,
unsigned  ndims,
const unsigned *  dims,
int  nperms,
const int *  perms,
const cuComplex *  d_in,
unsigned  batch 
)

Complex single-precision array reorder.

afError af_reorder_Z ( cuDoubleComplex *  d_out,
unsigned  ndims,
const unsigned *  dims,
int  nperms,
const int *  perms,
const cuDoubleComplex *  d_in,
unsigned  batch 
)

Complex double-precision array reorder.

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines