A high-performance general-purpose compute library

- Main Page
- Tutorials
- Release Notes
- Examples

arith.h
Go to the documentation of this file.
1/*******************************************************
2 * Copyright (c) 2014, ArrayFire
3 * All rights reserved.
4 *
5 * This file is distributed under 3-clause BSD license.
6 * The complete license agreement can be obtained at:
7 * http://arrayfire.com/licenses/BSD-3-Clause
8 ********************************************************/
9
10#include <af/defines.h>
11
12#ifdef __cplusplus
13 namespace af
14{
15 class array;
16
24 AFAPI array min (const array &lhs, const array &rhs);
25
34 AFAPI array min (const array &lhs, const double rhs);
35
44 AFAPI array min (const double lhs, const array &rhs);
45
53 AFAPI array max (const array &lhs, const array &rhs);
54
63 AFAPI array max (const array &lhs, const double rhs);
64
73 AFAPI array max (const double lhs, const array &rhs);
74
75#if AF_API_VERSION >= 34
85 AFAPI array clamp(const array &in, const array &lo, const array &hi);
86#endif
87
88#if AF_API_VERSION >= 34
90 AFAPI array clamp(const array &in, const array &lo, const double hi);
91#endif
92
93#if AF_API_VERSION >= 34
95 AFAPI array clamp(const array &in, const double lo, const array &hi);
96#endif
97
98#if AF_API_VERSION >= 34
100 AFAPI array clamp(const array &in, const double lo, const double hi);
101#endif
103
112 AFAPI array rem (const array &lhs, const array &rhs);
113
115 AFAPI array rem (const array &lhs, const double rhs);
116
118 AFAPI array rem (const double lhs, const array &rhs);
120
129 AFAPI array mod (const array &lhs, const array &rhs);
130
132 AFAPI array mod (const array &lhs, const double rhs);
133
135 AFAPI array mod (const double lhs, const array &rhs);
137
144 AFAPI array abs (const array &in);
145
153 AFAPI array arg (const array &in);
154
161 AFAPI array sign (const array &in);
162
169 AFAPI array round (const array &in);
170
177 AFAPI array trunc (const array &in);
178
185 AFAPI array floor (const array &in);
186
193 AFAPI array ceil (const array &in);
194
205 AFAPI array hypot (const array &lhs, const array &rhs);
206
208 AFAPI array hypot (const array &lhs, const double rhs);
209
211 AFAPI array hypot (const double lhs, const array &rhs);
213
220 AFAPI array sin (const array &in);
221
228 AFAPI array cos (const array &in);
229
236 AFAPI array tan (const array &in);
237
244 AFAPI array asin (const array &in);
245
252 AFAPI array acos (const array &in);
253
260 AFAPI array atan (const array &in);
261
269 AFAPI array atan2 (const array &lhs, const array &rhs);
270
272 AFAPI array atan2 (const array &lhs, const double rhs);
273
275 AFAPI array atan2 (const double lhs, const array &rhs);
277
284 AFAPI array sinh(const array& in);
285
292 AFAPI array cosh(const array& in);
293
300 AFAPI array tanh(const array& in);
301
308 AFAPI array asinh(const array& in);
309
316 AFAPI array acosh(const array& in);
317
324 AFAPI array atanh(const array& in);
325
332 AFAPI array complex(const array& in);
333
341 AFAPI array complex(const array &real_, const array &imag_);
342
351 AFAPI array complex(const array &real_, const double imag_);
352
361 AFAPI array complex(const double real_, const array &imag_);
363
370 AFAPI array real (const array &in);
371
378 AFAPI array imag (const array &in);
379
386 AFAPI array conjg (const array &in);
387
395 AFAPI array root (const array &nth_root, const array &value);
396
404 AFAPI array root (const array &nth_root, const double value);
405
413 AFAPI array root (const double nth_root, const array &value);
414
415
426 AFAPI array pow (const array &base, const array &exponent);
427
429 AFAPI array pow (const array &base, const double exponent);
430
432 AFAPI array pow (const double base, const array &exponent);
433
439 AFAPI array pow2 (const array &in);
441
442#if AF_API_VERSION >= 31
451 AFAPI array sigmoid (const array &in);
452#endif
453
460 AFAPI array exp (const array &in);
461
471 AFAPI array expm1 (const array &in);
472
479 AFAPI array erf (const array &in);
480
487 AFAPI array erfc (const array &in);
488
495 AFAPI array log (const array &in);
496
506 AFAPI array log1p (const array &in);
507
514 AFAPI array log10 (const array &in);
515
522 AFAPI array log2 (const array &in);
523
530 AFAPI array sqrt (const array &in);
531
532#if AF_API_VERSION >= 37
539 AFAPI array rsqrt (const array &in);
540#endif
541
548 AFAPI array cbrt (const array &in);
549
556 AFAPI array factorial (const array &in);
557
564 AFAPI array tgamma (const array &in);
565
573 AFAPI array lgamma (const array &in);
574
581 AFAPI array iszero (const array &in);
582
590 AFAPI array isInf (const array &in);
591
598 AFAPI array isNaN (const array &in);
599}
600#endif
601
602#ifdef __cplusplus
603 extern "C" {
604#endif
605
618 AFAPI af_err af_add (af_array *out, const af_array lhs, const af_array rhs, const bool batch);
619
632 AFAPI af_err af_sub (af_array *out, const af_array lhs, const af_array rhs, const bool batch);
633
646 AFAPI af_err af_mul (af_array *out, const af_array lhs, const af_array rhs, const bool batch);
647
660 AFAPI af_err af_div (af_array *out, const af_array lhs, const af_array rhs, const bool batch);
661
677 AFAPI af_err af_lt (af_array *out, const af_array lhs, const af_array rhs, const bool batch);
678
694 AFAPI af_err af_gt (af_array *out, const af_array lhs, const af_array rhs, const bool batch);
695
711 AFAPI af_err af_le (af_array *out, const af_array lhs, const af_array rhs, const bool batch);
712
728 AFAPI af_err af_ge (af_array *out, const af_array lhs, const af_array rhs, const bool batch);
729
744 AFAPI af_err af_eq (af_array *out, const af_array lhs, const af_array rhs, const bool batch);
745
761 AFAPI af_err af_neq (af_array *out, const af_array lhs, const af_array rhs, const bool batch);
762
777 AFAPI af_err af_and (af_array *out, const af_array lhs, const af_array rhs, const bool batch);
778
793 AFAPI af_err af_or (af_array *out, const af_array lhs, const af_array rhs, const bool batch);
794
807 AFAPI af_err af_not (af_array *out, const af_array in);
808
809#if AF_API_VERSION >= 38
820 AFAPI af_err af_bitnot (af_array *out, const af_array in);
821#endif
822
835 AFAPI af_err af_bitand (af_array *out, const af_array lhs, const af_array rhs, const bool batch);
836
849 AFAPI af_err af_bitor (af_array *out, const af_array lhs, const af_array rhs, const bool batch);
850
863 AFAPI af_err af_bitxor (af_array *out, const af_array lhs, const af_array rhs, const bool batch);
864
877 AFAPI af_err af_bitshiftl(af_array *out, const af_array lhs, const af_array rhs, const bool batch);
878
891 AFAPI af_err af_bitshiftr(af_array *out, const af_array lhs, const af_array rhs, const bool batch);
892
935 AFAPI af_err af_cast (af_array *out, const af_array in, const af_dtype type);
936
949 AFAPI af_err af_minof (af_array *out, const af_array lhs, const af_array rhs, const bool batch);
950
964 AFAPI af_err af_maxof (af_array *out, const af_array lhs, const af_array rhs, const bool batch);
965
966#if AF_API_VERSION >= 34
980 AFAPI af_err af_clamp(af_array *out, const af_array in,
981 const af_array lo, const af_array hi, const bool batch);
982#endif
983
996 AFAPI af_err af_rem (af_array *out, const af_array lhs, const af_array rhs, const bool batch);
997
1010 AFAPI af_err af_mod (af_array *out, const af_array lhs, const af_array rhs, const bool batch);
1011
1022 AFAPI af_err af_abs (af_array *out, const af_array in);
1023
1035 AFAPI af_err af_arg (af_array *out, const af_array in);
1036
1047 AFAPI af_err af_sign (af_array *out, const af_array in);
1048
1059 AFAPI af_err af_round (af_array *out, const af_array in);
1060
1071 AFAPI af_err af_trunc (af_array *out, const af_array in);
1072
1083 AFAPI af_err af_floor (af_array *out, const af_array in);
1084
1095 AFAPI af_err af_ceil (af_array *out, const af_array in);
1096
1109 AFAPI af_err af_hypot (af_array *out, const af_array lhs, const af_array rhs, const bool batch);
1110
1121 AFAPI af_err af_sin (af_array *out, const af_array in);
1122
1133 AFAPI af_err af_cos (af_array *out, const af_array in);
1134
1145 AFAPI af_err af_tan (af_array *out, const af_array in);
1146
1157 AFAPI af_err af_asin (af_array *out, const af_array in);
1158
1169 AFAPI af_err af_acos (af_array *out, const af_array in);
1170
1181 AFAPI af_err af_atan (af_array *out, const af_array in);
1182
1195 AFAPI af_err af_atan2 (af_array *out, const af_array lhs, const af_array rhs, const bool batch);
1196
1207 AFAPI af_err af_sinh (af_array *out, const af_array in);
1208
1219 AFAPI af_err af_cosh (af_array *out, const af_array in);
1220
1231 AFAPI af_err af_tanh (af_array *out, const af_array in);
1232
1243 AFAPI af_err af_asinh (af_array *out, const af_array in);
1244
1255 AFAPI af_err af_acosh (af_array *out, const af_array in);
1256
1267 AFAPI af_err af_atanh (af_array *out, const af_array in);
1268
1279 AFAPI af_err af_cplx(af_array* out, const af_array in);
1280
1295 AFAPI af_err af_cplx2(af_array* out, const af_array real, const af_array imag, const bool batch);
1296
1307 AFAPI af_err af_real(af_array* out, const af_array in);
1308
1319 AFAPI af_err af_imag(af_array* out, const af_array in);
1320
1331 AFAPI af_err af_conjg(af_array* out, const af_array in);
1332
1345 AFAPI af_err af_root (af_array *out, const af_array lhs, const af_array rhs, const bool batch);
1346
1347
1360 AFAPI af_err af_pow (af_array *out, const af_array lhs, const af_array rhs, const bool batch);
1361
1372 AFAPI af_err af_pow2 (af_array *out, const af_array in);
1373
1374#if AF_API_VERSION >= 31
1387 AFAPI af_err af_sigmoid(af_array* out, const af_array in);
1388#endif
1389
1400 AFAPI af_err af_exp (af_array *out, const af_array in);
1401
1413 AFAPI af_err af_expm1 (af_array *out, const af_array in);
1414
1425 AFAPI af_err af_erf (af_array *out, const af_array in);
1426
1437 AFAPI af_err af_erfc (af_array *out, const af_array in);
1438
1449 AFAPI af_err af_log (af_array *out, const af_array in);
1450
1461 AFAPI af_err af_log1p (af_array *out, const af_array in);
1462
1473 AFAPI af_err af_log10 (af_array *out, const af_array in);
1474
1485 AFAPI af_err af_log2 (af_array *out, const af_array in);
1486
1497 AFAPI af_err af_sqrt (af_array *out, const af_array in);
1498
1499#if AF_API_VERSION >= 37
1510 AFAPI af_err af_rsqrt (af_array *out, const af_array in);
1511#endif
1522 AFAPI af_err af_cbrt (af_array *out, const af_array in);
1523
1534 AFAPI af_err af_factorial (af_array *out, const af_array in);
1535
1546 AFAPI af_err af_tgamma (af_array *out, const af_array in);
1547
1559 AFAPI af_err af_lgamma (af_array *out, const af_array in);
1560
1571 AFAPI af_err af_iszero (af_array *out, const af_array in);
1572
1584 AFAPI af_err af_isinf (af_array *out, const af_array in);
1585
1596 AFAPI af_err af_isnan (af_array *out, const af_array in);
1597
1598#ifdef __cplusplus
1599}
1600#endif
af_log2
af_err af_log2(af_array *out, const af_array in)
C Interface to evaluate the base 2 logarithm.
af_lt
af_err af_lt(af_array *out, const af_array lhs, const af_array rhs, const bool batch)
C Interface to perform a less-than comparison between corresponding elements of two arrays.
af::array
A multi dimensional data container.
Definition array.h:37
defines.h
af_dtype
af_dtype
Definition defines.h:210
af_err
af_err
Definition defines.h:71
af_array
void * af_array
Definition defines.h:240
AFAPI
#define AFAPI
Definition defines.h:38
af_abs
af_err af_abs(af_array *out, const af_array in)
C Interface to calculate the absolute value.
af::abs
array abs(const array &in)
C++ Interface to calculate the absolute value.
af_acos
af_err af_acos(af_array *out, const af_array in)
C Interface to evaluate the inverse cosine function.
af::acos
array acos(const array &in)
C++ Interface to evaluate the inverse cosine function.
af_acosh
af_err af_acosh(af_array *out, const af_array in)
C Interface to evaluate the inverse hyperbolic cosine function.
af::acosh
array acosh(const array &in)
C++ Interface to evaluate the inverse hyperbolic cosine function.
af_add
af_err af_add(af_array *out, const af_array lhs, const af_array rhs, const bool batch)
C Interface to add two arrays.
af_and
af_err af_and(af_array *out, const af_array lhs, const af_array rhs, const bool batch)
C Interface to evaluate the logical AND of two arrays.
af_arg
af_err af_arg(af_array *out, const af_array in)
C Interface to calculate the phase angle (in radians) of a complex array.
af::arg
array arg(const array &in)
C++ Interface to calculate the phase angle (in radians) of a complex array.
af::asin
array asin(const array &in)
C++ Interface to evaluate the inverse sine function.
af_asin
af_err af_asin(af_array *out, const af_array in)
C Interface to evaluate the inverse sine function.
af_asinh
af_err af_asinh(af_array *out, const af_array in)
C Interface to evaluate the inverse hyperbolic sine function.
af::asinh
array asinh(const array &in)
C++ Interface to evaluate the inverse hyperbolic sine function.
af::atan2
array atan2(const array &lhs, const array &rhs)
C++ Interface to evaluate the inverse tangent of two arrays.
af::atan
array atan(const array &in)
C++ Interface to evaluate the inverse tangent function.
af_atan
af_err af_atan(af_array *out, const af_array in)
C Interface to evaluate the inverse tangent function.
af_atan2
af_err af_atan2(af_array *out, const af_array lhs, const af_array rhs, const bool batch)
C Interface to evaluate the inverse tangent of two arrays.
af::atanh
array atanh(const array &in)
C++ Interface to evaluate the inverse hyperbolic tangent function.
af_atanh
af_err af_atanh(af_array *out, const af_array in)
C Interface to evaluate the inverse hyperbolic tangent function.
af_bitand
af_err af_bitand(af_array *out, const af_array lhs, const af_array rhs, const bool batch)
C Interface to evaluate the bitwise AND of two arrays.
af_bitnot
af_err af_bitnot(af_array *out, const af_array in)
C Interface to evaluate the bitwise NOT of an array.
af_bitor
af_err af_bitor(af_array *out, const af_array lhs, const af_array rhs, const bool batch)
C Interface to evaluate the bitwise OR of two arrays.
af_bitxor
af_err af_bitxor(af_array *out, const af_array lhs, const af_array rhs, const bool batch)
C Interface to evaluate the bitwise XOR of two arrays.
af_cast
af_err af_cast(af_array *out, const af_array in, const af_dtype type)
C Interface to cast an array from one type to another.
af::cbrt
array cbrt(const array &in)
C++ Interface to evaluate the cube root.
af_cbrt
af_err af_cbrt(af_array *out, const af_array in)
C Interface to evaluate the cube root.
af_ceil
af_err af_ceil(af_array *out, const af_array in)
C Interface to ceil numbers.
af::ceil
array ceil(const array &in)
C++ Interface to ceil numbers.
af_clamp
af_err af_clamp(af_array *out, const af_array in, const af_array lo, const af_array hi, const bool batch)
C Interface to clamp an array between an upper and a lower limit.
af::clamp
array clamp(const array &in, const array &lo, const array &hi)
af::conjg
array conjg(const array &in)
C++ Interface to calculate the complex conjugate of an input array.
af_conjg
af_err af_conjg(af_array *out, const af_array in)
C Interface to evaluate the complex conjugate of an input array.
af_cos
af_err af_cos(af_array *out, const af_array in)
C Interface to evaluate the cosine function.
af::cos
array cos(const array &in)
C++ Interface to evaluate the cosine function.
af::cosh
array cosh(const array &in)
C++ Interface to evaluate the hyperbolic cosine function.
af_cosh
af_err af_cosh(af_array *out, const af_array in)
C Interface to evaluate the hyperbolic cosine function.
af_cplx2
af_err af_cplx2(af_array *out, const af_array real, const af_array imag, const bool batch)
C Interface to create a complex array from two real arrays.
af::complex
array complex(const array &in)
C++ Interface to create a complex array from a single real array.
af_cplx
af_err af_cplx(af_array *out, const af_array in)
C Interface to create a complex array from a single real array.
af_div
af_err af_div(af_array *out, const af_array lhs, const af_array rhs, const bool batch)
C Interface to divide one array by another array.
af_eq
af_err af_eq(af_array *out, const af_array lhs, const af_array rhs, const bool batch)
C Interface to check if corresponding elements of two arrays are equal.
af_erf
af_err af_erf(af_array *out, const af_array in)
C Interface to evaluate the error function.
af::erf
array erf(const array &in)
C++ Interface to evaluate the error function.
af::erfc
array erfc(const array &in)
C++ Interface to evaluate the complementary error function.
af_erfc
af_err af_erfc(af_array *out, const af_array in)
C Interface to evaluate the complementary error function.
af_exp
af_err af_exp(af_array *out, const af_array in)
C Interface to evaluate the exponential.
af::exp
array exp(const array &in)
C++ Interface to evaluate the exponential.
af::expm1
array expm1(const array &in)
C++ Interface to evaluate the exponential of an array minus 1, exp(in) - 1.
af_expm1
af_err af_expm1(af_array *out, const af_array in)
C Interface to evaluate the exponential of an array minus 1, exp(in) - 1.
af_factorial
af_err af_factorial(af_array *out, const af_array in)
C Interface to calculate the factorial.
af::factorial
array factorial(const array &in)
C++ Interface to calculate the factorial.
af::floor
array floor(const array &in)
C++ Interface to floor numbers.
af_hypot
af_err af_hypot(af_array *out, const af_array lhs, const af_array rhs, const bool batch)
C Interface to calculate the length of the hypotenuse of two inputs.
af_floor
af_err af_floor(af_array *out, const af_array in)
C Interface to floor numbers.
af_ge
af_err af_ge(af_array *out, const af_array lhs, const af_array rhs, const bool batch)
C Interface to perform a greater-than-or-equal comparison between corresponding elements of two array...
af_gt
af_err af_gt(af_array *out, const af_array lhs, const af_array rhs, const bool batch)
C Interface to perform a greater-than comparison between corresponding elements of two arrays.
af::hypot
array hypot(const array &lhs, const array &rhs)
C++ Interface to calculate the length of the hypotenuse of two inputs.
af_imag
af_err af_imag(af_array *out, const af_array in)
C Interface to return the imaginary part of a complex array.
af::imag
array imag(const array &in)
C++ Interface to return the imaginary part of a complex array.
af_isinf
af_err af_isinf(af_array *out, const af_array in)
C Interface to check if values are infinite.
af::isInf
array isInf(const array &in)
C++ Interface to check if values are infinite.
af_isnan
af_err af_isnan(af_array *out, const af_array in)
C Interface to check if values are NaN.
af::isNaN
array isNaN(const array &in)
C++ Interface to check if values are NaN.
af_iszero
af_err af_iszero(af_array *out, const af_array in)
C Interface to check if values are zero.
af::iszero
array iszero(const array &in)
C++ Interface to check which values are zero.
af_le
af_err af_le(af_array *out, const af_array lhs, const af_array rhs, const bool batch)
C Interface to perform a less-than-or-equal comparison between corresponding elements of two arrays.
af::lgamma
array lgamma(const array &in)
C++ Interface to evaluate the logarithm of the absolute value of the gamma function.
af_lgamma
af_err af_lgamma(af_array *out, const af_array in)
C Interface to evaluate the logarithm of the absolute value of the gamma function.
af::log10
array log10(const array &in)
C++ Interface to evaluate the base 10 logarithm.
af_log10
af_err af_log10(af_array *out, const af_array in)
C Interface to evaluate the base 10 logarithm.
af_log1p
af_err af_log1p(af_array *out, const af_array in)
C Interface to evaluate the natural logarithm of 1 + input, ln(1+in).
af::log1p
array log1p(const array &in)
C++ Interface to evaluate the natural logarithm of 1 + input, ln(1+in).
af::log
array log(const array &in)
C++ Interface to evaluate the natural logarithm.
af_log
af_err af_log(af_array *out, const af_array in)
C Interface to evaluate the natural logarithm.
af_maxof
af_err af_maxof(af_array *out, const af_array lhs, const af_array rhs, const bool batch)
C Interface to find the elementwise minimum between an array and a scalar value.
af_minof
af_err af_minof(af_array *out, const af_array lhs, const af_array rhs, const bool batch)
C Interface to find the elementwise minimum between two arrays.
af::mod
array mod(const array &lhs, const array &rhs)
af_mod
af_err af_mod(af_array *out, const af_array lhs, const af_array rhs, const bool batch)
C Interface to calculate the modulus.
af_mul
af_err af_mul(af_array *out, const af_array lhs, const af_array rhs, const bool batch)
C Interface to multiply two arrays.
af_neq
af_err af_neq(af_array *out, const af_array lhs, const af_array rhs, const bool batch)
C Interface to check if corresponding elements of two arrays are not equal.
af_not
af_err af_not(af_array *out, const af_array in)
C Interface to evaluate the logical NOT of an array.
af_or
af_err af_or(af_array *out, const af_array lhs, const af_array rhs, const bool batch)
C Interface the evaluate the logical OR of two arrays.
af_pow2
af_err af_pow2(af_array *out, const af_array in)
C Interface to raise 2 to a power (or exponent).
af::pow2
array pow2(const array &in)
C++ Interface to raise 2 to a power (or exponent).
af_pow
af_err af_pow(af_array *out, const af_array lhs, const af_array rhs, const bool batch)
C Interface to raise a base to a power (or exponent).
af::pow
array pow(const array &base, const array &exponent)
C++ Interface to raise a base to a power (or exponent).
af::real
array real(const array &in)
C++ Interface to return the real part of a complex array.
af_real
af_err af_real(af_array *out, const af_array in)
C Interface to return the real part of a complex array.
af::rem
array rem(const array &lhs, const array &rhs)
af_rem
af_err af_rem(af_array *out, const af_array lhs, const af_array rhs, const bool batch)
C Interface to calculate the remainder.
af::root
array root(const array &nth_root, const array &value)
C++ Interface to evaluate the nth root.
af_root
af_err af_root(af_array *out, const af_array lhs, const af_array rhs, const bool batch)
C Interface to evaluate the nth root.
af_round
af_err af_round(af_array *out, const af_array in)
C Interface to round numbers.
af::round
array round(const array &in)
C++ Interface to round numbers.
af_rsqrt
af_err af_rsqrt(af_array *out, const af_array in)
C Interface to evaluate the reciprocal square root.
af::rsqrt
array rsqrt(const array &in)
C++ Interface to evaluate the reciprocal square root.
af_bitshiftl
af_err af_bitshiftl(af_array *out, const af_array lhs, const af_array rhs, const bool batch)
C Interface to shift the bits of integer arrays left.
af_bitshiftr
af_err af_bitshiftr(af_array *out, const af_array lhs, const af_array rhs, const bool batch)
C Interface to shift the bits of integer arrays right.
af::sigmoid
array sigmoid(const array &in)
C++ Interface to evaluate the logistical sigmoid function.
af_sigmoid
af_err af_sigmoid(af_array *out, const af_array in)
C Interface to evaluate the logistical sigmoid function.
af::sign
array sign(const array &in)
C++ Interface to return the sign of elements in an array.
af_sign
af_err af_sign(af_array *out, const af_array in)
C Interface to calculate the sign of elements in an array.
af::sin
array sin(const array &in)
C++ Interface to evaluate the sine function.
af_sin
af_err af_sin(af_array *out, const af_array in)
C Interface to evaluate the sine function.
af::sinh
array sinh(const array &in)
C++ Interface to evaluate the hyperbolic sine function.
af_sinh
af_err af_sinh(af_array *out, const af_array in)
C Interface to evaluate the hyperbolic sine function.
af_sqrt
af_err af_sqrt(af_array *out, const af_array in)
C Interface to evaluate the square root.
af::sqrt
array sqrt(const array &in)
C++ Interface to evaluate the square root.
af_sub
af_err af_sub(af_array *out, const af_array lhs, const af_array rhs, const bool batch)
C Interface to subtract one array from another array.
af::tan
array tan(const array &in)
C++ Interface to evaluate the tangent function.
af_tan
af_err af_tan(af_array *out, const af_array in)
C Interface to evaluate the tangent function.
af_tanh
af_err af_tanh(af_array *out, const af_array in)
C Interface to evaluate the hyperbolic tangent function.
af::tanh
array tanh(const array &in)
C++ Interface to evaluate the hyperbolic tangent function.
af::tgamma
array tgamma(const array &in)
C++ Interface to evaluate the gamma function.
af_tgamma
af_err af_tgamma(af_array *out, const af_array in)
C Interface to evaluate the gamma function.
af::trunc
array trunc(const array &in)
C++ Interface to truncate numbers.
af_trunc
af_err af_trunc(af_array *out, const af_array in)
C Interface to truncate numbers.
af::max
AFAPI array max(const array &in, const int dim=-1)
C++ Interface to return the maximum along a given dimension.
af::min
AFAPI array min(const array &in, const int dim=-1)
C++ Interface to return the minimum along a given dimension.
af
Definition algorithm.h:15
af::log2
array log2(const array &in)
C++ Interface to evaluate the base 2 logarithm.