12 #define IS_BASEONE =false
363 AFAPI array
dot(
const array& A,
const array &B);
379 AFAPI array
sum(
const array& input,
int dim=-1);
385 template<
typename ty> ty
sum(
const array &input);
406 AFAPI array
mul(
const array& input,
int dim=-1);
412 template<
typename ty> ty
mul(
const array &input);
435 AFAPI array
min(
const array& input,
int dim=-1);
448 AFAPI void min(array& values, array& indices,
const array& input,
int dim=-1);
456 template<
typename ty> ty
min(
const array &input);
467 template<
typename ty>
void min(ty *value,
int *index,
const array& input);
490 AFAPI array
max(
const array& input,
int dim=-1);
503 AFAPI void max(array& values, array& indices,
const array& input,
int dim=-1);
518 template<
typename ty> ty
max(
const array &input);
530 template<
typename ty>
void max(ty *value,
int *index,
const array& input);
564 AFAPI void minmax(array& minvalues, array& maxvalues,
const array& input,
int dim=-1);
580 template<
typename ty> ty
minmax(
const array &input);
611 template<
typename ty> ty
alltrue(
const array& input);
652 template<
typename ty> ty
anytrue(
const array& input);
694 AFAPI void where(array& row, array& column,
const array& input);
755 AFAPI array
segsum(
const array& input,
const array& segments,
bool reduce=
false);
841 AFAPI void setunique(array& values, array& indices, array& locations,
const array& input);
891 AFAPI void setunion(array& U, array& IA, array& IB,
const array& A,
const array& B);
942 AFAPI void setintersect(array& U, array& IA, array& IB,
const array& A,
const array& B);
964 AFAPI array
mean(
const array& input,
int dim=-1);
978 template<
typename ty> ty
mean(
const array &input);
999 AFAPI array
var(
const array& input,
bool isbiased=
false,
int dim=-1);
1009 AFAPI array
var(
const array& input,
const array weights,
int dim=-1);
1025 template<
typename ty> ty
var(
const array &input,
bool isbiased=
false);
1032 template<
typename ty> ty
var(
const array &input,
const array weights);
1053 AFAPI array
cov(
const array& input,
bool isbiased=
false);
1063 AFAPI array
cov(
const array& X,
const array& Y,
bool isbiased=
false);
1084 AFAPI array
stdev(
const array& in,
int dim=-1);
1098 template<
typename ty> ty
stdev(
const array& input);
1118 AFAPI array
median(
const array& input,
int dim=-1);
1132 template<
typename ty> ty
median(
const array &input);
1161 template<
typename ty> ty
corrcoef(
const array &x,
const array &y);
1188 unsigned numel,
const float *d_src);
1191 unsigned numel,
const bool *d_src);
1194 unsigned numel,
const int *d_src);
1197 unsigned numel,
const unsigned *d_src);
1204 unsigned numel,
const double *d_src);
1220 unsigned ndims,
const unsigned* dims,
1221 const float *d_src,
int dim);
1224 unsigned ndims,
const unsigned* dims,
1225 const bool *d_src,
int dim);
1228 unsigned ndims,
const unsigned* dims,
1229 const int *d_src,
int dim);
1232 unsigned ndims,
const unsigned* dims,
1233 const unsigned *d_src,
int dim);
1236 unsigned ndims,
const unsigned* dims,
1237 const cfloat *d_src,
int dim);
1240 unsigned ndims,
const unsigned* dims,
1241 const double *d_src,
int dim);
1244 unsigned ndims,
const unsigned* dims,
1245 const cdouble *d_src,
int dim);
1267 unsigned numel,
const float *d_src);
1270 unsigned numel,
const bool *d_src);
1273 unsigned numel,
const int *d_src);
1276 unsigned numel,
const unsigned *d_src);
1283 unsigned numel,
const double *d_src);
1299 unsigned ndims,
const unsigned* dims,
1300 const float *d_src,
int dim);
1303 unsigned ndims,
const unsigned* dims,
1304 const bool *d_src,
int dim);
1307 unsigned ndims,
const unsigned* dims,
1308 const int *d_src,
int dim);
1311 unsigned ndims,
const unsigned* dims,
1312 const unsigned *d_src,
int dim);
1315 unsigned ndims,
const unsigned* dims,
1316 const cfloat *d_src,
int dim);
1319 unsigned ndims,
const unsigned* dims,
1320 const double *d_src,
int dim);
1323 unsigned ndims,
const unsigned* dims,
1324 const cdouble *d_src,
int dim);
1348 unsigned numel,
const float *d_src);
1351 unsigned numel,
const bool *d_src);
1354 unsigned numel,
const int *d_src);
1357 unsigned numel,
const unsigned *d_src);
1364 unsigned numel,
const double *d_src);
1371 unsigned numel,
const float *d_src,
1375 unsigned numel,
const int *d_src,
1379 unsigned numel,
const unsigned *d_src,
1383 unsigned numel,
const bool *d_src,
1392 unsigned numel,
const double *d_src,
1414 unsigned ndims,
const unsigned* dims,
1415 const float *d_src,
int dim);
1418 unsigned ndims,
const unsigned* dims,
1419 const bool *d_src,
int dim);
1422 unsigned ndims,
const unsigned* dims,
1423 const int *d_src,
int dim);
1426 unsigned ndims,
const unsigned* dims,
1427 const unsigned *d_src,
int dim);
1430 unsigned ndims,
const unsigned* dims,
1431 const cfloat *d_src,
int dim);
1434 unsigned ndims,
const unsigned* dims,
1435 const double *d_src,
int dim);
1438 unsigned ndims,
const unsigned* dims,
1439 const cdouble *d_src,
int dim);
1442 unsigned ndims,
const unsigned* dims,
1443 const float *d_src,
int dim,
1447 unsigned ndims,
const unsigned* dims,
1448 const int *d_src,
int dim,
1452 unsigned ndims,
const unsigned* dims,
1453 const unsigned *d_src,
int dim,
1457 unsigned ndims,
const unsigned* dims,
1458 const bool *d_src,
int dim,
1462 unsigned ndims,
const unsigned* dims,
1463 const cfloat *d_src,
int dim,
1467 unsigned ndims,
const unsigned* dims,
1468 const double *d_src,
int dim,
1472 unsigned ndims,
const unsigned* dims,
1473 const cdouble *d_src,
int dim,
1498 unsigned numel,
const float *d_src);
1501 unsigned numel,
const bool *d_src);
1504 unsigned numel,
const int *d_src);
1507 unsigned numel,
const unsigned *d_src);
1514 unsigned numel,
const double *d_src);
1521 unsigned numel,
const float *d_src,
1525 unsigned numel,
const int *d_src,
1529 unsigned numel,
const unsigned *d_src,
1533 unsigned numel,
const bool *d_src,
1542 unsigned numel,
const double *d_src,
1564 unsigned ndims,
const unsigned* dims,
1565 const float *d_src,
int dim);
1568 unsigned ndims,
const unsigned* dims,
1569 const bool *d_src,
int dim);
1572 unsigned ndims,
const unsigned* dims,
1573 const int *d_src,
int dim);
1576 unsigned ndims,
const unsigned* dims,
1577 const unsigned *d_src,
int dim);
1580 unsigned ndims,
const unsigned* dims,
1581 const cfloat *d_src,
int dim);
1584 unsigned ndims,
const unsigned* dims,
1585 const double *d_src,
int dim);
1588 unsigned ndims,
const unsigned* dims,
1589 const cdouble *d_src,
int dim);
1592 unsigned ndims,
const unsigned* dims,
1593 const float *d_src,
int dim,
1597 unsigned ndims,
const unsigned* dims,
1598 const int *d_src,
int dim,
1602 unsigned ndims,
const unsigned* dims,
1603 const unsigned *d_src,
int dim,
1607 unsigned ndims,
const unsigned* dims,
1608 const bool *d_src,
int dim,
1612 unsigned ndims,
const unsigned* dims,
1613 const cfloat *d_src,
int dim,
1617 unsigned ndims,
const unsigned* dims,
1618 const double *d_src,
int dim,
1622 unsigned ndims,
const unsigned* dims,
1623 const cdouble *d_src,
int dim,
1648 unsigned numel,
const float *d_src);
1651 unsigned numel,
const double *d_src);
1665 unsigned ndims,
const unsigned* dims,
1666 const float *d_src,
int dim);
1669 unsigned ndims,
const unsigned* dims,
1670 const double *d_src,
int dim);
1693 unsigned numel,
const float *d_src);
1696 unsigned numel,
const bool *d_src);
1699 unsigned numel,
const int *d_src);
1702 unsigned numel,
const unsigned *d_src);
1709 unsigned numel,
const double *d_src);
1724 unsigned ndims,
const unsigned* dims,
1725 const float *d_src,
int dim);
1728 unsigned ndims,
const unsigned* dims,
1729 const bool *d_src,
int dim);
1732 unsigned ndims,
const unsigned* dims,
1733 const int *d_src,
int dim);
1736 unsigned ndims,
const unsigned* dims,
1737 const unsigned *d_src,
int dim);
1740 unsigned ndims,
const unsigned* dims,
1741 const cfloat *d_src,
int dim);
1744 unsigned ndims,
const unsigned* dims,
1745 const double *d_src,
int dim);
1748 unsigned ndims,
const unsigned* dims,
1749 const cdouble *d_src,
int dim);
1772 unsigned numel,
const float *d_src);
1775 unsigned numel,
const int *d_src);
1778 unsigned numel,
const unsigned *d_src);
1781 unsigned numel,
const bool *d_src);
1788 unsigned numel,
const double *d_src);
1805 unsigned ndims,
const unsigned* dims,
1806 const float *d_src,
int dim);
1809 unsigned ndims,
const unsigned* dims,
1810 const int *d_src,
int dim);
1813 unsigned ndims,
const unsigned* dims,
1814 const unsigned *d_src,
int dim);
1817 unsigned ndims,
const unsigned* dims,
1818 const bool *d_src,
int dim);
1821 unsigned ndims,
const unsigned* dims,
1822 const cfloat *d_src,
int dim);
1825 unsigned ndims,
const unsigned* dims,
1826 const double *d_src,
1830 unsigned ndims,
const unsigned* dims,
1831 const cdouble *d_src,
int dim);
1854 unsigned numel,
const float* mat);
1857 unsigned numel,
const bool* mat);
1860 unsigned numel,
const double* mat);
1872 unsigned numel,
const float* mat,
1876 unsigned numel,
const bool* mat,
1880 unsigned numel,
const double* mat,
1893 unsigned numel,
const float *d_src);
1896 unsigned numel,
const bool *d_src);
1899 unsigned numel,
const int *d_src);
1902 unsigned numel,
const unsigned *d_src);
1909 unsigned numel,
const double *d_src);
1917 unsigned ndims,
const unsigned* dims,
1918 const float *d_src,
int dim);
1921 unsigned ndims,
const unsigned* dims,
1922 const bool *d_src,
int dim);
1925 unsigned ndims,
const unsigned* dims,
1926 const int *d_src,
int dim);
1929 unsigned ndims,
const unsigned* dims,
1930 const unsigned *d_src,
int dim);
1933 unsigned ndims,
const unsigned* dims,
1934 const cfloat *d_src,
int dim);
1937 unsigned ndims,
const unsigned* dims,
1938 const double *d_src,
int dim);
1941 unsigned ndims,
const unsigned* dims,
1942 const cdouble *d_src,
int dim);
1946 unsigned numel,
const float *d_src);
1949 unsigned numel,
const bool *d_src);
1952 unsigned numel,
const int *d_src);
1955 unsigned numel,
const unsigned *d_src);
1962 unsigned numel,
const double *d_src);
1970 unsigned ndims,
const unsigned* dims,
1971 const float *d_src,
int dim);
1974 unsigned ndims,
const unsigned* dims,
1975 const bool *d_src,
int dim);
1978 unsigned ndims,
const unsigned* dims,
1979 const int *d_src,
int dim);
1982 unsigned ndims,
const unsigned* dims,
1983 const unsigned *d_src,
int dim);
1986 unsigned ndims,
const unsigned* dims,
1987 const cfloat *d_src,
int dim);
1990 unsigned ndims,
const unsigned* dims,
1991 const double *d_src,
int dim);
1994 unsigned ndims,
const unsigned* dims,
1995 const cdouble *d_src,
int dim);
2000 unsigned numel,
const float *d_src);
2003 unsigned numel,
const bool *d_src);
2006 unsigned numel,
const int *d_src);
2009 unsigned numel,
const unsigned *d_src);
2016 unsigned numel,
const double *d_src);
2024 unsigned numel,
const float *d_src,
2028 unsigned numel,
const int *d_src,
2032 unsigned numel,
const unsigned *d_src,
2036 unsigned numel,
const bool *d_src,
2045 unsigned numel,
const double *d_src,
2055 unsigned ndims,
const unsigned* dims,
2056 const float *d_src,
int dim);
2059 unsigned ndims,
const unsigned* dims,
2060 const bool *d_src,
int dim);
2063 unsigned ndims,
const unsigned* dims,
2064 const int *d_src,
int dim);
2067 unsigned ndims,
const unsigned* dims,
2068 const unsigned *d_src,
int dim);
2071 unsigned ndims,
const unsigned* dims,
2072 const cfloat *d_src,
int dim);
2075 unsigned ndims,
const unsigned* dims,
2076 const double *d_src,
int dim);
2079 unsigned ndims,
const unsigned* dims,
2080 const cdouble *d_src,
int dim);
2084 unsigned ndims,
const unsigned* dims,
2085 const float *d_src,
int dim,
2089 unsigned ndims,
const unsigned* dims,
2090 const int *d_src,
int dim,
2094 unsigned ndims,
const unsigned* dims,
2095 const unsigned *d_src,
int dim,
2099 unsigned ndims,
const unsigned* dims,
2100 const bool *d_src,
int dim,
2104 unsigned ndims,
const unsigned* dims,
2105 const cfloat *d_src,
int dim,
2109 unsigned ndims,
const unsigned* dims,
2110 const double *d_src,
int dim,
2114 unsigned ndims,
const unsigned* dims,
2115 const cdouble *d_src,
int dim,
2120 unsigned numel,
const float *d_src);
2123 unsigned numel,
const bool *d_src);
2126 unsigned numel,
const int *d_src);
2129 unsigned numel,
const unsigned *d_src);
2136 unsigned numel,
const double *d_src);
2144 unsigned numel,
const float *d_src,
2148 unsigned numel,
const int *d_src,
2152 unsigned numel,
const unsigned *d_src,
2156 unsigned numel,
const bool *d_src,
2165 unsigned numel,
const double *d_src,
2175 unsigned ndims,
const unsigned* dims,
2176 const float *d_src,
int dim);
2179 unsigned ndims,
const unsigned* dims,
2180 const bool *d_src,
int dim);
2183 unsigned ndims,
const unsigned* dims,
2184 const int *d_src,
int dim);
2187 unsigned ndims,
const unsigned* dims,
2188 const unsigned *d_src,
int dim);
2191 unsigned ndims,
const unsigned* dims,
2192 const cfloat *d_src,
int dim);
2195 unsigned ndims,
const unsigned* dims,
2196 const cfloat *d_src,
int dim);
2199 unsigned ndims,
const unsigned* dims,
2200 const double *d_src,
int dim);
2203 unsigned ndims,
const unsigned* dims,
2204 const cdouble *d_src,
int dim);
2208 unsigned ndims,
const unsigned* dims,
2209 const float *d_src,
int dim,
2213 unsigned ndims,
const unsigned* dims,
2214 const int *d_src,
int dim,
2218 unsigned ndims,
const unsigned* dims,
2219 const unsigned *d_src,
int dim,
2223 unsigned ndims,
const unsigned* dims,
2224 const bool *d_src,
int dim,
2228 unsigned ndims,
const unsigned* dims,
2229 const cfloat *d_src,
int dim,
2233 unsigned ndims,
const unsigned* dims,
2234 const double *d_src,
int dim,
2238 unsigned ndims,
const unsigned* dims,
2239 const cdouble *d_src,
int dim,
2246 unsigned numel,
const float *d_src);
2249 unsigned ndims,
const unsigned* dims,
2250 const float *d_src,
int dim);
2253 unsigned numel,
const double *d_src);
2256 unsigned ndims,
const unsigned* dims,
2257 const double *d_src,
int dim);
2262 unsigned numel,
const float *d_src);
2265 unsigned numel,
const bool *d_src);
2268 unsigned numel,
const int *d_src);
2271 unsigned numel,
const unsigned *d_src);
2278 unsigned numel,
const double *d_src);
2286 unsigned ndims,
const unsigned* dims,
2287 const float *d_src,
int dim);
2290 unsigned ndims,
const unsigned* dims,
2291 const bool *d_src,
int dim);
2294 unsigned ndims,
const unsigned* dims,
2295 const int *d_src,
int dim);
2298 unsigned ndims,
const unsigned* dims,
2299 const unsigned *d_src,
int dim);
2302 unsigned ndims,
const unsigned* dims,
2303 const cfloat *d_src,
int dim);
2306 unsigned ndims,
const unsigned* dims,
2307 const double *d_src,
int dim);
2310 unsigned ndims,
const unsigned* dims,
2311 const cdouble *d_src,
int dim);
2316 unsigned numel,
const float *d_src);
2319 unsigned numel,
const int *d_src);
2322 unsigned numel,
const unsigned *d_src);
2325 unsigned numel,
const bool *d_src);
2332 unsigned numel,
const double *d_src);
2340 unsigned ndims,
const unsigned* dims,
2341 const float *d_src,
int dim);
2344 unsigned ndims,
const unsigned* dims,
2345 const int *d_src,
int dim);
2348 unsigned ndims,
const unsigned* dims,
2349 const unsigned *d_src,
int dim);
2352 unsigned ndims,
const unsigned* dims,
2353 const bool *d_src,
int dim);
2356 unsigned ndims,
const unsigned* dims,
2357 const cfloat *d_src,
int dim);
2360 unsigned ndims,
const unsigned* dims,
2361 const double *d_src,
2365 unsigned ndims,
const unsigned* dims,
2366 const cdouble *d_src,
int dim);
2389 const float *d_in,
const float *d_keys,
2391 unsigned batch,
bool is_baseone);
2394 const double *d_in,
const double *d_keys,
2396 unsigned batch,
bool is_baseone);
2421 unsigned ndims,
unsigned* dims,
2422 const float *d_in,
unsigned batch,
2423 int dimension,
int type,
bool isupcast);
2426 unsigned ndims,
unsigned* dims,
2427 const double *d_in,
unsigned batch,
2428 int dimension,
int type);
2431 unsigned ndims,
unsigned* dims,
2432 const int *d_in,
unsigned batch,
2433 int dimension,
int type);
2436 unsigned ndims,
unsigned* dims,
2437 const unsigned *d_in,
unsigned batch,
2438 int dimension,
int type);
2441 unsigned ndims,
unsigned* dims,
2442 const cfloat *d_in,
unsigned batch,
2443 int dimension,
int type,
bool isupcast);
2446 unsigned ndims,
unsigned* dims,
2447 const cdouble *d_in,
unsigned batch,
2448 int dimension,
int type);
2582 #endif // ifdef __cplusplus
array alltrue(const array &input, int dim=-1)
Test if all elements are true (nonzero) along a dimension in input.
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.
afError af_sum_vector_U(unsigned *h_dst, unsigned numel, const unsigned *d_src)
sum The value of a 32-bit unsigned integer vector
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.
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
array sum(const array &input, int dim=-1)
array segsum(const array &input, const array &segments, bool reduce=false)
void minmax(array &minvalues, array &maxvalues, const array &input, int dim=-1)
Minimum and maximum of the elements along a dimension in matrix.
afError af_nnz_B(unsigned *count, unsigned numel, const bool *mat, unsigned batch)
Number of non zero elements in a boolean (unsigned char) stream.
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.
afError af_alltrue_vector_S(bool *h_dst, unsigned numel, const float *d_src)
all along single precision vector
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.
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
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.
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.
array mul(const array &input, int dim=-1)
afError af_max_vector_S(float *h_dst, unsigned numel, const float *d_src)
Maximum value of a single precision vector.
afError af_sum_vector_Z(cdouble *h_dst, unsigned numel, const cdouble *d_src)
sum The value of a double precision, complex vector
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.
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
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.
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.
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
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_min_vector_Z(cdouble *h_dst, unsigned numel, const cdouble *d_src)
Minimum value of a double precision, complex vector.
array minmax_packed(const array &input, int dim=-1)
Minimum and maximum (packed) of the elements along a dimension in matrix.
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.
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.
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_anytrue_vector_B(bool *h_dst, unsigned numel, const bool *d_src)
any along boolean vector
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.
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.
afError af_int_S(int *out, float *in, unsigned numel)
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.
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_where_UU(unsigned *n_out, unsigned **d_indices, unsigned n_in, const unsigned *d_X, bool is_baseone=false)
Unsigned integer find.
array where(const array &input)
Indices where nonzero (zero-based indexing).
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.
afError af_min_vector(float *h_dst, unsigned numel, const float *d_src)
Minimum value of a single precision vector.
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.
afError af_anytrue_vector_D(bool *h_dst, unsigned numel, const double *d_src)
any along double precision vector
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.
afError af_min_vector_D(double *h_dst, unsigned numel, const double *d_src)
Minimum value of a double precision vector.
array setunion(const array &A, const array &B)
Union of two vectors.
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,.
afError af_min_vector_C(cfloat *h_dst, unsigned numel, const cfloat *d_src)
Minimum value of a single precision, complex vector.
afError af_max_vector_D(double *h_dst, unsigned numel, const double *d_src)
Maximum value of a double precision vector.
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
afError af_randu_setseed(unsigned long long seed)
Set the seed for uniform random variable.
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.
afError af_max_vector_B(bool *h_dst, unsigned numel, const bool *d_src)
Maximum value of a boolean vector.
array setunique(const array &input)
Unique values.
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.
afError af_nnz_D(unsigned *count, unsigned numel, const double *mat, unsigned batch)
Number of non zero elements in a double precision stream.
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.
afError af_anytrue_vector_C(bool *h_dst, unsigned numel, const cfloat *d_src)
any along single precision, complex vector
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
afError af_max_vector_Z(cdouble *h_dst, unsigned numel, const cdouble *d_src)
Maximum value of a double precision, complex vector.
afError af_D_int(double *out, int *in, unsigned numel)
afError af_rand(unsigned *d_Y, unsigned numel)
Generate 32-bit random integers (every bit is random). Uses af_rand_setseed.
afError af_randn_setseed(unsigned long long seed)
Set the seed for normal random variable.
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.
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
afError af_randn_Z(cdouble *d_Y, unsigned numel)
Complex double-precision normal random variable.
Definition: core.h:2568
afError af_sum_vector_C(cfloat *h_dst, unsigned numel, const cfloat *d_src)
sum The value of a single precision, complex vector
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
afError af_randn_S(float *d_Y, unsigned numel)
Single-precision normal random variable.
ty corrcoef(const array &x, const array &y)
Correlation coefficient of two inputs of same size.
afError af_sum_vector_I(int *h_dst, unsigned numel, const int *d_src)
sum The value of a 32-bit signed integer vector
afError
Definition: defines.h:10
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.
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
cuDoubleComplex cdouble
Definition: defines.h:109
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
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.
afError af_S_int(float *out, int *in, unsigned numel)
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.
afError af_mul_vector_Z(cdouble *h_dst, unsigned numel, const cdouble *d_src)
multiplication of the values of a double precision, complex vector
afError af_alltrue_vector_U(bool *h_dst, unsigned numel, const unsigned *d_src)
all along 32-bit unsigned integer vector
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.
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.
afError af_alltrue_vector_C(bool *h_dst, unsigned numel, const cfloat *d_src)
all along single precision, complex vector
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.
afError af_anytrue_vector_I(bool *h_dst, unsigned numel, const int *d_src)
any along 32-bit signed integer vector
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.
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
afError af_sum_vector_B(float *h_dst, unsigned numel, const bool *d_src)
sum The value of a boolean vector
array stdev(const array &in, int dim=-1)
Standard deviation along a dimension.
afError af_anytrue_vector_S(bool *h_dst, unsigned numel, const float *d_src)
any along single precision vector
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
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.
afError af_min_vector_B(bool *h_dst, unsigned numel, const bool *d_src)
Minimum value of a boolean vector.
array min(const array &x, const array &y)
Minimum between x and y at every position.
afError af_alltrue_vector_B(bool *h_dst, unsigned numel, const bool *d_src)
all along boolean vector
array cov(const array &input, bool isbiased=false)
Covariance of row observations.
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_mul_vector_D(double *h_dst, unsigned numel, const double *d_src)
multiplication of the values of a double precision vector
afError af_max_vector_I(int *h_dst, unsigned numel, const int *d_src)
Maximum value of a 32-bit signed integer vector.
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.
af_op_t
Definition: core.h:19
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.
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
afError af_nnz_vector_D(unsigned *count, unsigned numel, const double *mat)
Number of non zero elements in a double precision stream.
afError af_where_II(unsigned *n_out, int **d_indices, unsigned n_in, const int *d_X, bool is_baseone=false)
Integer find.
afError af_randu_Z(cdouble *d_Y, unsigned numel)
Complex double-precision uniform random variable.
Definition: core.h:2550
afError af_randn_C(cfloat *d_Y, unsigned numel)
Complex single-precision normal random variable.
Definition: core.h:2566
afError af_anytrue_vector(bool *h_dst, unsigned numel, const float *d_src)
any along single precision vector
afError af_minmax_vector_D(double2 *h_dst, unsigned numel, const double *d_src)
Minimum and maximum value of a single precision vector.
afError af_min_vector_S(float *h_dst, unsigned numel, const float *d_src)
Minimum value of a single precision vector.
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.
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.
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_min_vector_U(unsigned *h_dst, unsigned numel, const unsigned *d_src)
Minimum value of a 32-bit unsigned integer vector.
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.
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
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_C(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_sum_vector(float *h_dst, unsigned numel, const float *d_src)
sum The value of a single precision vector
array mean(const array &input, int dim=-1)
Average along a dimension.
array accum(const array &input, int dim=-1, af_op_t op=sum_t, bool isupcast=false)
accumulated sum
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
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
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,.
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.
afError af_nnz_vector_S(unsigned *count, unsigned numel, const float *mat)
Number of non zero elements in a single precision stream.
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
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_int_D(int *out, double *in, unsigned numel)
afError af_anytrue_vector_Z(bool *h_dst, unsigned numel, const cdouble *d_src)
any along double precision, complex vector
afError af_rand_setseed(unsigned long long seed)
Set the seed for uniform random variable.
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_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
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
#define AFAPI
Definition: defines.h:45
afError af_max_vector(float *h_dst, unsigned numel, const float *d_src)
Maximum value of a single precision vector.
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
afError af_min_vector_I(int *h_dst, unsigned numel, const int *d_src)
Minimum value of a 32-bit signed integer vector.
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.
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.
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 ...
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_anytrue_vector_U(bool *h_dst, unsigned numel, const unsigned *d_src)
any along 32-bit unsigned integer vector
afError af_alltrue_vector_D(bool *h_dst, unsigned numel, const double *d_src)
all along double precision vector
array max(const array &x, const array &y)
Maximum between x and y at every position.
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.
afError af_minmax_vector_S(float2 *h_dst, unsigned numel, const float *d_src)
Minimum and maximum value of a single precision vector.
afError af_randu_S(float *d_Y, unsigned numel)
Single-precision uniform random variable.
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_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.
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.
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.
afError af_alltrue_vector_Z(bool *h_dst, unsigned numel, const cdouble *d_src)
all along double precision, complex vector
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
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
array setintersect(const array &A, const array &B)
Intersection of two vectors.
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,.
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
array var(const array &input, bool isbiased=false, int dim=-1)
Variance along a dimension.
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
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.
#define IS_BASEONE
Definition: core.h:12
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.
afError af_sum_vector_D(double *h_dst, unsigned numel, const double *d_src)
sum The value of a double precision vector
afError af_randu_C(cfloat *d_Y, unsigned numel)
Complex single-precision uniform random variable.
Definition: core.h:2548
afError af_nnz_vector_B(unsigned *count, unsigned numel, const bool *mat)
Number of non zero elements in a boolean (unsigned char) stream.
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.
array anytrue(const array &input, int dim=-1)
Test if all elements are false (zero) along a dimension in input.
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.
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
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
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 ...
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_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.
afError af_minmax_vector(float2 *h_dst, unsigned numel, const float *d_src)
Minimum and maximum value of a single precision vector.
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
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.
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.
cuFloatComplex cfloat
Definition: defines.h:108
afError af_randu_D(double *d_Y, unsigned numel)
Double-precision uniform random variable.
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_S(float *h_dst, unsigned numel, const float *d_src)
multiplication of the values of a single precision vector
afError af_max_vector_C(cfloat *h_dst, unsigned numel, const cfloat *d_src)
Maximum value of a single precision, complex vector.
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.
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
afError af_where_DD(unsigned *n_out, double **d_indices, unsigned n_in, const double *d_X, bool is_baseone=false)
Double-precision find.
afError af_mul_vector_B(float *h_dst, unsigned numel, const bool *d_src)
multiplication of the values of a boolean vector
afError af_sum_vector_S(float *h_dst, unsigned numel, const float *d_src)
sum The value of a single precision vector
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.
afError af_alltrue_vector_I(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 float *d_src)
ty dot(const array &x, const array &y)
Scalar dot product between two vectors.
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_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
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.
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_accum_Z(cdouble *d_out, unsigned ndims, unsigned *dims, const cdouble *d_in, unsigned batch, int dimension, int type)
Complex, Double precision, inclusive sum.
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.
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.
afError af_mul_vector_C(cfloat *h_dst, unsigned numel, const cfloat *d_src)
multiplication of the values of a single precision, complex vector
afError af_randn_D(double *d_Y, unsigned numel)
Double-precision normal random variable.
afError af_nnz_S(unsigned *count, unsigned numel, const float *mat, unsigned batch)
Number of non zero elements in a single precision stream.
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.
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.
unsigned count(const array &input)
Count nonzero elements in input.
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.
afError af_max_vector_U(unsigned *h_dst, unsigned numel, const unsigned *d_src)
Maximum value of a 32-bit unsigned integer vector.