Skip to content

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.

Template parameters
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

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

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.

Parameters
self Expression instance.
Returns
Common shape of the arguments.

Fully qualified name: kfr::expression_function<Fn, Args>::get_shape(const expression_function<Fn, Args...> &)

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.

Returns
Common shape of the arguments.

Fully qualified name: kfr::expression_function<Fn, Args>::get_shape()

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

variable fn

Fn fn

Callable applied to the arguments.

Fully qualified name: kfr::expression_function<Fn, Args>::fn

constructor expression_function<Fn, Args...>(expression_with_arguments<Args...>, Fn &&)

Constructs the expression from an argument holder and a callable.

Parameters
args Argument holder.
fn Callable to apply.

Fully qualified name: kfr::expression_function<Fn, Args>::expression_function<Fn, Args...>(expression_with_arguments<Args...>, Fn &&)

constructor expression_function<Fn, Args...>(Fn &&, arg<Args &&>...)

Constructs the expression from a callable and a pack of arguments.

Parameters
fn Callable to apply.
args Arguments to store.

Fully qualified name: kfr::expression_function<Fn, Args>::expression_function<Fn, Args...>(Fn &&, arg<Args &&>...)

constructor expression_function<Fn, Args...>(arg<Args &&>...)

Constructs the expression from a pack of arguments with a default-constructed callable.

Parameters
args Arguments to store.

Fully qualified name: kfr::expression_function<Fn, Args>::expression_function<Fn, Args...>(arg<Args &&>...)

function operator=(In &&)

template <input_expression In>
expression_function& operator=(In&& in)

Processes an input expression into this output expression.

Parameters
in Input expression to read from.
Returns
Reference to *this .

Fully qualified name: kfr::expression_function<Fn, Args>::operator=(In &&)

Fully qualified name: kfr::expression_function<Fn, Args>

This file was generated by cxxdox, a C++ documentation generator based on MkDocs Material and libclang.