core.h File Reference

(2014-04-30 15:38:09 -0400, (build fd32605))

#include "defines.h"

Go to the source code of this file.

Namespaces

 af
 

Macros

#define IS_BASEONE   =false
 

Enumerations

enum  af_op_t { sum_t = 0, prod_t }
 

Functions

afError af_alltrue_vector (bool *h_dst, unsigned numel, const float *d_src)
 
afError af_alltrue_vector (bool *h_dst, unsigned numel, const bool *d_src)
 all along boolean vector More...
 
afError af_alltrue_vector (bool *h_dst, unsigned numel, const int *d_src)
 all along 32-bit signed integer vector More...
 
afError af_alltrue_vector (bool *h_dst, unsigned numel, const unsigned *d_src)
 all along 32-bit unsigned integer vector More...
 
afError af_alltrue_vector (bool *h_dst, unsigned numel, const cfloat *d_src)
 all along single precision, complex vector More...
 
afError af_alltrue_vector (bool *h_dst, unsigned numel, const double *d_src)
 all along double precision vector More...
 
afError af_alltrue_vector (bool *h_dst, unsigned numel, const cdouble *d_src)
 all along double precision, complex vector More...
 
afError af_alltrue (bool *d_dst, unsigned ndims, const unsigned *dims, const float *d_src, int dim)
 all along a dimension in single precision matrix More...
 
afError af_alltrue (bool *d_dst, unsigned ndims, const unsigned *dims, const bool *d_src, int dim)
 all along a dimension in boolean matrix More...
 
afError af_alltrue (bool *d_dst, unsigned ndims, const unsigned *dims, const int *d_src, int dim)
 all along a dimension in 32-bit signed integer matrix More...
 
afError af_alltrue (bool *d_dst, unsigned ndims, const unsigned *dims, const unsigned *d_src, int dim)
 all along a dimension in 32-bit unsigned integer matrix More...
 
afError af_alltrue (bool *d_dst, unsigned ndims, const unsigned *dims, const cfloat *d_src, int dim)
 all along a dimension in single precision, complex matrix More...
 
afError af_alltrue (bool *d_dst, unsigned ndims, const unsigned *dims, const double *d_src, int dim)
 all along a dimension in double precision matrix More...
 
afError af_alltrue (bool *d_dst, unsigned ndims, const unsigned *dims, const cdouble *d_src, int dim)
 all along a dimension in double precision, complex matrix More...
 
afError af_anytrue_vector (bool *h_dst, unsigned numel, const float *d_src)
 any along single precision vector More...
 
afError af_anytrue_vector (bool *h_dst, unsigned numel, const bool *d_src)
 any along boolean vector More...
 
afError af_anytrue_vector (bool *h_dst, unsigned numel, const int *d_src)
 any along 32-bit signed integer vector More...
 
afError af_anytrue_vector (bool *h_dst, unsigned numel, const unsigned *d_src)
 any along 32-bit unsigned integer vector More...
 
afError af_anytrue_vector (bool *h_dst, unsigned numel, const cfloat *d_src)
 any along single precision, complex vector More...
 
afError af_anytrue_vector (bool *h_dst, unsigned numel, const double *d_src)
 any along double precision vector More...
 
afError af_anytrue_vector (bool *h_dst, unsigned numel, const cdouble *d_src)
 any along double precision, complex vector More...
 
afError af_anytrue (bool *d_dst, unsigned ndims, const unsigned *dims, const float *d_src, int dim)
 any along a dimension in single precision matrix More...
 
afError af_anytrue (bool *d_dst, unsigned ndims, const unsigned *dims, const bool *d_src, int dim)
 any along a dimension in boolean matrix More...
 
afError af_anytrue (bool *d_dst, unsigned ndims, const unsigned *dims, const int *d_src, int dim)
 any along a dimension in 32-bit signed integer matrix More...
 
afError af_anytrue (bool *d_dst, unsigned ndims, const unsigned *dims, const unsigned *d_src, int dim)
 any along a dimension in 32-bit unsigned integer matrix More...
 
afError af_anytrue (bool *d_dst, unsigned ndims, const unsigned *dims, const cfloat *d_src, int dim)
 any along a dimension in single precision, complex matrix More...
 
afError af_anytrue (bool *d_dst, unsigned ndims, const unsigned *dims, const double *d_src, int dim)
 any along a dimension in double precision matrix More...
 
afError af_anytrue (bool *d_dst, unsigned ndims, const unsigned *dims, const cdouble *d_src, int dim)
 any along a dimension in double precision, complex matrix More...
 
afError af_max_vector (float *h_dst, unsigned numel, const float *d_src)
 Maximum value of a single precision vector. More...
 
afError af_max_vector (bool *h_dst, unsigned numel, const bool *d_src)
 Maximum value of a boolean vector. More...
 
afError af_max_vector (int *h_dst, unsigned numel, const int *d_src)
 Maximum value of a 32-bit signed integer vector. More...
 
afError af_max_vector (unsigned *h_dst, unsigned numel, const unsigned *d_src)
 Maximum value of a 32-bit unsigned integer vector. More...
 
afError af_max_vector (cfloat *h_dst, unsigned numel, const cfloat *d_src)
 Maximum value of a single precision, complex vector. More...
 
afError af_max_vector (double *h_dst, unsigned numel, const double *d_src)
 Maximum value of a double precision vector. More...
 
afError af_max_vector (cdouble *h_dst, unsigned numel, const cdouble *d_src)
 Maximum value of a double precision, complex vector. More...
 
afError af_imax_vector (float *h_dst, int *h_idx, unsigned numel, const float *d_src, bool is_baseone=false)
 Maximum value of a single precision vector. More...
 
afError af_imax_vector (int *h_dst, int *h_idx, unsigned numel, const int *d_src, bool is_baseone=false)
 Maximum value of a 32-bit signed integer vector. More...
 
afError af_imax_vector (unsigned *h_dst, int *h_idx, unsigned numel, const unsigned *d_src, bool is_baseone=false)
 Maximum value of a 32-bit unsigned integer vector. More...
 
afError af_imax_vector (bool *h_dst, int *h_idx, unsigned numel, const bool *d_src, bool is_baseone=false)
 Maximum value of a boolean vector. More...
 
afError af_imax_vector (cfloat *h_dst, int *h_idx, unsigned numel, const cfloat *d_src, bool is_baseone=false)
 Maximum value of a single precision, complex vector. More...
 
afError af_imax_vector (double *h_dst, int *h_idx, unsigned numel, const double *d_src, bool is_baseone=false)
 Maximum value of a double precision vector. More...
 
afError af_imax_vector (cdouble *h_dst, int *h_idx, unsigned numel, const cdouble *d_src, bool is_baseone=false)
 Maximum value of a double precision, complex vector. More...
 
afError af_max (float *d_dst, unsigned ndims, const unsigned *dims, const float *d_src, int dim)
 Maximum value along a dimension in single precision matrix. More...
 
afError af_max (bool *d_dst, unsigned ndims, const unsigned *dims, const bool *d_src, int dim)
 Maximum value along a dimension in boolean matrix. More...
 
afError af_max (int *d_dst, unsigned ndims, const unsigned *dims, const int *d_src, int dim)
 Maximum value along a dimension in 32-bit signed integer matrix. More...
 
afError af_max (unsigned *d_dst, unsigned ndims, const unsigned *dims, const unsigned *d_src, int dim)
 Maximum value along a dimension in 32-bit unsigned integer matrix. More...
 
afError af_max (cfloat *d_dst, unsigned ndims, const unsigned *dims, const cfloat *d_src, int dim)
 Maximum value along a dimension in single precision, complex matrix. More...
 
afError af_max (double *d_dst, unsigned ndims, const unsigned *dims, const double *d_src, int dim)
 Maximum value along a dimension in double precision matrix. More...
 
afError af_max (cdouble *d_dst, unsigned ndims, const unsigned *dims, const cdouble *d_src, int dim)
 Maximum value along a dimension in double precision, complex matrix. More...
 
afError af_imax (float *d_dst, int *d_idx, unsigned ndims, const unsigned *dims, const float *d_src, int dim, bool is_baseone=false)
 Maximum value along a dimension in single precision matrix. More...
 
afError af_imax (int *d_dst, int *d_idx, unsigned ndims, const unsigned *dims, const int *d_src, int dim, bool is_baseone=false)
 Maximum value along a dimension in 32-bit signed integer matrix. More...
 
afError af_imax (unsigned *d_dst, int *d_idx, unsigned ndims, const unsigned *dims, const unsigned *d_src, int dim, bool is_baseone=false)
 Maximum value along a dimension in 32-bit unsigned integer matrix. More...
 
afError af_imax (bool *d_dst, int *d_idx, unsigned ndims, const unsigned *dims, const bool *d_src, int dim, bool is_baseone=false)
 Maximum value along a dimension in boolean matrix. More...
 
afError af_imax (cfloat *d_dst, int *d_idx, unsigned ndims, const unsigned *dims, const cfloat *d_src, int dim, bool is_baseone=false)
 Maximum value along a dimension in single precision, complex matrix. More...
 
afError af_imax (double *d_dst, int *d_idx, unsigned ndims, const unsigned *dims, const double *d_src, int dim, bool is_baseone=false)
 Maximum value along a dimension in double precision matrix. More...
 
afError af_imax (cdouble *d_dst, int *d_idx, unsigned ndims, const unsigned *dims, const cdouble *d_src, int dim, bool is_baseone=false)
 Maximum value along a dimension in double precision, complex matrix. More...
 
afError af_min_vector (float *h_dst, unsigned numel, const float *d_src)
 Minimum value of a single precision vector. More...
 
afError af_min_vector (bool *h_dst, unsigned numel, const bool *d_src)
 Minimum value of a boolean vector. More...
 
afError af_min_vector (int *h_dst, unsigned numel, const int *d_src)
 Minimum value of a 32-bit signed integer vector. More...
 
afError af_min_vector (unsigned *h_dst, unsigned numel, const unsigned *d_src)
 Minimum value of a 32-bit unsigned integer vector. More...
 
afError af_min_vector (cfloat *h_dst, unsigned numel, const cfloat *d_src)
 Minimum value of a single precision, complex vector. More...
 
afError af_min_vector (double *h_dst, unsigned numel, const double *d_src)
 Minimum value of a double precision vector. More...
 
afError af_min_vector (cdouble *h_dst, unsigned numel, const cdouble *d_src)
 Minimum value of a double precision, complex vector. More...
 
afError af_imin_vector (float *h_dst, int *h_idx, unsigned numel, const float *d_src, bool is_baseone=false)
 Minimum value of a single precision vector. More...
 
afError af_imin_vector (int *h_dst, int *h_idx, unsigned numel, const int *d_src, bool is_baseone=false)
 Minimum value of a 32-bit signed integer vector. More...
 
afError af_imin_vector (unsigned *h_dst, int *h_idx, unsigned numel, const unsigned *d_src, bool is_baseone=false)
 Minimum value of a 32-bit unsigned integer vector. More...
 
afError af_imin_vector (bool *h_dst, int *h_idx, unsigned numel, const bool *d_src, bool is_baseone=false)
 Minimum value of a boolean vector. More...
 
afError af_imin_vector (cfloat *h_dst, int *h_idx, unsigned numel, const cfloat *d_src, bool is_baseone=false)
 Minimum value of a single precision, complex vector. More...
 
afError af_imin_vector (double *h_dst, int *h_idx, unsigned numel, const double *d_src, bool is_baseone=false)
 Minimum value of a double precision vector. More...
 
afError af_imin_vector (cdouble *h_dst, int *h_idx, unsigned numel, const cdouble *d_src, bool is_baseone=false)
 Minimum value of a double precision, complex vector. More...
 
afError af_min (float *d_dst, unsigned ndims, const unsigned *dims, const float *d_src, int dim)
 Minimum value along a dimension in single precision matrix. More...
 
afError af_min (bool *d_dst, unsigned ndims, const unsigned *dims, const bool *d_src, int dim)
 Minimum value along a dimension in boolean matrix. More...
 
afError af_min (int *d_dst, unsigned ndims, const unsigned *dims, const int *d_src, int dim)
 Minimum value along a dimension in 32-bit signed integer matrix. More...
 
afError af_min (unsigned *d_dst, unsigned ndims, const unsigned *dims, const unsigned *d_src, int dim)
 Minimum value along a dimension in 32-bit unsigned integer matrix. More...
 
afError af_min (cfloat *d_dst, unsigned ndims, const unsigned *dims, const cfloat *d_src, int dim)
 Minimum value along a dimension in single precision, complex matrix. More...
 
afError af_min (double *d_dst, unsigned ndims, const unsigned *dims, const double *d_src, int dim)
 Minimum value along a dimension in double precision matrix. More...
 
afError af_min (cdouble *d_dst, unsigned ndims, const unsigned *dims, const cdouble *d_src, int dim)
 Minimum value along a dimension in double precision, complex matrix. More...
 
afError af_imin (float *d_dst, int *d_idx, unsigned ndims, const unsigned *dims, const float *d_src, int dim, bool is_baseone=false)
 Minimum value along a dimension in single precision matrix. More...
 
afError af_imin (int *d_dst, int *d_idx, unsigned ndims, const unsigned *dims, const int *d_src, int dim, bool is_baseone=false)
 Minimum value along a dimension in 32-bit signed integer matrix. More...
 
afError af_imin (unsigned *d_dst, int *d_idx, unsigned ndims, const unsigned *dims, const unsigned *d_src, int dim, bool is_baseone=false)
 Minimum value along a dimension in 32-bit unsigned integer matrix. More...
 
afError af_imin (bool *d_dst, int *d_idx, unsigned ndims, const unsigned *dims, const bool *d_src, int dim, bool is_baseone=false)
 Minimum value along a dimension in boolean matrix. More...
 
afError af_imin (cfloat *d_dst, int *d_idx, unsigned ndims, const unsigned *dims, const cfloat *d_src, int dim, bool is_baseone=false)
 Minimum value along a dimension in single precision, complex matrix. More...
 
afError af_imin (double *d_dst, int *d_idx, unsigned ndims, const unsigned *dims, const double *d_src, int dim, bool is_baseone=false)
 Minimum value along a dimension in double precision matrix. More...
 
afError af_imin (cdouble *d_dst, int *d_idx, unsigned ndims, const unsigned *dims, const cdouble *d_src, int dim, bool is_baseone=false)
 Minimum value along a dimension in double precision, complex matrix. More...
 
afError af_minmax_vector (float2 *h_dst, unsigned numel, const float *d_src)
 Minimum and maximum value of a single precision vector. More...
 
afError af_minmax (float2 *d_dst, unsigned ndims, const unsigned *dims, const float *d_src, int dim)
 Minimum and maximum value along a dimension in single precision matrix. More...
 
afError af_minmax_vector (double2 *h_dst, unsigned numel, const double *d_src)
 Minimum and maximum value of a single precision vector. More...
 
afError af_minmax (double2 *d_dst, unsigned ndims, const unsigned *dims, const double *d_src, int dim)
 Minimum and maximum value along a dimension in single precision matrix. More...
 
afError af_sum_vector (float *h_dst, unsigned numel, const float *d_src)
 sum The value of a single precision vector More...
 
afError af_sum_vector (float *h_dst, unsigned numel, const bool *d_src)
 sum The value of a boolean vector More...
 
afError af_sum_vector (int *h_dst, unsigned numel, const int *d_src)
 sum The value of a 32-bit signed integer vector More...
 
afError af_sum_vector (unsigned *h_dst, unsigned numel, const unsigned *d_src)
 sum The value of a 32-bit unsigned integer vector More...
 
afError af_sum_vector (cfloat *h_dst, unsigned numel, const cfloat *d_src)
 sum The value of a single precision, complex vector More...
 
afError af_sum_vector (double *h_dst, unsigned numel, const double *d_src)
 sum The value of a double precision vector More...
 
afError af_sum_vector (cdouble *h_dst, unsigned numel, const cdouble *d_src)
 sum The value of a double precision, complex vector More...
 
afError af_sum (float *d_dst, unsigned ndims, const unsigned *dims, const float *d_src, int dim)
 sum the value along a dimension in single precision matrix More...
 
afError af_sum (float *d_dst, unsigned ndims, const unsigned *dims, const bool *d_src, int dim)
 sum the value along a dimension in boolean matrix More...
 
afError af_sum (int *d_dst, unsigned ndims, const unsigned *dims, const int *d_src, int dim)
 sum the value along a dimension in 32-bit signed integer matrix More...
 
afError af_sum (unsigned *d_dst, unsigned ndims, const unsigned *dims, const unsigned *d_src, int dim)
 sum the value along a dimension in 32-bit unsigned integer matrix More...
 
afError af_sum (cfloat *d_dst, unsigned ndims, const unsigned *dims, const cfloat *d_src, int dim)
 sum the value along a dimension in single precision, complex matrix More...
 
afError af_sum (double *d_dst, unsigned ndims, const unsigned *dims, const double *d_src, int dim)
 sum the value along a dimension in double precision matrix More...
 
afError af_sum (cdouble *d_dst, unsigned ndims, const unsigned *dims, const cdouble *d_src, int dim)
 sum the value along a dimension in double precision, complex matrix More...
 
afError af_mul_vector (float *h_dst, unsigned numel, const float *d_src)
 multiplication of the values of a single precision vector More...
 
afError af_mul_vector (int *h_dst, unsigned numel, const int *d_src)
 multiplication of the values of a 32-bit signed integer vector More...
 
afError af_mul_vector (unsigned *h_dst, unsigned numel, const unsigned *d_src)
 multiplication of the values of a 32-bit unsigned integer vector More...
 
afError af_mul_vector (float *h_dst, unsigned numel, const bool *d_src)
 multiplication of the values of a boolean vector More...
 
afError af_mul_vector (cfloat *h_dst, unsigned numel, const cfloat *d_src)
 multiplication of the values of a single precision, complex vector More...
 
afError af_mul_vector (double *h_dst, unsigned numel, const double *d_src)
 multiplication of the values of a double precision vector More...
 
afError af_mul_vector (cdouble *h_dst, unsigned numel, const cdouble *d_src)
 multiplication of the values of a double precision, complex vector More...
 
afError af_mul (float *d_dst, unsigned ndims, const unsigned *dims, const float *d_src, int dim)
 multiplication of the values along a dimension in single precision matrix More...
 
afError af_mul (int *d_dst, unsigned ndims, const unsigned *dims, const int *d_src, int dim)
 multiplication of the values along a dimension in 32-bit signed integer matrix More...
 
afError af_mul (unsigned *d_dst, unsigned ndims, const unsigned *dims, const unsigned *d_src, int dim)
 multiplication of the values along a dimension in 32-bit unsigned integer matrix More...
 
afError af_mul (float *d_dst, unsigned ndims, const unsigned *dims, const bool *d_src, int dim)
 multiplication of the values along a dimension in a boolean More...
 
afError af_mul (cfloat *d_dst, unsigned ndims, const unsigned *dims, const cfloat *d_src, int dim)
 multiplication of the values along a dimension in single precision, complex matrix More...
 
afError af_mul (double *d_dst, unsigned ndims, const unsigned *dims, const double *d_src, int dim)
 multiplication of the values along a dimension in double precision matrix More...
 
afError af_mul (cdouble *d_dst, unsigned ndims, const unsigned *dims, const cdouble *d_src, int dim)
 multiplication of the values along a dimension in double precision, complex matrix More...
 
afError af_int_S (int *out, float *in, unsigned numel)
 
afError af_int_D (int *out, double *in, unsigned numel)
 
afError af_S_int (float *out, int *in, unsigned numel)
 
afError af_D_int (double *out, int *in, unsigned numel)
 
template<typename ty >
ty dot (const array &x, const array &y)
 Scalar dot product between two vectors. More...
 
array sum (const array &input, int dim=-1)
 
template<typename ty >
ty sum (const array &input)
 
array mul (const array &input, int dim=-1)
 
template<typename ty >
ty mul (const array &input)
 
array min (const array &input, int dim=-1)
 Minimum of the elements along a dimension in matrix. More...
 
void min (array &values, array &indices, const array &input, int dim=-1)
 Minimum value and index found along dimension. More...
 
template<typename ty >
ty min (const array &input)
 Minimum value among all elements in array. More...
 
template<typename ty >
void min (ty *value, int *index, const array &input)
 Minimum value and index among all elements in array. More...
 
array max (const array &input, int dim=-1)
 Maximum of the elements along a dimension in matrix. More...
 
void max (array &values, array &indices, const array &input, int dim=-1)
 Maximum value and index found along dimension. More...
 
template<typename ty >
ty max (const array &input)
 Maximum value among all elements in array. More...
 
template<typename ty >
void max (ty *value, int *index, const array &input)
 Maximum value and index among all elements in array. More...
 
array minmax_packed (const array &input, int dim=-1)
 Minimum and maximum (packed) of the elements along a dimension in matrix. More...
 
void minmax (array &minvalues, array &maxvalues, const array &input, int dim=-1)
 Minimum and maximum of the elements along a dimension in matrix. More...
 
template<typename ty >
ty minmax (const array &input)
 Minimum (out.x) and maximum (out.y) values among all elements in array. More...
 
array alltrue (const array &input, int dim=-1)
 Test if all elements are true (nonzero) along a dimension in input. More...
 
template<typename ty >
ty alltrue (const array &input)
 Test if all elements are true (nonzero) in entire array. More...
 
array anytrue (const array &input, int dim=-1)
 Test if all elements are false (zero) along a dimension in input. More...
 
template<typename ty >
ty anytrue (const array &input)
 Test if all elements are false (zero) in entire array. More...
 
array where (const array &input)
 Indices where nonzero (zero-based indexing). More...
 
void where (array &row, array &column, const array &input)
 row and column indices of nonzero elements in input More...
 
unsigned count (const array &input)
 Count nonzero elements in input. More...
 
array segsum (const array &input, const array &segments, bool reduce=false)
 
array accum (const array &input, int dim=-1, af_op_t op=sum_t, bool isupcast=false)
 accumulated sum More...
 
array setunique (const array &input)
 Unique values. More...
 
void setunique (array &values, array &indices, array &locations, const array &input)
 
array setunion (const array &A, const array &B)
 Union of two vectors. More...
 
void setunion (array &U, array &IA, array &IB, const array &A, const array &B)
 Union of two vectors and their indices. More...
 
array setintersect (const array &A, const array &B)
 Intersection of two vectors. More...
 
void setintersect (array &U, array &IA, array &IB, const array &A, const array &B)
 Intersection of two vectors and their indices. More...
 
array mean (const array &input, int dim=-1)
 Average along a dimension. More...
 
template<typename ty >
ty mean (const array &input)
 Average of all elements in array. More...
 
array var (const array &input, bool isbiased=false, int dim=-1)
 Variance along a dimension. More...
 
array var (const array &input, const array weights, int dim=-1)
 Weighted variance along a dimension. More...
 
template<typename ty >
ty var (const array &input, bool isbiased=false)
 Variance of all elements in array. More...
 
template<typename ty >
ty var (const array &input, const array weights)
 Weighted variance of all elements in array. More...
 
array cov (const array &input, bool isbiased=false)
 Covariance of row observations. More...
 
array cov (const array &X, const array &Y, bool isbiased=false)
 Covariance between two jointly distributed random variables. More...
 
array stdev (const array &in, int dim=-1)
 Standard deviation along a dimension. More...
 
template<typename ty >
ty stdev (const array &input)
 Standard deviation of all elements in a vector. More...
 
array median (const array &input, int dim=-1)
 Median along a dimension. More...
 
template<typename ty >
ty median (const array &input)
 Median of all elements in array. More...
 
template<typename ty >
ty corrcoef (const array &x, const array &y)
 Correlation coefficient of two inputs of same size. More...
 
All Elements
Parameters
[out]countScalar and on host
[in]numelThe number of elements in the vector.
[in]matThe input stream
afError af_alltrue_vector_S (bool *h_dst, unsigned numel, const float *d_src)
 all along single precision vector More...
 
afError af_alltrue_vector_B (bool *h_dst, unsigned numel, const bool *d_src)
 all along boolean vector More...
 
afError af_alltrue_vector_I (bool *h_dst, unsigned numel, const int *d_src)
 all along 32-bit signed integer vector More...
 
afError af_alltrue_vector_U (bool *h_dst, unsigned numel, const unsigned *d_src)
 all along 32-bit unsigned integer vector More...
 
afError af_alltrue_vector_C (bool *h_dst, unsigned numel, const cfloat *d_src)
 all along single precision, complex vector More...
 
afError af_alltrue_vector_D (bool *h_dst, unsigned numel, const double *d_src)
 all along double precision vector More...
 
afError af_alltrue_vector_Z (bool *h_dst, unsigned numel, const cdouble *d_src)
 all along double precision, complex vector More...
 
afError af_anytrue_vector_S (bool *h_dst, unsigned numel, const float *d_src)
 any along single precision vector More...
 
afError af_anytrue_vector_B (bool *h_dst, unsigned numel, const bool *d_src)
 any along boolean vector More...
 
afError af_anytrue_vector_I (bool *h_dst, unsigned numel, const int *d_src)
 any along 32-bit signed integer vector More...
 
afError af_anytrue_vector_U (bool *h_dst, unsigned numel, const unsigned *d_src)
 any along 32-bit unsigned integer vector More...
 
afError af_anytrue_vector_C (bool *h_dst, unsigned numel, const cfloat *d_src)
 any along single precision, complex vector More...
 
afError af_anytrue_vector_D (bool *h_dst, unsigned numel, const double *d_src)
 any along double precision vector More...
 
afError af_anytrue_vector_Z (bool *h_dst, unsigned numel, const cdouble *d_src)
 any along double precision, complex vector More...
 
afError af_max_vector_S (float *h_dst, unsigned numel, const float *d_src)
 Maximum value of a single precision vector. More...
 
afError af_max_vector_B (bool *h_dst, unsigned numel, const bool *d_src)
 Maximum value of a boolean vector. More...
 
afError af_max_vector_I (int *h_dst, unsigned numel, const int *d_src)
 Maximum value of a 32-bit signed integer vector. More...
 
afError af_max_vector_U (unsigned *h_dst, unsigned numel, const unsigned *d_src)
 Maximum value of a 32-bit unsigned integer vector. More...
 
afError af_max_vector_C (cfloat *h_dst, unsigned numel, const cfloat *d_src)
 Maximum value of a single precision, complex vector. More...
 
afError af_max_vector_D (double *h_dst, unsigned numel, const double *d_src)
 Maximum value of a double precision vector. More...
 
afError af_max_vector_Z (cdouble *h_dst, unsigned numel, const cdouble *d_src)
 Maximum value of a double precision, complex vector. More...
 
afError af_imax_vector_S (float *h_dst, int *h_idx, unsigned numel, const float *d_src, bool is_baseone=false)
 Indexed maximum value of a single precision vector. More...
 
afError af_imax_vector_I (int *h_dst, int *h_idx, unsigned numel, const int *d_src, bool is_baseone=false)
 Indexed maximum value of a 32-bit signed integer vector. More...
 
afError af_imax_vector_U (unsigned *h_dst, int *h_idx, unsigned numel, const unsigned *d_src, bool is_baseone=false)
 Indexed maximum value of a 32-bit unsigned integer vector. More...
 
afError af_imax_vector_B (bool *h_dst, int *h_idx, unsigned numel, const bool *d_src, bool is_baseone=false)
 Indexed maximum value of a boolean vector. More...
 
afError af_imax_vector_C (cfloat *h_dst, int *h_idx, unsigned numel, const cfloat *d_src, bool is_baseone=false)
 Indexed maximum value of a single precision, complex vector. More...
 
afError af_imax_vector_D (double *h_dst, int *h_idx, unsigned numel, const double *d_src, bool is_baseone=false)
 Indexed maximum value of a double precision vector. More...
 
afError af_imax_vector_Z (cdouble *h_dst, int *h_idx, unsigned numel, const cdouble *d_src, bool is_baseone=false)
 Indexed maximum value of a double precision, complex vector. More...
 
afError af_min_vector_S (float *h_dst, unsigned numel, const float *d_src)
 Minimum value of a single precision vector. More...
 
afError af_min_vector_B (bool *h_dst, unsigned numel, const bool *d_src)
 Minimum value of a boolean vector. More...
 
afError af_min_vector_I (int *h_dst, unsigned numel, const int *d_src)
 Minimum value of a 32-bit signed integer vector. More...
 
afError af_min_vector_U (unsigned *h_dst, unsigned numel, const unsigned *d_src)
 Minimum value of a 32-bit unsigned integer vector. More...
 
afError af_min_vector_C (cfloat *h_dst, unsigned numel, const cfloat *d_src)
 Minimum value of a single precision, complex vector. More...
 
afError af_min_vector_D (double *h_dst, unsigned numel, const double *d_src)
 Minimum value of a double precision vector. More...
 
afError af_min_vector_Z (cdouble *h_dst, unsigned numel, const cdouble *d_src)
 Minimum value of a double precision, complex vector. More...
 
afError af_imin_vector_S (float *h_dst, int *h_idx, unsigned numel, const float *d_src, bool is_baseone=false)
 Indexed minimum value of a single precision vector,. More...
 
afError af_imin_vector_I (int *h_dst, int *h_idx, unsigned numel, const int *d_src, bool is_baseone=false)
 Indexed minimum value of a 32-bit signed integer vector,. More...
 
afError af_imin_vector_U (unsigned *h_dst, int *h_idx, unsigned numel, const unsigned *d_src, bool is_baseone=false)
 Indexed minimum value of a 32-bit unsigned integer vector,. More...
 
afError af_imin_vector_B (bool *h_dst, int *h_idx, unsigned numel, const bool *d_src, bool is_baseone=false)
 Indexed minimum value of a boolean vector. More...
 
afError af_imin_vector_C (cfloat *h_dst, int *h_idx, unsigned numel, const cfloat *d_src, bool is_baseone=false)
 Indexed minimum value of a single precision, complex vector. More...
 
afError af_imin_vector_D (double *h_dst, int *h_idx, unsigned numel, const double *d_src, bool is_baseone=false)
 Indexed minimum value of a double precision vector. More...
 
afError af_imin_vector_Z (cdouble *h_dst, int *h_idx, unsigned numel, const cdouble *d_src, bool is_baseone=false)
 Indexed minimum value of a double precision, complex vector. More...
 
afError af_minmax_vector_S (float2 *h_dst, unsigned numel, const float *d_src)
 Minimum and maximum value of a single precision vector. More...
 
afError af_minmax_vector_D (double2 *h_dst, unsigned numel, const double *d_src)
 Minimum and maximum value of a single precision vector. More...
 
afError af_sum_vector_S (float *h_dst, unsigned numel, const float *d_src)
 sum The value of a single precision vector More...
 
afError af_sum_vector_B (float *h_dst, unsigned numel, const bool *d_src)
 sum The value of a boolean vector More...
 
afError af_sum_vector_I (int *h_dst, unsigned numel, const int *d_src)
 sum The value of a 32-bit signed integer vector More...
 
afError af_sum_vector_U (unsigned *h_dst, unsigned numel, const unsigned *d_src)
 sum The value of a 32-bit unsigned integer vector More...
 
afError af_sum_vector_C (cfloat *h_dst, unsigned numel, const cfloat *d_src)
 sum The value of a single precision, complex vector More...
 
afError af_sum_vector_D (double *h_dst, unsigned numel, const double *d_src)
 sum The value of a double precision vector More...
 
afError af_sum_vector_Z (cdouble *h_dst, unsigned numel, const cdouble *d_src)
 sum The value of a double precision, complex vector More...
 
afError af_mul_vector_S (float *h_dst, unsigned numel, const float *d_src)
 multiplication of the values of a single precision vector More...
 
afError af_mul_vector_I (int *h_dst, unsigned numel, const int *d_src)
 multiplication of the values of a 32-bit signed integer vector More...
 
afError af_mul_vector_U (unsigned *h_dst, unsigned numel, const unsigned *d_src)
 multiplication of the values of a 32-bit unsigned integer vector More...
 
afError af_mul_vector_B (float *h_dst, unsigned numel, const bool *d_src)
 multiplication of the values of a boolean vector More...
 
afError af_mul_vector_C (cfloat *h_dst, unsigned numel, const cfloat *d_src)
 multiplication of the values of a single precision, complex vector More...
 
afError af_mul_vector_D (double *h_dst, unsigned numel, const double *d_src)
 multiplication of the values of a double precision vector More...
 
afError af_mul_vector_Z (cdouble *h_dst, unsigned numel, const cdouble *d_src)
 multiplication of the values of a double precision, complex vector More...
 
afError af_nnz_vector_S (unsigned *count, unsigned numel, const float *mat)
 Number of non zero elements in a single precision stream. More...
 
afError af_nnz_vector_B (unsigned *count, unsigned numel, const bool *mat)
 Number of non zero elements in a boolean (unsigned char) stream. More...
 
afError af_nnz_vector_D (unsigned *count, unsigned numel, const double *mat)
 Number of non zero elements in a double precision stream. More...
 
Along a Dimension
Parameters
[out]countvector and on device
[in]numelThe number of elements in the vector.
[in]matThe input stream
[in]batchThe number of input tiles.
afError af_alltrue_S (bool *d_dst, unsigned ndims, const unsigned *dims, const float *d_src, int dim)
 all along a dimension in single precision matrix More...
 
afError af_alltrue_B (bool *d_dst, unsigned ndims, const unsigned *dims, const bool *d_src, int dim)
 all along a dimension in boolean matrix More...
 
afError af_alltrue_I (bool *d_dst, unsigned ndims, const unsigned *dims, const int *d_src, int dim)
 all along a dimension in 32-bit signed integer matrix More...
 
afError af_alltrue_U (bool *d_dst, unsigned ndims, const unsigned *dims, const unsigned *d_src, int dim)
 all along a dimension in 32-bit unsigned integer matrix More...
 
afError af_alltrue_C (bool *d_dst, unsigned ndims, const unsigned *dims, const cfloat *d_src, int dim)
 all along a dimension in single precision, complex matrix More...
 
afError af_alltrue_D (bool *d_dst, unsigned ndims, const unsigned *dims, const double *d_src, int dim)
 all along a dimension in double precision matrix More...
 
afError af_alltrue_Z (bool *d_dst, unsigned ndims, const unsigned *dims, const cdouble *d_src, int dim)
 all along a dimension in double precision, complex matrix More...
 
afError af_anytrue_S (bool *d_dst, unsigned ndims, const unsigned *dims, const float *d_src, int dim)
 any along a dimension in single precision matrix More...
 
afError af_anytrue_B (bool *d_dst, unsigned ndims, const unsigned *dims, const bool *d_src, int dim)
 any along a dimension in boolean matrix More...
 
afError af_anytrue_I (bool *d_dst, unsigned ndims, const unsigned *dims, const int *d_src, int dim)
 any along a dimension in 32-bit signed integer matrix More...
 
afError af_anytrue_U (bool *d_dst, unsigned ndims, const unsigned *dims, const unsigned *d_src, int dim)
 any along a dimension in 32-bit unsigned integer matrix More...
 
afError af_anytrue_C (bool *d_dst, unsigned ndims, const unsigned *dims, const cfloat *d_src, int dim)
 any along a dimension in single precision, complex matrix More...
 
afError af_anytrue_D (bool *d_dst, unsigned ndims, const unsigned *dims, const double *d_src, int dim)
 any along a dimension in double precision matrix More...
 
afError af_anytrue_Z (bool *d_dst, unsigned ndims, const unsigned *dims, const cdouble *d_src, int dim)
 any along a dimension in double precision, complex matrix More...
 
afError af_max_S (float *d_dst, unsigned ndims, const unsigned *dims, const float *d_src, int dim)
 Maximum value along a dimension in single precision matrix. More...
 
afError af_max_B (bool *d_dst, unsigned ndims, const unsigned *dims, const bool *d_src, int dim)
 Maximum value along a dimension in boolean matrix. More...
 
afError af_max_I (int *d_dst, unsigned ndims, const unsigned *dims, const int *d_src, int dim)
 Maximum value along a dimension in 32-bit signed integer matrix. More...
 
afError af_max_U (unsigned *d_dst, unsigned ndims, const unsigned *dims, const unsigned *d_src, int dim)
 Maximum value along a dimension in 32-bit unsigned integer matrix. More...
 
afError af_max_C (cfloat *d_dst, unsigned ndims, const unsigned *dims, const cfloat *d_src, int dim)
 Maximum value along a dimension in single precision, complex matrix. More...
 
afError af_max_D (double *d_dst, unsigned ndims, const unsigned *dims, const double *d_src, int dim)
 Maximum value along a dimension in double precision matrix. More...
 
afError af_max_Z (cdouble *d_dst, unsigned ndims, const unsigned *dims, const cdouble *d_src, int dim)
 Maximum value along a dimension in double precision, complex matrix. More...
 
afError af_imax_S (float *d_dst, int *d_idx, unsigned ndims, const unsigned *dims, const float *d_src, int dim, bool is_baseone=false)
 Indexed maximum value along a dimension in single precision matrix. More...
 
afError af_imax_I (int *d_dst, int *d_idx, unsigned ndims, const unsigned *dims, const int *d_src, int dim, bool is_baseone=false)
 Indexed maximum value along a dimension in 32-bit signed integer matrix. More...
 
afError af_imax_U (unsigned *d_dst, int *d_idx, unsigned ndims, const unsigned *dims, const unsigned *d_src, int dim, bool is_baseone=false)
 Indexed maximum value along a dimension in 32-bit signed integer matrix. More...
 
afError af_imax_B (bool *d_dst, int *d_idx, unsigned ndims, const unsigned *dims, const bool *d_src, int dim, bool is_baseone=false)
 Indexed maximum value along a dimension in boolean matrix. More...
 
afError af_imax_C (cfloat *d_dst, int *d_idx, unsigned ndims, const unsigned *dims, const cfloat *d_src, int dim, bool is_baseone=false)
 Indexed maximum value along a dimension in single precision, cplx matrix. More...
 
afError af_imax_D (double *d_dst, int *d_idx, unsigned ndims, const unsigned *dims, const double *d_src, int dim, bool is_baseone=false)
 Indexed maximum value along a dimension in double precision matrix. More...
 
afError af_imax_Z (cdouble *d_dst, int *d_idx, unsigned ndims, const unsigned *dims, const cdouble *d_src, int dim, bool is_baseone=false)
 Indexed maximum value along a dimension in double precision, cplx matrix. More...
 
afError af_min_S (float *d_dst, unsigned ndims, const unsigned *dims, const float *d_src, int dim)
 Minimum value along a dimension in single precision matrix. More...
 
afError af_min_B (bool *d_dst, unsigned ndims, const unsigned *dims, const bool *d_src, int dim)
 Minimum value along a dimension in boolean matrix. More...
 
afError af_min_I (int *d_dst, unsigned ndims, const unsigned *dims, const int *d_src, int dim)
 Minimum value along a dimension in 32-bit signed integer matrix. More...
 
afError af_min_U (unsigned *d_dst, unsigned ndims, const unsigned *dims, const unsigned *d_src, int dim)
 Minimum value along a dimension in 32-bit unsigned integer matrix. More...
 
afError af_min_C (cfloat *d_dst, unsigned ndims, const unsigned *dims, const cfloat *d_src, int dim)
 Minimum value along a dimension in single precision, complex matrix. More...
 
afError af_min_D (double *d_dst, unsigned ndims, const unsigned *dims, const double *d_src, int dim)
 Minimum value along a dimension in double precision matrix. More...
 
afError af_min_Z (cdouble *d_dst, unsigned ndims, const unsigned *dims, const cdouble *d_src, int dim)
 Minimum value along a dimension in double precision, complex matrix. More...
 
afError af_imin_S (float *d_dst, int *d_idx, unsigned ndims, const unsigned *dims, const float *d_src, int dim, bool is_baseone=false)
 Indexed minimum value along a dimension in single precision matrix. More...
 
afError af_imin_I (int *d_dst, int *d_idx, unsigned ndims, const unsigned *dims, const int *d_src, int dim, bool is_baseone=false)
 Indexed minimum value along a dimension in 32-bit signed integer matrix. More...
 
afError af_imin_U (unsigned *d_dst, int *d_idx, unsigned ndims, const unsigned *dims, const unsigned *d_src, int dim, bool is_baseone=false)
 Indexed minimum value along a dimension in 32-bit unsigned integer matrix. More...
 
afError af_imin_B (bool *d_dst, int *d_idx, unsigned ndims, const unsigned *dims, const bool *d_src, int dim, bool is_baseone=false)
 Indexed minimum value along a dimension in boolean matrix. More...
 
afError af_imin_C (cfloat *d_dst, int *d_idx, unsigned ndims, const unsigned *dims, const cfloat *d_src, int dim, bool is_baseone=false)
 Indexed minimum value along a dimension in single precision, cplx matrix. More...
 
afError af_imin_D (double *d_dst, int *d_idx, unsigned ndims, const unsigned *dims, const double *d_src, int dim, bool is_baseone=false)
 Indexed minimum value along a dimension in double precision matrix. More...
 
afError af_imin_Z (cdouble *d_dst, int *d_idx, unsigned ndims, const unsigned *dims, const cdouble *d_src, int dim, bool is_baseone=false)
 Indexed minimum value along a dimension in double precision, cplx matrix. More...
 
afError af_minmax_S (float2 *d_dst, unsigned ndims, const unsigned *dims, const float *d_src, int dim)
 Minimum and maximum value along a dimension in single precision matrix. More...
 
afError af_minmax_D (double2 *d_dst, unsigned ndims, const unsigned *dims, const double *d_src, int dim)
 Minimum and maximum value along a dimension in single precision matrix. More...
 
afError af_sum_S (float *d_dst, unsigned ndims, const unsigned *dims, const float *d_src, int dim)
 sum the value along a dimension in single precision matrix More...
 
afError af_sum_B (float *d_dst, unsigned ndims, const unsigned *dims, const bool *d_src, int dim)
 sum the value along a dimension in boolean matrix More...
 
afError af_sum_I (int *d_dst, unsigned ndims, const unsigned *dims, const int *d_src, int dim)
 sum the value along a dimension in 32-bit signed integer matrix More...
 
afError af_sum_U (unsigned *d_dst, unsigned ndims, const unsigned *dims, const unsigned *d_src, int dim)
 sum the value along a dimension in 32-bit unsigned integer matrix More...
 
afError af_sum_C (cfloat *d_dst, unsigned ndims, const unsigned *dims, const cfloat *d_src, int dim)
 sum the value along a dimension in single precision, complex matrix More...
 
afError af_sum_D (double *d_dst, unsigned ndims, const unsigned *dims, const double *d_src, int dim)
 sum the value along a dimension in double precision matrix More...
 
afError af_sum_Z (cdouble *d_dst, unsigned ndims, const unsigned *dims, const cdouble *d_src, int dim)
 sum the value along a dimension in double precision, complex matrix More...
 
afError af_mul_S (float *d_dst, unsigned ndims, const unsigned *dims, const float *d_src, int dim)
 multiplication of the values along a dimension in single precision matrix More...
 
afError af_mul_I (int *d_dst, unsigned ndims, const unsigned *dims, const int *d_src, int dim)
 multiplication of the value along a dimension in 32-bit signed integer matrix More...
 
afError af_mul_U (unsigned *d_dst, unsigned ndims, const unsigned *dims, const unsigned *d_src, int dim)
 multiplication of the value along a dimension in 32-bit unsigned integer matrix More...
 
afError af_mul_B (float *d_dst, unsigned ndims, const unsigned *dims, const bool *d_src, int dim)
 multiplication of the value along a dimension in boolean matrix More...
 
afError af_mul_C (cfloat *d_dst, unsigned ndims, const unsigned *dims, const cfloat *d_src, int dim)
 multiplication of the values along a dimension in single precision, complex matrix More...
 
afError af_mul_D (double *d_dst, unsigned ndims, const unsigned *dims, const double *d_src, int dim)
 multiplication of the values along a dimension in double precision matrix More...
 
afError af_mul_Z (cdouble *d_dst, unsigned ndims, const unsigned *dims, const cdouble *d_src, int dim)
 multiplication of the values along a dimension in double precision, complex matrix More...
 
afError af_nnz_S (unsigned *count, unsigned numel, const float *mat, unsigned batch)
 Number of non zero elements in a single precision stream. More...
 
afError af_nnz_B (unsigned *count, unsigned numel, const bool *mat, unsigned batch)
 Number of non zero elements in a boolean (unsigned char) stream. More...
 
afError af_nnz_D (unsigned *count, unsigned numel, const double *mat, unsigned batch)
 Number of non zero elements in a double precision stream. More...
 
afError af_segsum_S (float *d_out, unsigned numel, const float *d_in, const float *d_keys, bool reduce, unsigned batch, bool is_baseone)
 
afError af_segsum_D (double *d_out, unsigned numel, const double *d_in, const double *d_keys, bool reduce, unsigned batch, bool is_baseone)
 
afError af_accum_S (float *d_out, unsigned ndims, unsigned *dims, const float *d_in, unsigned batch, int dimension, int type, bool isupcast)
 
afError af_accum_D (double *d_out, unsigned ndims, unsigned *dims, const double *d_in, unsigned batch, int dimension, int type)
 Double precision, inclusive sum. More...
 
afError af_accum_I (int *d_out, unsigned ndims, unsigned *dims, const int *d_in, unsigned batch, int dimension, int type)
 32-bit signed integer, inclusive sum More...
 
afError af_accum_U (unsigned *d_out, unsigned ndims, unsigned *dims, const unsigned *d_in, unsigned batch, int dimension, int type)
 32-bit unsigned integer, inclusive sum More...
 
afError af_accum_C (cfloat *d_out, unsigned ndims, unsigned *dims, const cfloat *d_in, unsigned batch, int dimension, int type, bool isupcast)
 Complex, Single precision, inclusive sum. More...
 
afError af_accum_Z (cdouble *d_out, unsigned ndims, unsigned *dims, const cdouble *d_in, unsigned batch, int dimension, int type)
 Complex, Double precision, inclusive sum. More...
 
One Dimension

Find non-zero values in a vector.

Return linear indices (zero- or one-based).

Parameters
[out]n_outNumber of non-zeros returned in d_indices
[out]d_indicesLinear indices (if is_baseone true then one-based, else zero-based)
[in]n_inNumber of total elements in d_X
[in]d_XInput vector
[in]is_baseoneIs indexed output one-based? If true, one-based indexing; else, zero-based. Default: false.
afError af_where_BS (unsigned *n_out, float **d_indices, unsigned n_in, const bool *d_X, bool is_baseone=false)
 Boolean (8-bit) find, single-precision indexing. More...
 
afError af_where_BD (unsigned *n_out, double **d_indices, unsigned n_in, const bool *d_X, bool is_baseone=false)
 Boolean (8-bit) find, double-precision indexing. More...
 
afError af_where_BU (unsigned *n_out, unsigned **d_indices, unsigned n_in, const bool *d_X, bool is_baseone=false)
 Boolean (8-bit) find, integer indexing. More...
 
afError af_where_SS (unsigned *n_out, float **d_indices, unsigned n_in, const float *d_X, bool is_baseone=false)
 Single-precision find, single-precision indexing. More...
 
afError af_where_SD (unsigned *n_out, double **d_indices, unsigned n_in, const float *d_X, bool is_baseone=false)
 Single-precision find, double-precision indexing. More...
 
afError af_where_DD (unsigned *n_out, double **d_indices, unsigned n_in, const double *d_X, bool is_baseone=false)
 Double-precision find. More...
 
afError af_where_UU (unsigned *n_out, unsigned **d_indices, unsigned n_in, const unsigned *d_X, bool is_baseone=false)
 Unsigned integer find. More...
 
afError af_where_II (unsigned *n_out, int **d_indices, unsigned n_in, const int *d_X, bool is_baseone=false)
 Integer find. More...
 
Two Dimension

Find non-zero values in a matrix.

Return 2D indices (zero or one-based).

Parameters
[out]n_outNumber of non-zeros returned in d_I and d_J
[out]d_IRow indices (zero or one-based) of non-zero elements
[out]d_JColumn indices (zero or one-based) of non-zero elements
[in]n_inNumber of total elements in d_X
[in]rowsNumber of rows in d_X
[in]d_XInput matrix
[in]is_baseoneIs indexed output one-based? If true, one-based indexing; else, zero-based. Default: false.
afError af_where2_BS (unsigned *n_out, float **d_I, float **d_J, unsigned n_in, unsigned rows, const bool *d_X, bool is_baseone=false)
 Boolean (8-bit) find, single-precision indexing. More...
 
afError af_where2_BD (unsigned *n_out, double **d_I, double **d_J, unsigned n_in, unsigned rows, const bool *d_X, bool is_baseone=false)
 Boolean (8-bit) find, double-precision indexing. More...
 
afError af_where2_SS (unsigned *n_out, float **d_I, float **d_J, unsigned n_in, unsigned rows, const float *d_X, bool is_baseone=false)
 Single-precision find, single-precision indexing. More...
 
afError af_where2_SD (unsigned *n_out, double **d_I, double **d_J, unsigned n_in, unsigned rows, const float *d_X, bool is_baseone=false)
 Single-precision find, double-precision indexing. More...
 
afError af_where2_DD (unsigned *n_out, double **d_I, double **d_J, unsigned n_in, unsigned rows, const double *d_X, bool is_baseone=false)
 Double-precision find. More...
 
afError af_where2_UU (unsigned *n_out, unsigned **d_I, unsigned **d_J, unsigned n_in, unsigned rows, const unsigned *d_X, bool is_baseone=false)
 Unsigned integer find. More...
 
afError af_where2_II (unsigned *n_out, int **d_I, int **d_J, unsigned n_in, unsigned rows, const int *d_X, bool is_baseone=false)
 Integer find. More...
 
afError af_rand (unsigned *d_Y, unsigned numel)
 Generate 32-bit random integers (every bit is random). Uses af_rand_setseed. More...
 
afError af_rand_setseed (unsigned long long seed)
 Set the seed for uniform random variable. More...
 
Uniform Distribution

Sample from a uniform pseudorandom variable

Parameters
[out]d_YRandom values
[in]numelNumber of values to generate
afError af_randu_S (float *d_Y, unsigned numel)
 Single-precision uniform random variable. More...
 
afError af_randu_D (double *d_Y, unsigned numel)
 Double-precision uniform random variable. More...
 
afError af_randu_C (cfloat *d_Y, unsigned numel)
 Complex single-precision uniform random variable. More...
 
afError af_randu_Z (cdouble *d_Y, unsigned numel)
 Complex double-precision uniform random variable. More...
 
afError af_randu_setseed (unsigned long long seed)
 Set the seed for uniform random variable. More...
 
Normal Distribution

Sample from a normal pseudorandom variable

Parameters
[out]d_YRandom values
[in]numelNumber of values to generate
afError af_randn_S (float *d_Y, unsigned numel)
 Single-precision normal random variable. More...
 
afError af_randn_D (double *d_Y, unsigned numel)
 Double-precision normal random variable. More...
 
afError af_randn_C (cfloat *d_Y, unsigned numel)
 Complex single-precision normal random variable. More...
 
afError af_randn_Z (cdouble *d_Y, unsigned numel)
 Complex double-precision normal random variable. More...
 
afError af_randn_setseed (unsigned long long seed)
 Set the seed for normal random variable. More...
 

Macro Definition Documentation

#define IS_BASEONE   =false

Function Documentation

afError af_alltrue_vector ( bool *  h_dst,
unsigned  numel,
const float *  d_src 
)

all along single precision vector

afError af_alltrue_vector ( bool *  h_dst,
unsigned  numel,
const bool *  d_src 
)

all along boolean vector

afError af_alltrue_vector ( bool *  h_dst,
unsigned  numel,
const int *  d_src 
)

all along 32-bit signed integer vector

afError af_alltrue_vector ( bool *  h_dst,
unsigned  numel,
const unsigned *  d_src 
)

all along 32-bit unsigned integer vector

afError af_alltrue_vector ( bool *  h_dst,
unsigned  numel,
const cfloat *  d_src 
)

all along single precision, complex vector

afError af_alltrue_vector ( bool *  h_dst,
unsigned  numel,
const double *  d_src 
)

all along double precision vector

afError af_alltrue_vector ( bool *  h_dst,
unsigned  numel,
const cdouble *  d_src 
)

all along double precision, complex vector

afError af_alltrue ( bool *  d_dst,
unsigned  ndims,
const unsigned *  dims,
const float *  d_src,
int  dim 
)

all along a dimension in single precision matrix

afError af_alltrue ( bool *  d_dst,
unsigned  ndims,
const unsigned *  dims,
const bool *  d_src,
int  dim 
)

all along a dimension in boolean matrix

afError af_alltrue ( bool *  d_dst,
unsigned  ndims,
const unsigned *  dims,
const int *  d_src,
int  dim 
)

all along a dimension in 32-bit signed integer matrix

afError af_alltrue ( bool *  d_dst,
unsigned  ndims,
const unsigned *  dims,
const unsigned *  d_src,
int  dim 
)

all along a dimension in 32-bit unsigned integer matrix

afError af_alltrue ( bool *  d_dst,
unsigned  ndims,
const unsigned *  dims,
const cfloat *  d_src,
int  dim 
)

all along a dimension in single precision, complex matrix

afError af_alltrue ( bool *  d_dst,
unsigned  ndims,
const unsigned *  dims,
const double *  d_src,
int  dim 
)

all along a dimension in double precision matrix

afError af_alltrue ( bool *  d_dst,
unsigned  ndims,
const unsigned *  dims,
const cdouble *  d_src,
int  dim 
)

all along a dimension in double precision, complex matrix

afError af_anytrue_vector ( bool *  h_dst,
unsigned  numel,
const float *  d_src 
)

any along single precision vector

afError af_anytrue_vector ( bool *  h_dst,
unsigned  numel,
const bool *  d_src 
)

any along boolean vector

afError af_anytrue_vector ( bool *  h_dst,
unsigned  numel,
const int *  d_src 
)

any along 32-bit signed integer vector

afError af_anytrue_vector ( bool *  h_dst,
unsigned  numel,
const unsigned *  d_src 
)

any along 32-bit unsigned integer vector

afError af_anytrue_vector ( bool *  h_dst,
unsigned  numel,
const cfloat *  d_src 
)

any along single precision, complex vector

afError af_anytrue_vector ( bool *  h_dst,
unsigned  numel,
const double *  d_src 
)

any along double precision vector

afError af_anytrue_vector ( bool *  h_dst,
unsigned  numel,
const cdouble *  d_src 
)

any along double precision, complex vector

afError af_anytrue ( bool *  d_dst,
unsigned  ndims,
const unsigned *  dims,
const float *  d_src,
int  dim 
)

any along a dimension in single precision matrix

afError af_anytrue ( bool *  d_dst,
unsigned  ndims,
const unsigned *  dims,
const bool *  d_src,
int  dim 
)

any along a dimension in boolean matrix

afError af_anytrue ( bool *  d_dst,
unsigned  ndims,
const unsigned *  dims,
const int *  d_src,
int  dim 
)

any along a dimension in 32-bit signed integer matrix

afError af_anytrue ( bool *  d_dst,
unsigned  ndims,
const unsigned *  dims,
const unsigned *  d_src,
int  dim 
)

any along a dimension in 32-bit unsigned integer matrix

afError af_anytrue ( bool *  d_dst,
unsigned  ndims,
const unsigned *  dims,
const cfloat *  d_src,
int  dim 
)

any along a dimension in single precision, complex matrix

afError af_anytrue ( bool *  d_dst,
unsigned  ndims,
const unsigned *  dims,
const double *  d_src,
int  dim 
)

any along a dimension in double precision matrix

afError af_anytrue ( bool *  d_dst,
unsigned  ndims,
const unsigned *  dims,
const cdouble *  d_src,
int  dim 
)

any along a dimension in double precision, complex matrix

afError af_max_vector ( float *  h_dst,
unsigned  numel,
const float *  d_src 
)

Maximum value of a single precision vector.

afError af_max_vector ( bool *  h_dst,
unsigned  numel,
const bool *  d_src 
)

Maximum value of a boolean vector.

afError af_max_vector ( int *  h_dst,
unsigned  numel,
const int *  d_src 
)

Maximum value of a 32-bit signed integer vector.

afError af_max_vector ( unsigned *  h_dst,
unsigned  numel,
const unsigned *  d_src 
)

Maximum value of a 32-bit unsigned integer vector.

afError af_max_vector ( cfloat *  h_dst,
unsigned  numel,
const cfloat *  d_src 
)

Maximum value of a single precision, complex vector.

afError af_max_vector ( double *  h_dst,
unsigned  numel,
const double *  d_src 
)

Maximum value of a double precision vector.

afError af_max_vector ( cdouble *  h_dst,
unsigned  numel,
const cdouble *  d_src 
)

Maximum value of a double precision, complex vector.

afError af_imax_vector ( float *  h_dst,
int *  h_idx,
unsigned  numel,
const float *  d_src,
bool  is_baseone = false 
)

Maximum value of a single precision vector.

afError af_imax_vector ( int *  h_dst,
int *  h_idx,
unsigned  numel,
const int *  d_src,
bool  is_baseone = false 
)

Maximum value of a 32-bit signed integer vector.

afError af_imax_vector ( unsigned *  h_dst,
int *  h_idx,
unsigned  numel,
const unsigned *  d_src,
bool  is_baseone = false 
)

Maximum value of a 32-bit unsigned integer vector.

afError af_imax_vector ( bool *  h_dst,
int *  h_idx,
unsigned  numel,
const bool *  d_src,
bool  is_baseone = false 
)

Maximum value of a boolean vector.

afError af_imax_vector ( cfloat *  h_dst,
int *  h_idx,
unsigned  numel,
const cfloat *  d_src,
bool  is_baseone = false 
)

Maximum value of a single precision, complex vector.

afError af_imax_vector ( double *  h_dst,
int *  h_idx,
unsigned  numel,
const double *  d_src,
bool  is_baseone = false 
)

Maximum value of a double precision vector.

afError af_imax_vector ( cdouble *  h_dst,
int *  h_idx,
unsigned  numel,
const cdouble *  d_src,
bool  is_baseone = false 
)

Maximum value of a double precision, complex vector.

afError af_max ( float *  d_dst,
unsigned  ndims,
const unsigned *  dims,
const float *  d_src,
int  dim 
)

Maximum value along a dimension in single precision matrix.

afError af_max ( bool *  d_dst,
unsigned  ndims,
const unsigned *  dims,
const bool *  d_src,
int  dim 
)

Maximum value along a dimension in boolean matrix.

afError af_max ( int *  d_dst,
unsigned  ndims,
const unsigned *  dims,
const int *  d_src,
int  dim 
)

Maximum value along a dimension in 32-bit signed integer matrix.

afError af_max ( unsigned *  d_dst,
unsigned  ndims,
const unsigned *  dims,
const unsigned *  d_src,
int  dim 
)

Maximum value along a dimension in 32-bit unsigned integer matrix.

afError af_max ( cfloat *  d_dst,
unsigned  ndims,
const unsigned *  dims,
const cfloat *  d_src,
int  dim 
)

Maximum value along a dimension in single precision, complex matrix.

afError af_max ( double *  d_dst,
unsigned  ndims,
const unsigned *  dims,
const double *  d_src,
int  dim 
)

Maximum value along a dimension in double precision matrix.

afError af_max ( cdouble *  d_dst,
unsigned  ndims,
const unsigned *  dims,
const cdouble *  d_src,
int  dim 
)

Maximum value along a dimension in double precision, complex matrix.

afError af_imax ( float *  d_dst,
int *  d_idx,
unsigned  ndims,
const unsigned *  dims,
const float *  d_src,
int  dim,
bool  is_baseone = false 
)

Maximum value along a dimension in single precision matrix.

afError af_imax ( int *  d_dst,
int *  d_idx,
unsigned  ndims,
const unsigned *  dims,
const int *  d_src,
int  dim,
bool  is_baseone = false 
)

Maximum value along a dimension in 32-bit signed integer matrix.

afError af_imax ( unsigned *  d_dst,
int *  d_idx,
unsigned  ndims,
const unsigned *  dims,
const unsigned *  d_src,
int  dim,
bool  is_baseone = false 
)

Maximum value along a dimension in 32-bit unsigned integer matrix.

afError af_imax ( bool *  d_dst,
int *  d_idx,
unsigned  ndims,
const unsigned *  dims,
const bool *  d_src,
int  dim,
bool  is_baseone = false 
)

Maximum value along a dimension in boolean matrix.

afError af_imax ( cfloat *  d_dst,
int *  d_idx,
unsigned  ndims,
const unsigned *  dims,
const cfloat *  d_src,
int  dim,
bool  is_baseone = false 
)

Maximum value along a dimension in single precision, complex matrix.

afError af_imax ( double *  d_dst,
int *  d_idx,
unsigned  ndims,
const unsigned *  dims,
const double *  d_src,
int  dim,
bool  is_baseone = false 
)

Maximum value along a dimension in double precision matrix.

afError af_imax ( cdouble *  d_dst,
int *  d_idx,
unsigned  ndims,
const unsigned *  dims,
const cdouble *  d_src,
int  dim,
bool  is_baseone = false 
)

Maximum value along a dimension in double precision, complex matrix.

afError af_min_vector ( float *  h_dst,
unsigned  numel,
const float *  d_src 
)

Minimum value of a single precision vector.

afError af_min_vector ( bool *  h_dst,
unsigned  numel,
const bool *  d_src 
)

Minimum value of a boolean vector.

afError af_min_vector ( int *  h_dst,
unsigned  numel,
const int *  d_src 
)

Minimum value of a 32-bit signed integer vector.

afError af_min_vector ( unsigned *  h_dst,
unsigned  numel,
const unsigned *  d_src 
)

Minimum value of a 32-bit unsigned integer vector.

afError af_min_vector ( cfloat *  h_dst,
unsigned  numel,
const cfloat *  d_src 
)

Minimum value of a single precision, complex vector.

afError af_min_vector ( double *  h_dst,
unsigned  numel,
const double *  d_src 
)

Minimum value of a double precision vector.

afError af_min_vector ( cdouble *  h_dst,
unsigned  numel,
const cdouble *  d_src 
)

Minimum value of a double precision, complex vector.

afError af_imin_vector ( float *  h_dst,
int *  h_idx,
unsigned  numel,
const float *  d_src,
bool  is_baseone = false 
)

Minimum value of a single precision vector.

afError af_imin_vector ( int *  h_dst,
int *  h_idx,
unsigned  numel,
const int *  d_src,
bool  is_baseone = false 
)

Minimum value of a 32-bit signed integer vector.

afError af_imin_vector ( unsigned *  h_dst,
int *  h_idx,
unsigned  numel,
const unsigned *  d_src,
bool  is_baseone = false 
)

Minimum value of a 32-bit unsigned integer vector.

afError af_imin_vector ( bool *  h_dst,
int *  h_idx,
unsigned  numel,
const bool *  d_src,
bool  is_baseone = false 
)

Minimum value of a boolean vector.

afError af_imin_vector ( cfloat *  h_dst,
int *  h_idx,
unsigned  numel,
const cfloat *  d_src,
bool  is_baseone = false 
)

Minimum value of a single precision, complex vector.

afError af_imin_vector ( double *  h_dst,
int *  h_idx,
unsigned  numel,
const double *  d_src,
bool  is_baseone = false 
)

Minimum value of a double precision vector.

afError af_imin_vector ( cdouble *  h_dst,
int *  h_idx,
unsigned  numel,
const cdouble *  d_src,
bool  is_baseone = false 
)

Minimum value of a double precision, complex vector.

afError af_min ( float *  d_dst,
unsigned  ndims,
const unsigned *  dims,
const float *  d_src,
int  dim 
)

Minimum value along a dimension in single precision matrix.

afError af_min ( bool *  d_dst,
unsigned  ndims,
const unsigned *  dims,
const bool *  d_src,
int  dim 
)

Minimum value along a dimension in boolean matrix.

afError af_min ( int *  d_dst,
unsigned  ndims,
const unsigned *  dims,
const int *  d_src,
int  dim 
)

Minimum value along a dimension in 32-bit signed integer matrix.

afError af_min ( unsigned *  d_dst,
unsigned  ndims,
const unsigned *  dims,
const unsigned *  d_src,
int  dim 
)

Minimum value along a dimension in 32-bit unsigned integer matrix.

afError af_min ( cfloat *  d_dst,
unsigned  ndims,
const unsigned *  dims,
const cfloat *  d_src,
int  dim 
)

Minimum value along a dimension in single precision, complex matrix.

afError af_min ( double *  d_dst,
unsigned  ndims,
const unsigned *  dims,
const double *  d_src,
int  dim 
)

Minimum value along a dimension in double precision matrix.

afError af_min ( cdouble *  d_dst,
unsigned  ndims,
const unsigned *  dims,
const cdouble *  d_src,
int  dim 
)

Minimum value along a dimension in double precision, complex matrix.

afError af_imin ( float *  d_dst,
int *  d_idx,
unsigned  ndims,
const unsigned *  dims,
const float *  d_src,
int  dim,
bool  is_baseone = false 
)

Minimum value along a dimension in single precision matrix.

afError af_imin ( int *  d_dst,
int *  d_idx,
unsigned  ndims,
const unsigned *  dims,
const int *  d_src,
int  dim,
bool  is_baseone = false 
)

Minimum value along a dimension in 32-bit signed integer matrix.

afError af_imin ( unsigned *  d_dst,
int *  d_idx,
unsigned  ndims,
const unsigned *  dims,
const unsigned *  d_src,
int  dim,
bool  is_baseone = false 
)

Minimum value along a dimension in 32-bit unsigned integer matrix.

afError af_imin ( bool *  d_dst,
int *  d_idx,
unsigned  ndims,
const unsigned *  dims,
const bool *  d_src,
int  dim,
bool  is_baseone = false 
)

Minimum value along a dimension in boolean matrix.

afError af_imin ( cfloat *  d_dst,
int *  d_idx,
unsigned  ndims,
const unsigned *  dims,
const cfloat *  d_src,
int  dim,
bool  is_baseone = false 
)

Minimum value along a dimension in single precision, complex matrix.

afError af_imin ( double *  d_dst,
int *  d_idx,
unsigned  ndims,
const unsigned *  dims,
const double *  d_src,
int  dim,
bool  is_baseone = false 
)

Minimum value along a dimension in double precision matrix.

afError af_imin ( cdouble *  d_dst,
int *  d_idx,
unsigned  ndims,
const unsigned *  dims,
const cdouble *  d_src,
int  dim,
bool  is_baseone = false 
)

Minimum value along a dimension in double precision, complex matrix.

afError af_minmax_vector ( float2 *  h_dst,
unsigned  numel,
const float *  d_src 
)

Minimum and maximum value of a single precision vector.

afError af_minmax ( float2 *  d_dst,
unsigned  ndims,
const unsigned *  dims,
const float *  d_src,
int  dim 
)

Minimum and maximum value along a dimension in single precision matrix.

afError af_minmax_vector ( double2 *  h_dst,
unsigned  numel,
const double *  d_src 
)

Minimum and maximum value of a single precision vector.

afError af_minmax ( double2 *  d_dst,
unsigned  ndims,
const unsigned *  dims,
const double *  d_src,
int  dim 
)

Minimum and maximum value along a dimension in single precision matrix.

afError af_sum_vector ( float *  h_dst,
unsigned  numel,
const float *  d_src 
)

sum The value of a single precision vector

afError af_sum_vector ( float *  h_dst,
unsigned  numel,
const bool *  d_src 
)

sum The value of a boolean vector

afError af_sum_vector ( int *  h_dst,
unsigned  numel,
const int *  d_src 
)

sum The value of a 32-bit signed integer vector

afError af_sum_vector ( unsigned *  h_dst,
unsigned  numel,
const unsigned *  d_src 
)

sum The value of a 32-bit unsigned integer vector

afError af_sum_vector ( cfloat *  h_dst,
unsigned  numel,
const cfloat *  d_src 
)

sum The value of a single precision, complex vector

afError af_sum_vector ( double *  h_dst,
unsigned  numel,
const double *  d_src 
)

sum The value of a double precision vector

afError af_sum_vector ( cdouble *  h_dst,
unsigned  numel,
const cdouble *  d_src 
)

sum The value of a double precision, complex vector

afError af_sum ( float *  d_dst,
unsigned  ndims,
const unsigned *  dims,
const float *  d_src,
int  dim 
)

sum the value along a dimension in single precision matrix

afError af_sum ( float *  d_dst,
unsigned  ndims,
const unsigned *  dims,
const bool *  d_src,
int  dim 
)

sum the value along a dimension in boolean matrix

afError af_sum ( int *  d_dst,
unsigned  ndims,
const unsigned *  dims,
const int *  d_src,
int  dim 
)

sum the value along a dimension in 32-bit signed integer matrix

afError af_sum ( unsigned *  d_dst,
unsigned  ndims,
const unsigned *  dims,
const unsigned *  d_src,
int  dim 
)

sum the value along a dimension in 32-bit unsigned integer matrix

afError af_sum ( cfloat *  d_dst,
unsigned  ndims,
const unsigned *  dims,
const cfloat *  d_src,
int  dim 
)

sum the value along a dimension in single precision, complex matrix

afError af_sum ( double *  d_dst,
unsigned  ndims,
const unsigned *  dims,
const double *  d_src,
int  dim 
)

sum the value along a dimension in double precision matrix

afError af_sum ( cdouble *  d_dst,
unsigned  ndims,
const unsigned *  dims,
const cdouble *  d_src,
int  dim 
)

sum the value along a dimension in double precision, complex matrix

afError af_mul_vector ( float *  h_dst,
unsigned  numel,
const float *  d_src 
)

multiplication of the values of a single precision vector

afError af_mul_vector ( int *  h_dst,
unsigned  numel,
const int *  d_src 
)

multiplication of the values of a 32-bit signed integer vector

afError af_mul_vector ( unsigned *  h_dst,
unsigned  numel,
const unsigned *  d_src 
)

multiplication of the values of a 32-bit unsigned integer vector

afError af_mul_vector ( float *  h_dst,
unsigned  numel,
const bool *  d_src 
)

multiplication of the values of a boolean vector

afError af_mul_vector ( cfloat *  h_dst,
unsigned  numel,
const cfloat *  d_src 
)

multiplication of the values of a single precision, complex vector

afError af_mul_vector ( double *  h_dst,
unsigned  numel,
const double *  d_src 
)

multiplication of the values of a double precision vector

afError af_mul_vector ( cdouble *  h_dst,
unsigned  numel,
const cdouble *  d_src 
)

multiplication of the values of a double precision, complex vector

afError af_mul ( float *  d_dst,
unsigned  ndims,
const unsigned *  dims,
const float *  d_src,
int  dim 
)

multiplication of the values along a dimension in single precision matrix

afError af_mul ( int *  d_dst,
unsigned  ndims,
const unsigned *  dims,
const int *  d_src,
int  dim 
)

multiplication of the values along a dimension in 32-bit signed integer matrix

afError af_mul ( unsigned *  d_dst,
unsigned  ndims,
const unsigned *  dims,
const unsigned *  d_src,
int  dim 
)

multiplication of the values along a dimension in 32-bit unsigned integer matrix

afError af_mul ( float *  d_dst,
unsigned  ndims,
const unsigned *  dims,
const bool *  d_src,
int  dim 
)

multiplication of the values along a dimension in a boolean

afError af_mul ( cfloat *  d_dst,
unsigned  ndims,
const unsigned *  dims,
const cfloat *  d_src,
int  dim 
)

multiplication of the values along a dimension in single precision, complex matrix

afError af_mul ( double *  d_dst,
unsigned  ndims,
const unsigned *  dims,
const double *  d_src,
int  dim 
)

multiplication of the values along a dimension in double precision matrix

afError af_mul ( cdouble *  d_dst,
unsigned  ndims,
const unsigned *  dims,
const cdouble *  d_src,
int  dim 
)

multiplication of the values along a dimension in double precision, complex matrix

afError af_int_S ( int *  out,
float *  in,
unsigned  numel 
)
afError af_int_D ( int *  out,
double *  in,
unsigned  numel 
)
afError af_S_int ( float *  out,
int *  in,
unsigned  numel 
)
afError af_D_int ( double *  out,
int *  in,
unsigned  numel 
)