Class expression_function¶
class expression_function<Fn, Args> base¶
template <typename Fn, typename... Args>
struct expression_function : expression_with_arguments<Args...>, expression_traits_defaults { … } Expression that applies a callable to its arguments.
| Fn | Callable type. |
| Args | Argument types. |
typedef value_type ¶
using value_type =
typename std::invoke_result_t<Fn,
vec<typename expression_traits<Args>::value_type, 1>...>::value_type Value type produced by the expression.
Fully qualified name: kfr::expression_function<Fn, Args>::value_type
Declared at base/expression.hpp:749
variable dims ¶
constexpr static size_t dims = std::max({ expression_traits<Args>::dims... }) Number of dimensions of the expression.
Fully qualified name: kfr::expression_function<Fn, Args>::dims
Declared at base/expression.hpp:753
function get_shape(const expression_function<Fn, Args...> &) ¶
constexpr static shape<dims> get_shape(const expression_function& self) { … } Returns the shape of the expression instance.
Computes the common shape of all arguments at runtime.
| self | Expression instance. |
| Common shape of the arguments. |
Fully qualified name: kfr::expression_function<Fn, Args>::get_shape(const expression_function<Fn, Args...> &)
Declared at base/expression.hpp:800
function get_shape() ¶
constexpr static shape<dims> get_shape() { … } Returns the static shape of the expression type.
Computes the common shape of all arguments at compile time.
| Common shape of the arguments. |
Fully qualified name: kfr::expression_function<Fn, Args>::get_shape()
Declared at base/expression.hpp:815
variable random_access ¶
constexpr static inline bool random_access = (expression_traits<Args>::random_access && ...) when all arguments support random access.
true
Fully qualified name: kfr::expression_function<Fn, Args>::random_access
Declared at base/expression.hpp:828
variable fn ¶
Fn fn Callable applied to the arguments.
Fully qualified name: kfr::expression_function<Fn, Args>::fn
Declared at base/expression.hpp:831
constructor expression_function<Fn, Args...>(expression_with_arguments<Args...>, Fn &&) ¶
Constructs the expression from an argument holder and a callable.
| args | Argument holder. |
| fn | Callable to apply. |
Fully qualified name: kfr::expression_function<Fn, Args>::expression_function<Fn, Args...>(expression_with_arguments<Args...>, Fn &&)
Declared at base/expression.hpp:838
constructor expression_function<Fn, Args...>(Fn &&, arg<Args &&>...) ¶
Constructs the expression from a callable and a pack of arguments.
| fn | Callable to apply. |
| args | Arguments to store. |
Fully qualified name: kfr::expression_function<Fn, Args>::expression_function<Fn, Args...>(Fn &&, arg<Args &&>...)
Declared at base/expression.hpp:847
constructor expression_function<Fn, Args...>(arg<Args &&>...) ¶
Constructs the expression from a pack of arguments with a default-constructed callable.
| args | Arguments to store. |
Fully qualified name: kfr::expression_function<Fn, Args>::expression_function<Fn, Args...>(arg<Args &&>...)
Declared at base/expression.hpp:856
function operator=(In &&) ¶
template <input_expression In>
expression_function& operator=(In&& in) Processes an input expression into this output expression.
| in | Input expression to read from. |
Reference to *this . |
Fully qualified name: kfr::expression_function<Fn, Args>::operator=(In &&)
Declared at base/expression.hpp:867
Fully qualified name: kfr::expression_function<Fn, Args>
Declared at base/expression.hpp:746