Skip to content

Class expression_with_arguments

class expression_with_arguments<Args> base

template <typename... Args>
struct expression_with_arguments { … }

Holds the arguments of an expression along with their dimension masks.

Stores a tuple of arguments and an array of masks used to adapt indices when the arguments have different dimensionalities. Provides helpers to access the first argument, query per-argument masks, and fold a callable over all arguments.

Template parameters
Args Argument types stored by the expression.

variable count

constexpr static size_t count = sizeof...(Args)

Number of arguments held by the expression.

Fully qualified name: kfr::expression_with_arguments<Args>::count

typedef type_list

using type_list = ctypes_t<Args...>

Fully qualified name: kfr::expression_with_arguments<Args>::type_list

typedef nth

using nth = typename type_list::template nth<idx>

Alias for the type of the argument at position

idx.

Fully qualified name: kfr::expression_with_arguments<Args>::nth

typedef first_arg

using first_arg = typename type_list::template nth<0>

Alias for the type of the first argument.

Fully qualified name: kfr::expression_with_arguments<Args>::first_arg

typedef nth_trait

using nth_trait = expression_traits<typename type_list::template nth<idx>>

Alias for the traits of the argument at position

idx.

Fully qualified name: kfr::expression_with_arguments<Args>::nth_trait

typedef first_arg_traits

using first_arg_traits = expression_traits<first_arg>

Traits of the first argument.

Fully qualified name: kfr::expression_with_arguments<Args>::first_arg_traits

variable args

std::tuple<Args...> args

Tuple holding all arguments.

Fully qualified name: kfr::expression_with_arguments<Args>::args

variable masks

std::array<dimset, count> masks

Per-argument dimension masks computed from each argument's shape.

Fully qualified name: kfr::expression_with_arguments<Args>::masks

function first()

Returns a reference to the first argument.

Returns
Reference to the first stored argument.

Fully qualified name: kfr::expression_with_arguments<Args>::first()

function first()

Returns a const reference to the first argument.

Returns
Const reference to the first stored argument.

Fully qualified name: kfr::expression_with_arguments<Args>::first()

function getmask(csize_t<idx>)

template <size_t idx>
KFR_INTRINSIC dimset getmask(csize_t<idx> = { … }

Returns the dimension mask for the argument at position idx.

Parameters
idx Compile-time index of the argument.
Returns
Dimension mask for the requested argument.

Fully qualified name: kfr::expression_with_arguments<Args>::getmask(csize_t<idx>)

function fold(Fn &&)

template <typename Fn>
KFR_INTRINSIC constexpr auto fold(Fn&& fn) const { … }

Folds a callable over the stored arguments, passing them by value.

Parameters
fn Callable invoked as fn(args...) .
Returns
Result of fn(args...) .

Fully qualified name: kfr::expression_with_arguments<Args>::fold(Fn &&)

function fold_idx(Fn &&)

template <typename Fn>
KFR_INTRINSIC constexpr static auto fold_idx(Fn&& fn) { … }

Folds a callable over compile-time indices of the arguments.

Parameters
fn Callable invoked as fn(csize<0>, csize<1>, ...) .
Returns
Result of the fold.

Fully qualified name: kfr::expression_with_arguments<Args>::fold_idx(Fn &&)

constructor expression_with_arguments<Args...>(arg<Args &&>...)

Constructs the expression from a pack of arguments.

Numeric/boolean arguments are decayed before being stored. The per-argument masks are computed from each argument's shape at construction time.

Parameters
args Arguments to store.

Fully qualified name: kfr::expression_with_arguments<Args>::expression_with_arguments<Args...>(arg<Args &&>...)

Fully qualified name: kfr::expression_with_arguments<Args>

Class expression_with_arguments

class expression_with_arguments<Arg> base

template <typename Arg>
struct expression_with_arguments<Arg> { … }

Single-argument specialization of expression_with_arguments .

Template parameters
Arg Argument type.

variable count

constexpr static size_t count = 1

Number of arguments held by the expression (always 1).

Fully qualified name: kfr::expression_with_arguments<Arg>::count

typedef type_list

using type_list = ctypes_t<Arg>

Fully qualified name: kfr::expression_with_arguments<Arg>::type_list

typedef nth

using nth = Arg

Alias for the argument type (any index).

Fully qualified name: kfr::expression_with_arguments<Arg>::nth

typedef first_arg

using first_arg = Arg

Alias for the argument type.

Fully qualified name: kfr::expression_with_arguments<Arg>::first_arg

typedef nth_trait

using nth_trait = expression_traits<Arg>

Alias for the traits of the argument.

Fully qualified name: kfr::expression_with_arguments<Arg>::nth_trait

typedef first_arg_traits

using first_arg_traits = expression_traits<first_arg>

Traits of the argument.

Fully qualified name: kfr::expression_with_arguments<Arg>::first_arg_traits

variable args

std::tuple<Arg> args

Tuple holding the single argument.

Fully qualified name: kfr::expression_with_arguments<Arg>::args

function first()

Returns a reference to the stored argument.

Returns
Reference to the stored argument.

Fully qualified name: kfr::expression_with_arguments<Arg>::first()

function first()

Returns a const reference to the stored argument.

Returns
Const reference to the stored argument.

Fully qualified name: kfr::expression_with_arguments<Arg>::first()

function getmask(csize_t<idx>)

template <size_t idx>
KFR_MEM_INTRINSIC dimset getmask(csize_t<idx> = { … }

Returns the sentinel dimension mask for the single argument.

Parameters
idx Compile-time index (ignored).
Returns
Sentinel mask of -1 .

Fully qualified name: kfr::expression_with_arguments<Arg>::getmask(csize_t<idx>)

function fold(Fn &&)

template <typename Fn>
KFR_MEM_INTRINSIC constexpr auto fold(Fn&& fn) const { … }

Folds a callable over the stored argument.

Parameters
fn Callable invoked as fn(arg) .
Returns
Result of fn(arg) .

Fully qualified name: kfr::expression_with_arguments<Arg>::fold(Fn &&)

function fold_idx(Fn &&)

template <typename Fn>
KFR_INTRINSIC constexpr static auto fold_idx(Fn&& fn) { … }

Folds a callable over the compile-time index of the argument.

Parameters
fn Callable invoked as fn(csize<0>) .
Returns
Result of the fold.

Fully qualified name: kfr::expression_with_arguments<Arg>::fold_idx(Fn &&)

constructor expression_with_arguments<Arg>(Arg &&)

Constructs the expression from a single argument.

Parameters
arg Argument to store.

Fully qualified name: kfr::expression_with_arguments<Arg>::expression_with_arguments<Arg>(Arg &&)

Fully qualified name: kfr::expression_with_arguments<Arg>

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