21 [[no_unique_address]] Value
value;
33 template <
class Value>
44 template <
class Value>
55 template <
class Value>
57 ->
decltype(Value{1} /
value)
59 return Value{1} /
value;
67template <
class Factor>
struct scale
71 template <
class Value>
89 template <
class Output,
class Input>
91 noexcept(
noexcept(output +
factor * input)) ->
decltype(output +
factor * input)
93 return output +
factor * input;
103 template <
class Left,
class Right>
105 noexcept(
noexcept(left + right)) ->
decltype(left + right)
114 template <
class Left,
class Right>
116 noexcept(
noexcept(left - right)) ->
decltype(left - right)
125 template <
class Left,
class Right>
127 noexcept(
noexcept(left * right)) ->
decltype(left * right)
136 template <
class Left,
class Right>
138 noexcept(
noexcept(left / right)) ->
decltype(left / right)
Project compiler annotations shared by host and device code.
#define UNI20_HOST_DEVICE
Definition compiler_attributes.hpp:12
locale_t value
Definition data_table.cpp:49
Definition linalg/async.hpp:28
Add one retained scalar multiple to an existing element value.
Definition elementwise_functions.hpp:86
Factor factor
Definition elementwise_functions.hpp:87
UNI20_HOST_DEVICE constexpr auto operator()(Output output, Input input) const noexcept(noexcept(output+factor *input)) -> decltype(output+factor *input)
Definition elementwise_functions.hpp:90
Return the sum of two element values.
Definition elementwise_functions.hpp:102
UNI20_HOST_DEVICE constexpr auto operator()(Left left, Right right) const noexcept(noexcept(left+right)) -> decltype(left+right)
Definition elementwise_functions.hpp:104
Nullary elementwise function that returns one retained value.
Definition elementwise_functions.hpp:20
UNI20_HOST_DEVICE constexpr auto operator()() const -> Value
Definition elementwise_functions.hpp:23
Value value
Definition elementwise_functions.hpp:21
Return the quotient of two element values.
Definition elementwise_functions.hpp:135
UNI20_HOST_DEVICE constexpr auto operator()(Left left, Right right) const noexcept(noexcept(left/right)) -> decltype(left/right)
Definition elementwise_functions.hpp:137
Return the product of two element values.
Definition elementwise_functions.hpp:124
UNI20_HOST_DEVICE constexpr auto operator()(Left left, Right right) const noexcept(noexcept(left *right)) -> decltype(left *right)
Definition elementwise_functions.hpp:126
Return the additive inverse of one element value.
Definition elementwise_functions.hpp:32
UNI20_HOST_DEVICE constexpr auto operator()(Value value) const noexcept(noexcept(-value)) -> decltype(-value)
Definition elementwise_functions.hpp:34
Return the multiplicative inverse of one element value.
Definition elementwise_functions.hpp:54
UNI20_HOST_DEVICE constexpr auto operator()(Value value) const noexcept(noexcept(Value{1}/value)) -> decltype(Value{1}/value)
Definition elementwise_functions.hpp:56
Multiply one element value by a retained scalar factor.
Definition elementwise_functions.hpp:68
Factor factor
Definition elementwise_functions.hpp:69
UNI20_HOST_DEVICE constexpr auto operator()(Value value) const noexcept(noexcept(factor *value)) -> decltype(factor *value)
Definition elementwise_functions.hpp:72
Return the product of one element value with itself.
Definition elementwise_functions.hpp:43
UNI20_HOST_DEVICE constexpr auto operator()(Value value) const noexcept(noexcept(value *value)) -> decltype(value *value)
Definition elementwise_functions.hpp:45
Return the difference of two element values.
Definition elementwise_functions.hpp:113
UNI20_HOST_DEVICE constexpr auto operator()(Left left, Right right) const noexcept(noexcept(left - right)) -> decltype(left - right)
Definition elementwise_functions.hpp:115