arith.h Source File

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
25 AFAPI array min (const array &lhs, const array &rhs);
26
28 AFAPI array min (const array &lhs, const double rhs);
29
31 AFAPI array min (const double lhs, const array &rhs);
33
41 AFAPI array max (const array &lhs, const array &rhs);
42
44 AFAPI array max (const array &lhs, const double rhs);
45
47 AFAPI array max (const double lhs, const array &rhs);
49
50 #if AF_API_VERSION >= 34
51 AFAPI array clamp(const array &in, const array &lo, const array &hi);
60 #endif
61
62 #if AF_API_VERSION >= 34
63 AFAPI array clamp(const array &in, const array &lo, const double hi);
65 #endif
66
67 #if AF_API_VERSION >= 34
68 AFAPI array clamp(const array &in, const double lo, const array &hi);
71 #endif
72
73 #if AF_API_VERSION >= 34
74 AFAPI array clamp(const array &in, const double lo, const double hi);
77 #endif
78
87 AFAPI array rem (const array &lhs, const array &rhs);
88
90 AFAPI array rem (const array &lhs, const double rhs);
91
93 AFAPI array rem (const double lhs, const array &rhs);
95
104 AFAPI array mod (const array &lhs, const array &rhs);
105
107 AFAPI array mod (const array &lhs, const double rhs);
108
110 AFAPI array mod (const double lhs, const array &rhs);
112
119 AFAPI array abs (const array &in);
120
129 AFAPI array arg (const array &in);
130
141 AFAPI array sign (const array &in);
142
151 AFAPI array round (const array &in);
152
161 AFAPI array trunc (const array &in);
162
163
170 AFAPI array floor (const array &in);
171
178 AFAPI array ceil (const array &in);
179
190 AFAPI array hypot (const array &lhs, const array &rhs);
191
193 AFAPI array hypot (const array &lhs, const double rhs);
194
196 AFAPI array hypot (const double lhs, const array &rhs);
198
205 AFAPI array sin (const array &in);
206
213 AFAPI array cos (const array &in);
214
221 AFAPI array tan (const array &in);
222
229 AFAPI array asin (const array &in);
230
237 AFAPI array acos (const array &in);
238
245 AFAPI array atan (const array &in);
246
254 AFAPI array atan2 (const array &lhs, const array &rhs);
255
257 AFAPI array atan2 (const array &lhs, const double rhs);
258
260 AFAPI array atan2 (const double lhs, const array &rhs);
262
276 AFAPI array complex(const array &lhs, const array &rhs);
277
280 AFAPI array complex(const array &lhs, const double rhs);
281
284 AFAPI array complex(const double lhs, const array &rhs);
285
292 AFAPI array complex(const array &in);
294
301 AFAPI array real (const array &in);
302
309 AFAPI array imag (const array &in);
310
317 AFAPI array conjg (const array &in);
318
325 AFAPI array sinh (const array &in);
326
333 AFAPI array cosh (const array &in);
334
341 AFAPI array tanh (const array &in);
342
349 AFAPI array asinh (const array &in);
350
357 AFAPI array acosh (const array &in);
358
365 AFAPI array atanh (const array &in);
366
374 AFAPI array root (const array &lhs, const array &rhs);
375
383 AFAPI array root (const array &lhs, const double rhs);
384
392 AFAPI array root (const double lhs, const array &rhs);
393
394
405 AFAPI array pow (const array &lhs, const array &rhs);
406
408 AFAPI array pow (const array &lhs, const double rhs);
409
411 AFAPI array pow (const double lhs, const array &rhs);
412
418 AFAPI array pow2 (const array &in);
420
421 #if AF_API_VERSION >= 31
422 AFAPI array sigmoid (const array &in);
429 #endif
430
437 AFAPI array exp (const array &in);
438
446 AFAPI array expm1 (const array &in);
447
454 AFAPI array erf (const array &in);
455
462 AFAPI array erfc (const array &in);
463
470 AFAPI array log (const array &in);
471
479 AFAPI array log1p (const array &in);
480
487 AFAPI array log10 (const array &in);
488
495 AFAPI array log2 (const array &in);
496
503 AFAPI array sqrt (const array &in);
504
511 AFAPI array cbrt (const array &in);
512
520 AFAPI array factorial (const array &in);
521
528 AFAPI array tgamma (const array &in);
529
536 AFAPI array lgamma (const array &in);
537
544 AFAPI array iszero (const array &in);
545
552 AFAPI array isInf (const array &in);
553
560 AFAPI array isNaN (const array &in);
561 }
562 #endif
563
564 #ifdef __cplusplus
565 extern "C" {
566 #endif
567
579 AFAPI af_err af_add (af_array *out, const af_array lhs, const af_array rhs, const bool batch);
580
592 AFAPI af_err af_sub (af_array *out, const af_array lhs, const af_array rhs, const bool batch);
593
605 AFAPI af_err af_mul (af_array *out, const af_array lhs, const af_array rhs, const bool batch);
606
618 AFAPI af_err af_div (af_array *out, const af_array lhs, const af_array rhs, const bool batch);
619
631 AFAPI af_err af_lt (af_array *out, const af_array lhs, const af_array rhs, const bool batch);
632
644 AFAPI af_err af_gt (af_array *out, const af_array lhs, const af_array rhs, const bool batch);
645
657 AFAPI af_err af_le (af_array *out, const af_array lhs, const af_array rhs, const bool batch);
658
670 AFAPI af_err af_ge (af_array *out, const af_array lhs, const af_array rhs, const bool batch);
671
683 AFAPI af_err af_eq (af_array *out, const af_array lhs, const af_array rhs, const bool batch);
684
696 AFAPI af_err af_neq (af_array *out, const af_array lhs, const af_array rhs, const bool batch);
697
709 AFAPI af_err af_and (af_array *out, const af_array lhs, const af_array rhs, const bool batch);
710
722 AFAPI af_err af_or (af_array *out, const af_array lhs, const af_array rhs, const bool batch);
723
733 AFAPI af_err af_not (af_array *out, const af_array in);
734
746 AFAPI af_err af_bitand (af_array *out, const af_array lhs, const af_array rhs, const bool batch);
747
759 AFAPI af_err af_bitor (af_array *out, const af_array lhs, const af_array rhs, const bool batch);
760
772 AFAPI af_err af_bitxor (af_array *out, const af_array lhs, const af_array rhs, const bool batch);
773
785 AFAPI af_err af_bitshiftl(af_array *out, const af_array lhs, const af_array rhs, const bool batch);
786
798 AFAPI af_err af_bitshiftr(af_array *out, const af_array lhs, const af_array rhs, const bool batch);
799
810 AFAPI af_err af_cast (af_array *out, const af_array in, const af_dtype type);
811
823 AFAPI af_err af_minof (af_array *out, const af_array lhs, const af_array rhs, const bool batch);
824
836 AFAPI af_err af_maxof (af_array *out, const af_array lhs, const af_array rhs, const bool batch);
837
838 #if AF_API_VERSION >= 34
839
851 AFAPI af_err af_clamp(af_array *out, const af_array in,
852 const af_array lo, const af_array hi, const bool batch);
853 #endif
854
866 AFAPI af_err af_rem (af_array *out, const af_array lhs, const af_array rhs, const bool batch);
867
879 AFAPI af_err af_mod (af_array *out, const af_array lhs, const af_array rhs, const bool batch);
880
890 AFAPI af_err af_abs (af_array *out, const af_array in);
891
901 AFAPI af_err af_arg (af_array *out, const af_array in);
902
914 AFAPI af_err af_sign (af_array *out, const af_array in);
915
927 AFAPI af_err af_round (af_array *out, const af_array in);
928
938 AFAPI af_err af_trunc (af_array *out, const af_array in);
939
949 AFAPI af_err af_floor (af_array *out, const af_array in);
950
960 AFAPI af_err af_ceil (af_array *out, const af_array in);
961
973 AFAPI af_err af_hypot (af_array *out, const af_array lhs, const af_array rhs, const bool batch);
974
984 AFAPI af_err af_sin (af_array *out, const af_array in);
985
995 AFAPI af_err af_cos (af_array *out, const af_array in);
996
1006 AFAPI af_err af_tan (af_array *out, const af_array in);
1007
1017 AFAPI af_err af_asin (af_array *out, const af_array in);
1018
1028 AFAPI af_err af_acos (af_array *out, const af_array in);
1029
1039 AFAPI af_err af_atan (af_array *out, const af_array in);
1040
1052 AFAPI af_err af_atan2 (af_array *out, const af_array lhs, const af_array rhs, const bool batch);
1053
1065 AFAPI af_err af_cplx2 (af_array *out, const af_array lhs, const af_array rhs, const bool batch);
1066
1076 AFAPI af_err af_cplx (af_array *out, const af_array in);
1077
1087 AFAPI af_err af_real (af_array *out, const af_array in);
1088
1098 AFAPI af_err af_imag (af_array *out, const af_array in);
1099
1109 AFAPI af_err af_conjg (af_array *out, const af_array in);
1110
1120 AFAPI af_err af_sinh (af_array *out, const af_array in);
1121
1131 AFAPI af_err af_cosh (af_array *out, const af_array in);
1132
1142 AFAPI af_err af_tanh (af_array *out, const af_array in);
1143
1153 AFAPI af_err af_asinh (af_array *out, const af_array in);
1154
1164 AFAPI af_err af_acosh (af_array *out, const af_array in);
1165
1175 AFAPI af_err af_atanh (af_array *out, const af_array in);
1176
1188 AFAPI af_err af_root (af_array *out, const af_array lhs, const af_array rhs, const bool batch);
1189
1190
1202 AFAPI af_err af_pow (af_array *out, const af_array lhs, const af_array rhs, const bool batch);
1203
1213 AFAPI af_err af_pow2 (af_array *out, const af_array in);
1214
1224 AFAPI af_err af_exp (af_array *out, const af_array in);
1225
1226 #if AF_API_VERSION >= 31
1227
1236 AFAPI af_err af_sigmoid (af_array *out, const af_array in);
1237 #endif
1238
1248 AFAPI af_err af_expm1 (af_array *out, const af_array in);
1249
1259 AFAPI af_err af_erf (af_array *out, const af_array in);
1260
1270 AFAPI af_err af_erfc (af_array *out, const af_array in);
1271
1281 AFAPI af_err af_log (af_array *out, const af_array in);
1282
1292 AFAPI af_err af_log1p (af_array *out, const af_array in);
1293
1303 AFAPI af_err af_log10 (af_array *out, const af_array in);
1304
1314 AFAPI af_err af_log2 (af_array *out, const af_array in);
1315
1325 AFAPI af_err af_sqrt (af_array *out, const af_array in);
1326
1336 AFAPI af_err af_cbrt (af_array *out, const af_array in);
1337
1347 AFAPI af_err af_factorial (af_array *out, const af_array in);
1348
1358 AFAPI af_err af_tgamma (af_array *out, const af_array in);
1359
1369 AFAPI af_err af_lgamma (af_array *out, const af_array in);
1370
1380 AFAPI af_err af_iszero (af_array *out, const af_array in);
1381
1391 AFAPI af_err af_isinf (af_array *out, const af_array in);
1392
1402 AFAPI af_err af_isnan (af_array *out, const af_array in);
1403
1404 #ifdef __cplusplus
1405 }
1406 #endif
af_log2
AFAPI af_err af_log2(af_array *out, const af_array in)
C Interface for logarithm base 2.
af_bitshiftl
AFAPI af_err af_bitshiftl(af_array *out, const af_array lhs, const af_array rhs, const bool batch)
C Interface for left shift on integer arrays.
af_isnan
AFAPI af_err af_isnan(af_array *out, const af_array in)
C Interface for checking if values are NaNs.
af::tgamma
AFAPI array tgamma(const array &in)
C++ Interface for gamma function of input.
af::round
AFAPI array round(const array &in)
C++ Interface for rounding an array of numbers.
af::pow2
AFAPI array pow2(const array &in)
C++ Interface for power of 2.
af_mod
AFAPI af_err af_mod(af_array *out, const af_array lhs, const af_array rhs, const bool batch)
C Interface for modulus.
af_cplx2
AFAPI af_err af_cplx2(af_array *out, const af_array lhs, const af_array rhs, const bool batch)
C Interface for creating complex array from two input arrays.
af_bitshiftr
AFAPI af_err af_bitshiftr(af_array *out, const af_array lhs, const af_array rhs, const bool batch)
C Interface for right shift on integer arrays.
af
Definition: algorithm.h:14
af_bitand
AFAPI af_err af_bitand(af_array *out, const af_array lhs, const af_array rhs, const bool batch)
C Interface for performing bitwise and on two arrays.
af::arg
AFAPI array arg(const array &in)
C++ Interface for arg.
af::conjg
AFAPI array conjg(const array &in)
C++ Interface for getting the complex conjugate of input array.
af_log10
AFAPI af_err af_log10(af_array *out, const af_array in)
C Interface for logarithm base 10.
af_floor
AFAPI af_err af_floor(af_array *out, const af_array in)
C Interface for flooring an array of numbers.
af::log1p
AFAPI array log1p(const array &in)
C++ Interface for natural logarithm of 1 + input.
af_rem
AFAPI af_err af_rem(af_array *out, const af_array lhs, const af_array rhs, const bool batch)
C Interface for remainder.
af::mod
AFAPI array mod(const array &lhs, const array &rhs)
C++ Interface for modulus when dividend and divisor are arrays or one of them is scalar.
af::complex
AFAPI array complex(const array &lhs, const array &rhs)
C++ Interface for creating complex array from two inputs.
af_ceil
AFAPI af_err af_ceil(af_array *out, const af_array in)
C Interface for ceiling an array of numbers.
af::root
AFAPI array root(const array &lhs, const array &rhs)
C++ Interface for nth root.
af_sqrt
AFAPI af_err af_sqrt(af_array *out, const af_array in)
C Interface for square root.
af_imag
AFAPI af_err af_imag(af_array *out, const af_array in)
C Interface for getting imaginary part from complex array.
af_add
AFAPI af_err af_add(af_array *out, const af_array lhs, const af_array rhs, const bool batch)
C Interface for adding arrays.
af::erfc
AFAPI array erfc(const array &in)
C++ Interface for complementary error function value.
af_and
AFAPI af_err af_and(af_array *out, const af_array lhs, const af_array rhs, const bool batch)
C Interface for performing logical and on two arrays.
af_pow
AFAPI af_err af_pow(af_array *out, const af_array lhs, const af_array rhs, const bool batch)
C Interface for power.
af::acos
AFAPI array acos(const array &in)
C++ Interface for arc cos (cos inverse)
af_clamp
AFAPI af_err af_clamp(af_array *out, const af_array in, const af_array lo, const af_array hi, const bool batch)
C Interface for max of two arrays.
af_asinh
AFAPI af_err af_asinh(af_array *out, const af_array in)
C Interface for asinh.
af_expm1
AFAPI af_err af_expm1(af_array *out, const af_array in)
C Interface for exponential of an array minus 1.
af::erf
AFAPI array erf(const array &in)
C++ Interface for error function value.
af_le
AFAPI af_err af_le(af_array *out, const af_array lhs, const af_array rhs, const bool batch)
C Interface for checking if an array is less or equal to another.
af_sigmoid
AFAPI af_err af_sigmoid(af_array *out, const af_array in)
C Interface for calculating sigmoid function of an array.
af_mul
AFAPI af_err af_mul(af_array *out, const af_array lhs, const af_array rhs, const bool batch)
C Interface for multiplying two arrays.
af::log10
AFAPI array log10(const array &in)
C++ Interface for logarithm base 10.
af_bitxor
AFAPI af_err af_bitxor(af_array *out, const af_array lhs, const af_array rhs, const bool batch)
C Interface for performing bitwise xor on two arrays.
af_sin
AFAPI af_err af_sin(af_array *out, const af_array in)
C Interface for sin.
af_trunc
AFAPI af_err af_trunc(af_array *out, const af_array in)
C Interface for truncating an array of numbers.
af_sub
AFAPI af_err af_sub(af_array *out, const af_array lhs, const af_array rhs, const bool batch)
C Interface for subtracting an array from another.
af::trunc
AFAPI array trunc(const array &in)
C++ Interface for truncating an array of numbers.
af::log2
AFAPI array log2(const array &in)
C++ Interface for logarithm base 2.
af_arg
AFAPI af_err af_arg(af_array *out, const af_array in)
C Interface for finding the phase.
af_round
AFAPI af_err af_round(af_array *out, const af_array in)
C Interface for rounding an array of numbers.
af::asin
AFAPI array asin(const array &in)
C++ Interface for arc sin (sin inverse)
af_sinh
AFAPI af_err af_sinh(af_array *out, const af_array in)
C Interface for sinh.
af_exp
AFAPI af_err af_exp(af_array *out, const af_array in)
C Interface for exponential of an array.
af_erfc
AFAPI af_err af_erfc(af_array *out, const af_array in)
C Interface for complementary error function value.
af_log
AFAPI af_err af_log(af_array *out, const af_array in)
C Interface for natural logarithm.
af_atan2
AFAPI af_err af_atan2(af_array *out, const af_array lhs, const af_array rhs, const bool batch)
C Interface for arc tan of two inputs.
af::hypot
AFAPI array hypot(const array &lhs, const array &rhs)
C++ Interface for getting length of hypotenuse of two inputs.
af_cplx
AFAPI af_err af_cplx(af_array *out, const af_array in)
C Interface for creating complex array from real array.
af::lgamma
AFAPI array lgamma(const array &in)
C++ Interface for logarithm of absolute value of gamma function of input.
af_isinf
AFAPI af_err af_isinf(af_array *out, const af_array in)
C Interface for checking if values are infinities.
af_lt
AFAPI af_err af_lt(af_array *out, const af_array lhs, const af_array rhs, const bool batch)
C Interface for checking if an array is less than another.
af_hypot
AFAPI af_err af_hypot(af_array *out, const af_array lhs, const af_array rhs, const bool batch)
C Interface for getting length of hypotenuse of two arrays.
af_acosh
AFAPI af_err af_acosh(af_array *out, const af_array in)
C Interface for acosh.
af::floor
AFAPI array floor(const array &in)
C++ Interface for flooring an array of numbers.
af_div
AFAPI af_err af_div(af_array *out, const af_array lhs, const af_array rhs, const bool batch)
C Interface for dividing an array by another.
af::log
AFAPI array log(const array &in)
C++ Interface for natural logarithm.
af::expm1
AFAPI array expm1(const array &in)
C++ Interface for exponential of an array minus 1.
af::tan
AFAPI array tan(const array &in)
C++ Interface for tan.
af_err
af_err
Definition: defines.h:63
af_ge
AFAPI af_err af_ge(af_array *out, const af_array lhs, const af_array rhs, const bool batch)
C Interface for checking if an array is greater or equal to another.
af_sign
AFAPI af_err af_sign(af_array *out, const af_array in)
C Interface for finding the sign of the input.
af_atan
AFAPI af_err af_atan(af_array *out, const af_array in)
C Interface for arc tan.
defines.h
af_eq
AFAPI af_err af_eq(af_array *out, const af_array lhs, const af_array rhs, const bool batch)
C Interface for checking if an array is equal to another.
af_real
AFAPI af_err af_real(af_array *out, const af_array in)
C Interface for getting real part from complex array.
af_root
AFAPI af_err af_root(af_array *out, const af_array lhs, const af_array rhs, const bool batch)
C Interface for root.
af_factorial
AFAPI af_err af_factorial(af_array *out, const af_array in)
C Interface for the factorial.
af_neq
AFAPI af_err af_neq(af_array *out, const af_array lhs, const af_array rhs, const bool batch)
C Interface for checking if an array is not equal to another.
af_cosh
AFAPI af_err af_cosh(af_array *out, const af_array in)
C Interface for cosh.
af::atan2
AFAPI array atan2(const array &lhs, const array &rhs)
C++ Interface for arc tan of two arrays.
af::cbrt
AFAPI array cbrt(const array &in)
C++ Interface for cube root of input.
af_atanh
AFAPI af_err af_atanh(af_array *out, const af_array in)
C Interface for atanh.
af::atan
AFAPI array atan(const array &in)
C++ Interface for arc tan (tan inverse)
af::clamp
AFAPI array clamp(const array &in, const array &lo, const array &hi)
C++ Interface for clamping an array between two values.
af::max
AFAPI array max(const array &in, const int dim=-1)
C++ Interface for maximum values in an array.
af_log1p
AFAPI af_err af_log1p(af_array *out, const af_array in)
C Interface for logarithm of (in + 1)
af::imag
AFAPI array imag(const array &in)
C++ Interface for getting imaginary part from complex array.
af_lgamma
AFAPI af_err af_lgamma(af_array *out, const af_array in)
C Interface for the logarithm of absolute values of gamma function.
af_erf
AFAPI af_err af_erf(af_array *out, const af_array in)
C Interface for error function value.
af_asin
AFAPI af_err af_asin(af_array *out, const af_array in)
C Interface for arc sin.
af::real
AFAPI array real(const array &in)
C++ Interface for getting real part from complex array.
af_pow2
AFAPI af_err af_pow2(af_array *out, const af_array in)
C Interface for power of two.
af_iszero
AFAPI af_err af_iszero(af_array *out, const af_array in)
C Interface for checking if values are zero.
af_gt
AFAPI af_err af_gt(af_array *out, const af_array lhs, const af_array rhs, const bool batch)
C Interface for checking if an array is greater than another.
AFAPI
#define AFAPI
Definition: defines.h:31
af::rem
AFAPI array rem(const array &lhs, const array &rhs)
C++ Interface for remainder when array divides array, scalar divides array or array divides scalar...
af::isNaN
AFAPI array isNaN(const array &in)
C++ Interface for checking if values are NaNs.
af::isInf
AFAPI array isInf(const array &in)
C++ Interface for checking if values are Infinities.
af::cos
AFAPI array cos(const array &in)
C++ Interface for cos.
af::abs
AFAPI array abs(const array &in)
C++ Interface for absolute value.
af::sign
AFAPI array sign(const array &in)
C++ Interface for getting the sign of input.
af::sinh
AFAPI array sinh(const array &in)
C++ Interface for sinh.
afcl::array
static af::array array(af::dim4 idims, cl_mem buf, af::dtype type, bool retain=false)
Create an af::array object from an OpenCL cl_mem buffer.
Definition: opencl.h:327
af_tan
AFAPI af_err af_tan(af_array *out, const af_array in)
C Interface for tan.
af::asinh
AFAPI array asinh(const array &in)
C++ Interface for sinh inverse.
af::exp
AFAPI array exp(const array &in)
C++ Interface for exponential of an array.
af::factorial
AFAPI array factorial(const array &in)
C++ Interface for factorial of input.
af::cosh
AFAPI array cosh(const array &in)
C++ Interface for cosh.
af_acos
AFAPI af_err af_acos(af_array *out, const af_array in)
C Interface for arc cos.
af_minof
AFAPI af_err af_minof(af_array *out, const af_array lhs, const af_array rhs, const bool batch)
C Interface for min of two arrays.
af_conjg
AFAPI af_err af_conjg(af_array *out, const af_array in)
C Interface for getting the complex conjugate of input array.
af::sqrt
AFAPI array sqrt(const array &in)
C++ Interface for square root of input.
af_bitor
AFAPI af_err af_bitor(af_array *out, const af_array lhs, const af_array rhs, const bool batch)
C Interface for performing bitwise or on two arrays.
af_tgamma
AFAPI af_err af_tgamma(af_array *out, const af_array in)
C Interface for the gamma function.
af_cbrt
AFAPI af_err af_cbrt(af_array *out, const af_array in)
C Interface for cube root.
af_array
void * af_array
Definition: defines.h:222
af_maxof
AFAPI af_err af_maxof(af_array *out, const af_array lhs, const af_array rhs, const bool batch)
C Interface for max of two arrays.
af_cos
AFAPI af_err af_cos(af_array *out, const af_array in)
C Interface for cos.
af::min
AFAPI array min(const array &in, const int dim=-1)
C++ Interface for minimum values in an array.
af::acosh
AFAPI array acosh(const array &in)
C++ Interface for cosh inverse.
af::atanh
AFAPI array atanh(const array &in)
C++ Interface for tanh inverse.
af_cast
AFAPI af_err af_cast(af_array *out, const af_array in, const af_dtype type)
C Interface for casting an array from one type to another.
af::tanh
AFAPI array tanh(const array &in)
C++ Interface for tanh.
af_tanh
AFAPI af_err af_tanh(af_array *out, const af_array in)
C Interface for tanh.
af::sigmoid
AFAPI array sigmoid(const array &in)
C++ Interface for calculating sigmoid function of an array.
af_abs
AFAPI af_err af_abs(af_array *out, const af_array in)
C Interface for absolute value.
af_not
AFAPI af_err af_not(af_array *out, const af_array in)
C Interface for performing logical not on input.
af_dtype
af_dtype
Definition: defines.h:195
af::ceil
AFAPI array ceil(const array &in)
C++ Interface for ceiling an array of numbers.
af::pow
AFAPI array pow(const array &lhs, const array &rhs)
C++ Interface for power.
af::sin
AFAPI array sin(const array &in)
C++ Interface for sin.
af::iszero
AFAPI array iszero(const array &in)
C++ Interface for checking if values are zero.
af_or
AFAPI af_err af_or(af_array *out, const af_array lhs, const af_array rhs, const bool batch)
C Interface for performing logical or on two arrays.