Namespaces |
namespace | af |
Defines |
#define | BASE_ONE =false |
Functions |
array | tile (const array &A, unsigned d0, unsigned d1=1, unsigned d2=1) |
| tile (repeat) array along specified dimensions
|
array | tile (const array &A, const dim4 &dims) |
| tile (repeat) array along specified dimensions
|
array | flat (const array &A) |
| Flatten an array into column vector.
|
void | grid (array &x, array &y, const array &v1, const array &v2) |
| Create a regular mesh grid.
|
array | shift (const array &in, int dim0=0, int dim1=0, int dim2=0, int dim3=0) |
| Shift the values of an array around dimension (wrap around).
|
array | shift (const array &in, const array &shift) |
| Shift the values of an array around dimension (wrap around).
|
array | reorder (const array &in, int dim0=-1, int dim1=-1, int dim2=-1, int dim3=-1) |
| Reorder dimensions of array.
|
array | sort (const array &in, int dim=-1, bool isdescending=false) |
| Sort array along dimension.
|
void | sort (array &values, array &indices, const array &in, int dim=-1, bool isdescending=false) |
| Sort array along dimension and return original indices of sorted values.
|
void | sort (array &outkeys, array &outvalues, const array &keys, const array &values, bool isdescending=false) |
| Sort array values based on keys along dimension.
|
array | sortdim (const array &in, int dim) |
| sort treating one dimension as keys.
|
array | sortdim (const array &in, int dim, unsigned norder, const int *h_order) |
| sort treating one dimension as keys in specific order.
|
afError | af_sortByKeys_S (float *d_okeys, float *d_ovals, unsigned numel, float *d_ikeys, float *d_ivals, unsigned batch, bool DIR) |
afError | af_hankel_SSS (float *d_H, unsigned nc, float *d_C, unsigned nr, float *d_R) |
afError | af_hankel_CSC (cuComplex *d_H, unsigned nc, float *d_C, unsigned nr, cuComplex *d_R) |
afError | af_hankel_CCS (cuComplex *d_H, unsigned nc, cuComplex *d_C, unsigned nr, float *d_R) |
afError | af_hankel_CCC (cuComplex *d_H, unsigned nc, cuComplex *d_C, unsigned nr, cuComplex *d_R) |
afError | af_hankel_SSD (float *d_H, unsigned nc, float *d_C, unsigned nr, double *d_R) |
afError | af_hankel_CSZ (cuComplex *d_H, unsigned nc, float *d_C, unsigned nr, cuDoubleComplex *d_R) |
afError | af_hankel_CCD (cuComplex *d_H, unsigned nc, cuComplex *d_C, unsigned nr, double *d_R) |
afError | af_hankel_CCZ (cuComplex *d_H, unsigned nc, cuComplex *d_C, unsigned nr, cuDoubleComplex *d_R) |
afError | af_hankel_SDS (float *d_H, unsigned nc, double *d_C, unsigned nr, float *d_R) |
afError | af_hankel_CDC (cuComplex *d_H, unsigned nc, double *d_C, unsigned nr, cuComplex *d_R) |
afError | af_hankel_CZS (cuComplex *d_H, unsigned nc, cuDoubleComplex *d_C, unsigned nr, float *d_R) |
afError | af_hankel_CZC (cuComplex *d_H, unsigned nc, cuDoubleComplex *d_C, unsigned nr, cuComplex *d_R) |
afError | af_hankel_DSD (double *d_H, unsigned nc, float *d_C, unsigned nr, double *d_R) |
afError | af_hankel_ZSZ (cuDoubleComplex *d_H, unsigned nc, float *d_C, unsigned nr, cuDoubleComplex *d_R) |
afError | af_hankel_ZCD (cuDoubleComplex *d_H, unsigned nc, cuComplex *d_C, unsigned nr, double *d_R) |
afError | af_hankel_ZCZ (cuDoubleComplex *d_H, unsigned nc, cuComplex *d_C, unsigned nr, cuDoubleComplex *d_R) |
afError | af_hankel_DDS (double *d_H, unsigned nc, double *d_C, unsigned nr, float *d_R) |
afError | af_hankel_ZDC (cuDoubleComplex *d_H, unsigned nc, double *d_C, unsigned nr, cuComplex *d_R) |
afError | af_hankel_ZZS (cuDoubleComplex *d_H, unsigned nc, cuDoubleComplex *d_C, unsigned nr, float *d_R) |
afError | af_hankel_ZZC (cuDoubleComplex *d_H, unsigned nc, cuDoubleComplex *d_C, unsigned nr, cuComplex *d_R) |
afError | af_hankel_DDD (double *d_H, unsigned nc, double *d_C, unsigned nr, double *d_R) |
afError | af_hankel_ZDZ (cuDoubleComplex *d_H, unsigned nc, double *d_C, unsigned nr, cuDoubleComplex *d_R) |
afError | af_hankel_ZZD (cuDoubleComplex *d_H, unsigned nc, cuDoubleComplex *d_C, unsigned nr, double *d_R) |
afError | af_hankel_ZZZ (cuDoubleComplex *d_H, unsigned nc, cuDoubleComplex *d_C, unsigned nr, cuDoubleComplex *d_R) |
afError | af_toeplitz_SS (unsigned numelC, float *TPLZol, unsigned numelR, float *Row, float *TPLZ, unsigned NA, unsigned NB) |
afError | af_toeplitz_SC (unsigned numelC, float *TPLZol, unsigned numelR, cuComplex *Row, cuComplex *TPLZ, unsigned NA, unsigned NB) |
afError | af_toeplitz_CS (unsigned numelC, cuComplex *TPLZol, unsigned numelR, float *Row, cuComplex *TPLZ, unsigned NA, unsigned NB) |
afError | af_toeplitz_CC (unsigned numelC, cuComplex *TPLZol, unsigned numelR, cuComplex *Row, cuComplex *TPLZ, unsigned NA, unsigned NB) |
afError | af_toeplitz_SD (unsigned numelC, float *TPLZol, unsigned numelR, double *Row, float *TPLZ, unsigned NA, unsigned NB) |
afError | af_toeplitz_SZ (unsigned numelC, float *TPLZol, unsigned numelR, cuDoubleComplex *Row, cuComplex *TPLZ, unsigned NA, unsigned NB) |
afError | af_toeplitz_CD (unsigned numelC, cuComplex *TPLZol, unsigned numelR, double *Row, cuComplex *TPLZ, unsigned NA, unsigned NB) |
afError | af_toeplitz_CZ (unsigned numelC, cuComplex *TPLZol, unsigned numelR, cuDoubleComplex *Row, cuComplex *TPLZ, unsigned NA, unsigned NB) |
afError | af_toeplitz_DS (unsigned numelC, double *TPLZol, unsigned numelR, float *Row, float *TPLZ, unsigned NA, unsigned NB) |
afError | af_toeplitz_DC (unsigned numelC, double *TPLZol, unsigned numelR, cuComplex *Row, cuComplex *TPLZ, unsigned NA, unsigned NB) |
afError | af_toeplitz_ZS (unsigned numelC, cuDoubleComplex *TPLZol, unsigned numelR, float *Row, cuComplex *TPLZ, unsigned NA, unsigned NB) |
afError | af_toeplitz_ZC (unsigned numelC, cuDoubleComplex *TPLZol, unsigned numelR, cuComplex *Row, cuComplex *TPLZ, unsigned NA, unsigned NB) |
afError | af_toeplitz_DD (unsigned numelC, double *TPLZol, unsigned numelR, double *Row, double *TPLZ, unsigned NA, unsigned NB) |
afError | af_toeplitz_DZ (unsigned numelC, double *TPLZol, unsigned numelR, cuDoubleComplex *Row, cuDoubleComplex *TPLZ, unsigned NA, unsigned NB) |
afError | af_toeplitz_ZD (unsigned numelC, cuDoubleComplex *TPLZol, unsigned numelR, double *Row, cuDoubleComplex *TPLZ, unsigned NA, unsigned NB) |
afError | af_toeplitz_ZZ (unsigned numelC, cuDoubleComplex *TPLZol, unsigned numelR, cuDoubleComplex *Row, cuDoubleComplex *TPLZ, unsigned NA, unsigned NB) |
afError | af_triMat_S (unsigned m, unsigned n, float *d_A, float *d_T, int diag, bool direction, unsigned batch) |
afError | af_triMat_C (unsigned m, unsigned n, cuComplex *d_A, cuComplex *d_T, int diag, bool direction, unsigned batch) |
afError | af_triMat_D (unsigned m, unsigned n, double *d_A, double *d_T, int diag, bool direction, unsigned batch) |
afError | af_triMat_Z (unsigned m, unsigned n, cuDoubleComplex *d_A, cuDoubleComplex *d_T, int diag, bool direction, unsigned batch) |
afError | af_conj_inp_C (unsigned numel, cuComplex *vals) |
afError | af_conj_inp_Z (unsigned numel, cuDoubleComplex *vals) |
afError | af_norm_inp_C (unsigned numel, cuComplex *vals, float val) |
afError | af_norm_inp_Z (unsigned numel, cuDoubleComplex *vals, double val) |
afError | af_isTrig_B (bool *res, unsigned rows, unsigned columns, const bool *in, unsigned batch, bool dir) |
afError | af_isTrig_S (bool *res, unsigned rows, unsigned columns, const float *in, unsigned batch, bool dir) |
afError | af_isTrig_C (bool *res, unsigned rows, unsigned columns, const cuComplex *in, unsigned batch, bool dir) |
afError | af_isTrig_D (bool *res, unsigned rows, unsigned columns, const double *in, unsigned batch, bool dir) |
afError | af_isTrig_Z (bool *res, unsigned rows, unsigned columns, const cuDoubleComplex *in, unsigned batch, bool dir) |
afError | af_isSym_B (bool *res, unsigned width, const bool *in, unsigned batch) |
afError | af_isSym_S (bool *res, unsigned width, const float *in, unsigned batch) |
afError | af_isSym_C (bool *res, unsigned width, const cuComplex *in, unsigned batch) |
afError | af_isSym_D (bool *res, unsigned width, const double *in, unsigned batch) |
afError | af_isSym_Z (bool *res, unsigned width, const cuDoubleComplex *in, unsigned batch) |
afError | af_isHerm_B (bool *res, unsigned width, const bool *in, unsigned batch) |
afError | af_isHerm_S (bool *res, unsigned width, const float *in, unsigned batch) |
afError | af_isHerm_C (bool *res, unsigned width, const cuComplex *in, unsigned batch) |
afError | af_isHerm_D (bool *res, unsigned width, const double *in, unsigned batch) |
afError | af_isHerm_Z (bool *res, unsigned width, const cuDoubleComplex *in, unsigned batch) |
afError | af_isneg_S (const float *d_in, unsigned n, bool *is_neg) |
afError | af_isneg_D (const double *d_in, unsigned n, bool *is_neg) |
|
Transpose and complex-conjugate transpose of matrices with optional batching.
- Parameters:
-
[out] | d_out | Transposed matrix. |
[in] | w | Rows of input (first dimension); columns of output (second dimension). |
[in] | h | Columns of input (second dimension); rows of output (first dimension). |
[in] | d_in | Original matrix. |
[in] | batch | Number of matrix tiles. |
|
afError | af_ctranspose_C (cuComplex *d_out, unsigned w, unsigned h, const cuComplex *d_in, unsigned batch) |
| Single-precision complex-conjugate transpose.
|
afError | af_ctranspose_Z (cuDoubleComplex *d_out, unsigned w, unsigned h, const cuDoubleComplex *d_in, unsigned batch) |
| Double-precision complex-conjugate transpose.
|
|
Transpose of the input matrix without performing the conjugate.
|
afError | af_transpose_B (bool *d_out, unsigned w, unsigned h, const bool *d_in, unsigned batch) |
| Boolean (8-bit) transpose (non-conjugated).
|
afError | af_transpose_I (int *d_out, unsigned w, unsigned h, const int *d_in, unsigned batch) |
| 32-bit integer transpose.
|
afError | af_transpose_U (unsigned *d_out, unsigned w, unsigned h, const unsigned *d_in, unsigned batch) |
| 32-bit unsigned integer transpose.
|
afError | af_transpose_S (float *d_out, unsigned w, unsigned h, const float *d_in, unsigned batch) |
| Single-precision transpose (non-conjugated).
|
afError | af_transpose_D (double *d_out, unsigned w, unsigned h, const double *d_in, unsigned batch) |
| Double-precision transpose (non-conjugated).
|
afError | af_transpose_C (cuComplex *d_out, unsigned w, unsigned h, const cuComplex *d_in, unsigned batch) |
| Complex single-precision transpose (non-conjugated).
|
afError | af_transpose_Z (cuDoubleComplex *d_out, unsigned w, unsigned h, const cuDoubleComplex *d_in, unsigned batch) |
| Complex double-precision transpose (non-conjugated).
|
|
Replicate an array along specified dimensions.
- Parameters:
-
[out] | d_out | Replicated array |
[in] | ndims | Number of dimensions in array dims |
[in] | dims | Array of dimensions |
[in] | d_in | Original array. |
[in] | nreps | Number of replications in array reps |
[in] | reps | Array indicating extent of replication in each dimension, e.g. [1 2] replicates only in the second dimension. |
[in] | batch | Number of tiles in batch. |
|
afError | af_tile_S (float *d_out, unsigned ndims, const unsigned *dims, const float *d_in, unsigned nreps, const unsigned *reps, unsigned batch) |
| Single-precision array replication.
|
afError | af_tile_D (double *d_out, unsigned ndims, const unsigned *dims, const double *d_in, unsigned nreps, const unsigned *reps, unsigned batch) |
| Double-precision array replication.
|
afError | af_tile_B (bool *d_out, unsigned ndims, const unsigned *dims, const bool *d_in, unsigned nreps, const unsigned *reps, unsigned batch) |
| Boolean (8-bit) array replication.
|
afError | af_tile_U (unsigned *d_out, unsigned ndims, const unsigned *dims, const unsigned *d_in, unsigned nreps, const unsigned *reps, unsigned batch) |
| Unsigned integer array replication.
|
afError | af_tile_I (int *d_out, unsigned ndims, const unsigned *dims, const int *d_in, unsigned nreps, const unsigned *reps, unsigned batch) |
| Integer array replication.
|
afError | af_tile_C (cuComplex *d_out, unsigned ndims, const unsigned *dims, const cuComplex *d_in, unsigned nreps, const unsigned *reps, unsigned batch) |
| Complex single-precision array replication.
|
afError | af_tile_Z (cuDoubleComplex *d_out, unsigned ndims, const unsigned *dims, const cuDoubleComplex *d_in, unsigned nreps, const unsigned *reps, unsigned batch) |
| Complex double-precision array replication.
|
|
Shift the contents of an array along specified dimensions and wrap.
- Parameters:
-
[out] | d_out | Shifted array |
[in] | ndims | Number of dimensions in array dims |
[in] | dims | Array of dimensions |
[in] | nshifts | Number of shifts in array shifts |
[in] | h_shifts | Array(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_in | Original array. |
[in] | batch | Number 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.
|
|
Shift the contents of an array along specified dimensions and wrap.
- Parameters:
-
[out] | d_out | Shifted array |
[in] | ndims | Number of dimensions in array dims |
[in] | dims | Array of dimensions |
[in] | nshifts | Number of shifts in array shifts |
[in] | d_shifts | Array(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_in | Original array. |
[in] | batch | Number of tiles of input. |
[in] | batch_shift | Number 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.
|
|
- Parameters:
-
[out] | d_out | Shifted array |
[in] | ndims | Number of dimensions in array dims |
[in] | dims | Dimensions of d_in |
[in] | nperms | Number of dimensions indicated in the permutation array perms |
[in] | perms | Zero-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_in | Original array. |
[in] | batch | Number 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.
|
|
- Parameters:
-
[out] | d_sorted | Sorted values |
[out] | d_Indices | Indices indicating original positions. One indexed |
[in] | ndims | Number of dimensions in dims |
[in] | dims | Dimensions of input |
[in] | d_input | Original array values |
[in] | DIR | Sort direction: true in descending order, false in ascending order. |
[in] | dim | Dimension to sort along (first dimension is zero) |
[in] | batch | Number of tiles in batch. |
[in] | base_one | To shift indices to one-based. |
|
afError | af_sort_S (float *d_sorted, float *d_Indices, unsigned ndims, const unsigned *dims, float *d_input, bool DIR, unsigned dim, unsigned batch, bool base_one=false) |
| Single-precision sort.
|
afError | af_sort_D (double *d_sorted, double *d_Indices, unsigned ndims, const unsigned *dims, double *d_input, bool DIR, unsigned dim, unsigned batch, bool base_one=false) |
| Double-precision sort.
|
afError | af_sort_I (int *d_sorted, int *d_Indices, unsigned ndims, const unsigned *dims, int *d_input, bool DIR, unsigned dim, unsigned batch, bool base_one=false) |
| 32-bit Integer sort.
|
afError | af_sort_U (unsigned *d_sorted, unsigned *d_Indices, unsigned ndims, const unsigned *dims, unsigned *d_input, bool DIR, unsigned dim, unsigned batch, bool base_one=false) |
| 32-bit Unsigned Integer sort.
|
|
- Parameters:
-
[out] | res | Nonzero iff sorted |
[in] | rows | number of rows (first dimension) |
[in] | cols | number of columns (second dimension) |
[in] | d_in | Input array |
[in] | is_row | True if rows of matrix are sorted, otherwise false. |
[in] | batch | Number of tiles in batch. |
|
afError | af_issorted_S (unsigned char *res, unsigned rows, unsigned cols, const float *d_in, bool is_row, unsigned batch) |
| Single-precision issorted.
|
afError | af_issorted_D (unsigned char *res, unsigned rows, unsigned cols, const double *d_in, bool is_row, unsigned batch) |
| Double-precision issorted.
|
|
- Parameters:
-
[out] | d_Y | Sorted output array |
[out] | d_I | Indexed rows |
[in] | rows | number of rows in input matrix (first dimension) |
[in] | cols | number of columns in input matrix(second dimension) |
[in] | d_X | Input array |
[in] | numel_C | Number of elements in vector C |
[in] | h_C | Vector specifying order of sort for a column. Must be on host |
|
afError | af_sortrows_S (float *d_Y, unsigned *d_I, unsigned rows, unsigned cols, const float *d_X, unsigned numel_C, const int *h_C) |
| Single-precision issorted.
|
afError | af_sortrows_D (double *d_Y, unsigned *d_I, unsigned rows, unsigned cols, const double *d_X, unsigned numel_C, const int *h_C) |
| Double-precision issorted.
|