Compute \(x - n * y\) where n is quotient of \(x / y\). More...

Functions

AFAPI af_err af_mod (af_array *out, const af_array lhs, const af_array rhs, const bool batch)
 C Interface for modulus. More...
 
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. More...
 
AFAPI array mod (const array &lhs, const double rhs)
 C++ Interface for modulus when dividend and divisor are arrays or one of them is scalar. More...
 
AFAPI array mod (const double lhs, const array &rhs)
 C++ Interface for modulus when dividend and divisor are arrays or one of them is scalar. More...
 

Detailed Description

Compute \(x - n * y\) where n is quotient of \(x / y\).

Note
This function supports real inputs only. Complex inputs are not yet supported.

Function Documentation

AFAPI af_err af_mod ( af_array out,
const af_array  lhs,
const af_array  rhs,
const bool  batch 
)

C Interface for modulus.

Parameters
[out]outwill contain the output of lhs modulo rhs
[in]lhsis dividend
[in]rhsis divisor
[in]batchspecifies if operations need to be performed in batch mode
Returns
AF_SUCCESS if the execution completes properly
AFAPI array af::mod ( const array lhs,
const array rhs 
)

C++ Interface for modulus when dividend and divisor are arrays or one of them is scalar.

Parameters
[in]lhsis dividend
[in]rhsis divisor
Returns
lhs modulo rhs
AFAPI array af::mod ( const array lhs,
const double  rhs 
)

C++ Interface for modulus when dividend and divisor are arrays or one of them is scalar.

Parameters
[in]lhsis dividend
[in]rhsis divisor
Returns
lhs modulo rhs
AFAPI array af::mod ( const double  lhs,
const array rhs 
)

C++ Interface for modulus when dividend and divisor are arrays or one of them is scalar.

Parameters
[in]lhsis dividend
[in]rhsis divisor
Returns
lhs modulo rhs