Mercurial > octave
diff liboctave/operators/mx-inlines.cc @ 30898:51a3d3a69193
maint: Use "fcn" as preferred abbreviation for "function" in liboctave/.
* DAEFunc.h, DASPK.cc, DASSL.cc, LSODE.cc, ODEFunc.h, eigs-base.cc,
eigs-base.h, oct-norm.cc, mx-inlines.cc:
Replace "func", "fun" in documentation and variable names with "fcn".
author | Rik <rik@octave.org> |
---|---|
date | Tue, 05 Apr 2022 13:20:48 -0700 |
parents | 796f54d4ddbf |
children | 5cc53fd090c3 |
line wrap: on
line diff
--- a/liboctave/operators/mx-inlines.cc Tue Apr 05 08:55:38 2022 -0700 +++ b/liboctave/operators/mx-inlines.cc Tue Apr 05 13:20:48 2022 -0700 @@ -441,18 +441,18 @@ // Arbitrary function appliers. // The function is a template parameter to enable inlining. -template <typename R, typename X, R fun (X x)> +template <typename R, typename X, R fcn (X x)> inline void mx_inline_map (std::size_t n, R *r, const X *x) { for (std::size_t i = 0; i < n; i++) - r[i] = fun (x[i]); + r[i] = fcn (x[i]); } -template <typename R, typename X, R fun (const X& x)> +template <typename R, typename X, R fcn (const X& x)> inline void mx_inline_map (std::size_t n, R *r, const X *x) { for (std::size_t i = 0; i < n; i++) - r[i] = fun (x[i]); + r[i] = fcn (x[i]); } // Appliers. Since these call the operation just once, we pass it as @@ -470,18 +470,18 @@ // Shortcuts for applying mx_inline_map. -template <typename R, typename X, R fun (X)> +template <typename R, typename X, R fcn (X)> inline Array<R> do_mx_unary_map (const Array<X>& x) { - return do_mx_unary_op<R, X> (x, mx_inline_map<R, X, fun>); + return do_mx_unary_op<R, X> (x, mx_inline_map<R, X, fcn>); } -template <typename R, typename X, R fun (const X&)> +template <typename R, typename X, R fcn (const X&)> inline Array<R> do_mx_unary_map (const Array<X>& x) { - return do_mx_unary_op<R, X> (x, mx_inline_map<R, X, fun>); + return do_mx_unary_op<R, X> (x, mx_inline_map<R, X, fcn>); } template <typename R>