ArrayFire: mod
Calculate the modulus. More...
Functions | |
| AFAPI af_err | af_mod (af_array *out, const af_array lhs, const af_array rhs, const bool batch) |
| C Interface to calculate the modulus. More... | |
| AFAPI array | mod (const array &lhs, const array &rhs) |
| AFAPI array | mod (const array &lhs, const double rhs) |
| AFAPI array | mod (const double lhs, const array &rhs) |
| AFAPI array | operator% (const array &lhs, const array &rhs) |
| Performs an modulo operation on two arrays or an array and a value. More... | |
| AFAPI array | operator% (const bool &lhs, const array &rhs) |
| Performs an modulo operation on two arrays or an array and a value. More... | |
| AFAPI array | operator% (const int &lhs, const array &rhs) |
| Performs an modulo operation on two arrays or an array and a value. More... | |
| AFAPI array | operator% (const unsigned &lhs, const array &rhs) |
| Performs an modulo operation on two arrays or an array and a value. More... | |
| AFAPI array | operator% (const char &lhs, const array &rhs) |
| Performs an modulo operation on two arrays or an array and a value. More... | |
| AFAPI array | operator% (const unsigned char &lhs, const array &rhs) |
| Performs an modulo operation on two arrays or an array and a value. More... | |
| AFAPI array | operator% (const long &lhs, const array &rhs) |
| Performs an modulo operation on two arrays or an array and a value. More... | |
| AFAPI array | operator% (const unsigned long &lhs, const array &rhs) |
| Performs an modulo operation on two arrays or an array and a value. More... | |
| AFAPI array | operator% (const long long &lhs, const array &rhs) |
| Performs an modulo operation on two arrays or an array and a value. More... | |
| AFAPI array | operator% (const unsigned long long &lhs, const array &rhs) |
| Performs an modulo operation on two arrays or an array and a value. More... | |
| AFAPI array | operator% (const double &lhs, const array &rhs) |
| Performs an modulo operation on two arrays or an array and a value. More... | |
| AFAPI array | operator% (const float &lhs, const array &rhs) |
| Performs an modulo operation on two arrays or an array and a value. More... | |
| AFAPI array | operator% (const cfloat &lhs, const array &rhs) |
| Performs an modulo operation on two arrays or an array and a value. More... | |
| AFAPI array | operator% (const cdouble &lhs, const array &rhs) |
| Performs an modulo operation on two arrays or an array and a value. More... | |
| AFAPI array | operator% (const array &lhs, const bool &rhs) |
| Performs an modulo operation on two arrays or an array and a value. More... | |
| AFAPI array | operator% (const array &lhs, const int &rhs) |
| Performs an modulo operation on two arrays or an array and a value. More... | |
| AFAPI array | operator% (const array &lhs, const unsigned &rhs) |
| Performs an modulo operation on two arrays or an array and a value. More... | |
| AFAPI array | operator% (const array &lhs, const char &rhs) |
| Performs an modulo operation on two arrays or an array and a value. More... | |
| AFAPI array | operator% (const array &lhs, const unsigned char &rhs) |
| Performs an modulo operation on two arrays or an array and a value. More... | |
| AFAPI array | operator% (const array &lhs, const long &rhs) |
| Performs an modulo operation on two arrays or an array and a value. More... | |
| AFAPI array | operator% (const array &lhs, const unsigned long &rhs) |
| Performs an modulo operation on two arrays or an array and a value. More... | |
| AFAPI array | operator% (const array &lhs, const long long &rhs) |
| Performs an modulo operation on two arrays or an array and a value. More... | |
| AFAPI array | operator% (const array &lhs, const unsigned long long &rhs) |
| Performs an modulo operation on two arrays or an array and a value. More... | |
| AFAPI array | operator% (const array &lhs, const double &rhs) |
| Performs an modulo operation on two arrays or an array and a value. More... | |
| AFAPI array | operator% (const array &lhs, const float &rhs) |
| Performs an modulo operation on two arrays or an array and a value. More... | |
| AFAPI array | operator% (const array &lhs, const cfloat &rhs) |
| Performs an modulo operation on two arrays or an array and a value. More... | |
| AFAPI array | operator% (const array &lhs, const cdouble &rhs) |
| AFAPI array | operator% (const short &lhs, const array &rhs) |
| Performs an modulo operation on two arrays or an array and a value. More... | |
| AFAPI array | operator% (const unsigned short &lhs, const array &rhs) |
| Performs an modulo operation on two arrays or an array and a value. More... | |
| AFAPI array | operator% (const array &lhs, const short &rhs) |
| Performs an modulo operation on two arrays or an array and a value. More... | |
| AFAPI array | operator% (const array &lhs, const unsigned short &rhs) |
| AFAPI array | operator% (const signed char &lhs, const array &rhs) |
| Performs an modulo operation on two arrays or an array and a value. More... | |
| AFAPI array | operator% (const array &lhs, const signed char &rhs) |
| Performs an modulo operation on two arrays or an array and a value. More... | |
Calculate the modulus.
- Note
- This function only supports real inputs; complex inputs are not yet supported.
◆ af_mod()
C Interface to calculate the modulus.
For integers, it returns the same output as modulus (% operator) For floating point numbers, it returns the same as fmod from <math.h>
- Parameters
-
[out] out modulus [in] lhs dividend [in] rhs divisor [in] batch batch mode
- Returns
- AF_SUCCESS, if function returns successfully, else an af_err code is given
◆ mod() [1/3]
C++ Interface to calculate the modulus.
For integers, it returns the same output as modulus (% operator) For floating point numbers, it returns the same as std::fmod from <cmath>
- Parameters
-
[in] lhs dividend; can be an array or a scalar [in] rhs divisor; can be an array or a scalar
- Returns
- modulus
◆ mod() [2/3]
C++ Interface to calculate the modulus.
For integers, it returns the same output as modulus (% operator) For floating point numbers, it returns the same as std::fmod from <cmath>
- Parameters
-
[in] lhs dividend; can be an array or a scalar [in] rhs divisor; can be an array or a scalar
- Returns
- modulus
◆ mod() [3/3]
C++ Interface to calculate the modulus.
For integers, it returns the same output as modulus (% operator) For floating point numbers, it returns the same as std::fmod from <cmath>
- Parameters
-
[in] lhs dividend; can be an array or a scalar [in] rhs divisor; can be an array or a scalar
- Returns
- modulus
◆ operator%() [1/33]
Performs an modulo operation on two arrays or an array and a value.
- Parameters
-
[in] lhs the left hand side value of the operand [in] rhs the right hand side value of the operand
- Returns
- an array with a modulo operation performed on each element of
lhsandrhs
◆ operator%() [2/33]
Performs an modulo operation on two arrays or an array and a value.
- Parameters
-
[in] lhs the left hand side value of the operand [in] rhs the right hand side value of the operand
- Returns
- an array with a modulo operation performed on each element of
lhsandrhs
◆ operator%() [3/33]
◆ operator%() [4/33]
Performs an modulo operation on two arrays or an array and a value.
- Parameters
-
[in] lhs the left hand side value of the operand [in] rhs the right hand side value of the operand
- Returns
- an array with a modulo operation performed on each element of
lhsandrhs
◆ operator%() [5/33]
Performs an modulo operation on two arrays or an array and a value.
- Parameters
-
[in] lhs the left hand side value of the operand [in] rhs the right hand side value of the operand
- Returns
- an array with a modulo operation performed on each element of
lhsandrhs
◆ operator%() [6/33]
Performs an modulo operation on two arrays or an array and a value.
- Parameters
-
[in] lhs the left hand side value of the operand [in] rhs the right hand side value of the operand
- Returns
- an array with a modulo operation performed on each element of
lhsandrhs
◆ operator%() [7/33]
Performs an modulo operation on two arrays or an array and a value.
- Parameters
-
[in] lhs the left hand side value of the operand [in] rhs the right hand side value of the operand
- Returns
- an array with a modulo operation performed on each element of
lhsandrhs
◆ operator%() [8/33]
Performs an modulo operation on two arrays or an array and a value.
- Parameters
-
[in] lhs the left hand side value of the operand [in] rhs the right hand side value of the operand
- Returns
- an array with a modulo operation performed on each element of
lhsandrhs
◆ operator%() [9/33]
Performs an modulo operation on two arrays or an array and a value.
- Parameters
-
[in] lhs the left hand side value of the operand [in] rhs the right hand side value of the operand
- Returns
- an array with a modulo operation performed on each element of
lhsandrhs
◆ operator%() [10/33]
Performs an modulo operation on two arrays or an array and a value.
- Parameters
-
[in] lhs the left hand side value of the operand [in] rhs the right hand side value of the operand
- Returns
- an array with a modulo operation performed on each element of
lhsandrhs
◆ operator%() [11/33]
Performs an modulo operation on two arrays or an array and a value.
- Parameters
-
[in] lhs the left hand side value of the operand [in] rhs the right hand side value of the operand
- Returns
- an array with a modulo operation performed on each element of
lhsandrhs
◆ operator%() [12/33]
Performs an modulo operation on two arrays or an array and a value.
- Parameters
-
[in] lhs the left hand side value of the operand [in] rhs the right hand side value of the operand
- Returns
- an array with a modulo operation performed on each element of
lhsandrhs
◆ operator%() [13/33]
Performs an modulo operation on two arrays or an array and a value.
- Parameters
-
[in] lhs the left hand side value of the operand [in] rhs the right hand side value of the operand
- Returns
- an array with a modulo operation performed on each element of
lhsandrhs
◆ operator%() [14/33]
Performs an modulo operation on two arrays or an array and a value.
- Parameters
-
[in] lhs the left hand side value of the operand [in] rhs the right hand side value of the operand
- Returns
- an array with a modulo operation performed on each element of
lhsandrhs
◆ operator%() [15/33]
Performs an modulo operation on two arrays or an array and a value.
- Parameters
-
[in] lhs the left hand side value of the operand [in] rhs the right hand side value of the operand
- Returns
- an array with a modulo operation performed on each element of
lhsandrhs
◆ operator%() [16/33]
Performs an modulo operation on two arrays or an array and a value.
- Parameters
-
[in] lhs the left hand side value of the operand [in] rhs the right hand side value of the operand
- Returns
- an array with a modulo operation performed on each element of
lhsandrhs
◆ operator%() [17/33]
◆ operator%() [18/33]
Performs an modulo operation on two arrays or an array and a value.
- Parameters
-
[in] lhs the left hand side value of the operand [in] rhs the right hand side value of the operand
- Returns
- an array with a modulo operation performed on each element of
lhsandrhs
◆ operator%() [19/33]
Performs an modulo operation on two arrays or an array and a value.
- Parameters
-
[in] lhs the left hand side value of the operand [in] rhs the right hand side value of the operand
- Returns
- an array with a modulo operation performed on each element of
lhsandrhs
◆ operator%() [20/33]
Performs an modulo operation on two arrays or an array and a value.
- Parameters
-
[in] lhs the left hand side value of the operand [in] rhs the right hand side value of the operand
- Returns
- an array with a modulo operation performed on each element of
lhsandrhs
◆ operator%() [21/33]
Performs an modulo operation on two arrays or an array and a value.
- Parameters
-
[in] lhs the left hand side value of the operand [in] rhs the right hand side value of the operand
- Returns
- an array with a modulo operation performed on each element of
lhsandrhs
◆ operator%() [22/33]
Performs an modulo operation on two arrays or an array and a value.
- Parameters
-
[in] lhs the left hand side value of the operand [in] rhs the right hand side value of the operand
- Returns
- an array with a modulo operation performed on each element of
lhsandrhs
◆ operator%() [23/33]
Performs an modulo operation on two arrays or an array and a value.
- Parameters
-
[in] lhs the left hand side value of the operand [in] rhs the right hand side value of the operand
- Returns
- an array with a modulo operation performed on each element of
lhsandrhs
◆ operator%() [24/33]
Performs an modulo operation on two arrays or an array and a value.
- Parameters
-
[in] lhs the left hand side value of the operand [in] rhs the right hand side value of the operand
- Returns
- an array with a modulo operation performed on each element of
lhsandrhs
◆ operator%() [25/33]
Performs an modulo operation on two arrays or an array and a value.
- Parameters
-
[in] lhs the left hand side value of the operand [in] rhs the right hand side value of the operand
- Returns
- an array with a modulo operation performed on each element of
lhsandrhs
◆ operator%() [26/33]
Performs an modulo operation on two arrays or an array and a value.
- Parameters
-
[in] lhs the left hand side value of the operand [in] rhs the right hand side value of the operand
- Returns
- an array with a modulo operation performed on each element of
lhsandrhs
◆ operator%() [27/33]
Performs an modulo operation on two arrays or an array and a value.
- Parameters
-
[in] lhs the left hand side value of the operand [in] rhs the right hand side value of the operand
- Returns
- an array with a modulo operation performed on each element of
lhsandrhs
◆ operator%() [28/33]
Performs an modulo operation on two arrays or an array and a value.
- Parameters
-
[in] lhs the left hand side value of the operand [in] rhs the right hand side value of the operand
- Returns
- an array with a modulo operation performed on each element of
lhsandrhs
◆ operator%() [29/33]
Performs an modulo operation on two arrays or an array and a value.
- Parameters
-
[in] lhs the left hand side value of the operand [in] rhs the right hand side value of the operand
- Returns
- an array with a modulo operation performed on each element of
lhsandrhs
◆ operator%() [30/33]
Performs an modulo operation on two arrays or an array and a value.
- Parameters
-
[in] lhs the left hand side value of the operand [in] rhs the right hand side value of the operand
- Returns
- an array with a modulo operation performed on each element of
lhsandrhs
◆ operator%() [31/33]
Performs an modulo operation on two arrays or an array and a value.
- Parameters
-
[in] lhs the left hand side value of the operand [in] rhs the right hand side value of the operand
- Returns
- an array with a modulo operation performed on each element of
lhsandrhs
◆ operator%() [32/33]
Performs an modulo operation on two arrays or an array and a value.
- Parameters
-
[in] lhs the left hand side value of the operand [in] rhs the right hand side value of the operand
- Returns
- an array with a modulo operation performed on each element of
lhsandrhs
◆ operator%() [33/33]
Performs an modulo operation on two arrays or an array and a value.
- Parameters
-
[in] lhs the left hand side value of the operand [in] rhs the right hand side value of the operand
- Returns
- an array with a modulo operation performed on each element of
lhsandrhs