Skip to content
Prev Previous commit
Next Next commit
Merge branch 'master' into half_mod
  • Loading branch information
christophe-murphy authored Mar 7, 2025
commit 37e2982bc8f1afad2b0c0080f412b5086d225b89
38 changes: 22 additions & 16 deletions include/af/arith.h
Original file line number Diff line number Diff line change
Expand Up @@ -107,9 +107,11 @@ namespace af
/// For integers, it returns the same output as modulus (% operator)
/// For floating point numbers, it returns the same as std::remainder from <cmath>
///
/// \param[in] lhs is numerator
/// \param[in] rhs is denominator
/// \return remainder when \p rhs divides \p lhs
/// \param[in] lhs numerator; can be an array or a scalar
/// \param[in] rhs denominator; can be an array or a scalar
/// \return remainder
///
/// \ingroup arith_func_rem
AFAPI array rem (const array &lhs, const array &rhs);

/// \copydoc rem(const array&, const array&)
Expand All @@ -125,9 +127,11 @@ namespace af
/// For integers, it returns the same output as modulus (% operator)
/// For floating point numbers, it returns the same as std::fmod from <cmath>
///
/// \param[in] lhs is dividend
/// \param[in] rhs is divisor
/// \return \p lhs modulo \p rhs
/// \param[in] lhs dividend; can be an array or a scalar
/// \param[in] rhs divisor; can be an array or a scalar
/// \return modulus
///
/// \ingroup arith_func_mod
AFAPI array mod (const array &lhs, const array &rhs);

/// \copydoc mod(const array&, const array&)
Expand Down Expand Up @@ -989,11 +993,12 @@ extern "C" {
For integers, it returns the same output as modulus (% operator)
For floating point numbers, it returns the same as `remainder` from <math.h>

\param[out] out will contain the remainder of \p lhs divided by \p rhs
\param[in] lhs is numerator
\param[in] rhs is denominator
\param[in] batch specifies if operations need to be performed in batch mode
\return \ref AF_SUCCESS if the execution completes properly
\param[out] out remainder
\param[in] lhs numerator
\param[in] rhs denominator
\param[in] batch batch mode
\return \ref AF_SUCCESS, if function returns successfully, else
an \ref af_err code is given

\ingroup arith_func_rem
*/
Expand All @@ -1005,11 +1010,12 @@ extern "C" {
For integers, it returns the same output as modulus (% operator)
For floating point numbers, it returns the same as `fmod` from <math.h>

\param[out] out will contain the output of \p lhs modulo \p rhs
\param[in] lhs is dividend
\param[in] rhs is divisor
\param[in] batch specifies if operations need to be performed in batch mode
\return \ref AF_SUCCESS if the execution completes properly
\param[out] out modulus
\param[in] lhs dividend
\param[in] rhs divisor
\param[in] batch batch mode
\return \ref AF_SUCCESS, if function returns successfully, else
an \ref af_err code is given

\ingroup arith_func_mod
*/
Expand Down
You are viewing a condensed version of this merge commit. You can view the full changes here.