64template<Functional Functor, Expression Argument>
234template<Expression Operand>
235constexpr auto log(Operand&& operand) {
246template<Expression Operand>
247constexpr auto exp(Operand&& operand) {
259template<Expression Operand>
260constexpr auto sqrt(Operand&& operand) {
272template<Expression Operand>
273constexpr auto rsqrt(Operand&& operand,
float epsilon = 0.0f) {
284template<Expression Operand>
285constexpr auto abs(Operand&& operand) {
296template<Expression Operand>
297constexpr auto sin(Operand&& operand) {
308template<Expression Operand>
309constexpr auto cos(Operand&& operand) {
321template<Expression Operand>
322constexpr auto tan(Operand&& operand) {
333template<Expression Operand>
334constexpr auto sinh(Operand&& operand) {
345template<Expression Operand>
346constexpr auto cosh(Operand&& operand) {
357template<Expression Operand>
358constexpr auto tanh(Operand&& operand) {
Represents the shape (dimensions) of an tensor-like expression.
Definition: shape.hpp:79
Represents the memory strides associated with a tensor shape.
Definition: strides.hpp:87
A multidimensional, strided tensor data structure.
Definition: tensor.hpp:99
Expression template for mathematical function operations.
Definition: functions.hpp:65
constexpr Shape const & shape() const
Returns the shape of the result.
Definition: functions.hpp:100
constexpr Function(Functor functor, typename Trait< Argument >::Reference argument)
Constructs a Function expression.
Definition: functions.hpp:75
Tensor forward() const
Definition: functions.hpp:127
constexpr type dtype() const
Returns the data type of the result.
Definition: functions.hpp:89
Trait< Argument >::Reference argument
Definition: functions.hpp:68
Functor functor
Definition: functions.hpp:67
auto offset() const
Returns the offset of the result.
Definition: functions.hpp:123
constexpr Strides const & strides() const
Returns the strides of the result.
Definition: functions.hpp:112
Definition: functions.hpp:53
constexpr auto exp(Operand &&operand)
Creates a lazy-evaluated exponential function expression.
Definition: functions.hpp:247
constexpr auto tanh(Operand &&operand)
Creates a lazy-evaluated hyperbolic tangent expression.
Definition: functions.hpp:358
constexpr auto cos(Operand &&operand)
Creates a lazy-evaluated cosine function expression.
Definition: functions.hpp:309
constexpr auto sqrt(Operand &&operand)
Creates a lazy-evaluated square root expression.
Definition: functions.hpp:260
constexpr auto tan(Operand &&operand)
Creates a lazy-evaluated tangent function expression.
Definition: functions.hpp:322
constexpr auto sin(Operand &&operand)
Creates a lazy-evaluated sine function expression.
Definition: functions.hpp:297
constexpr auto cosh(Operand &&operand)
Creates a lazy-evaluated hyperbolic cosine expression.
Definition: functions.hpp:346
constexpr auto log(Operand &&operand)
Creates a lazy-evaluated natural logarithm expression.
Definition: functions.hpp:235
constexpr auto abs(Operand &&operand)
Creates a lazy-evaluated absolute value expression.
Definition: functions.hpp:285
constexpr auto rsqrt(Operand &&operand, float epsilon=0.0f)
Creates a lazy-evaluated inverse square root expression.
Definition: functions.hpp:273
constexpr auto sinh(Operand &&operand)
Creates a lazy-evaluated hyperbolic sine expression.
Definition: functions.hpp:334
Definition: buffer.hpp:41
std::decay_t< T > Reference
Definition: traits.hpp:28
Functor absolute value (|x|) Applies element-wise absolute value to tensor elements.
Definition: functions.hpp:174
void operator()(Tensor const &, Tensor &) const
Functor cosine Applies element-wise cosine to tensor elements (radians)
Definition: functions.hpp:190
void operator()(Tensor const &, Tensor &) const
Functor hyperbolic cosine Applies element-wise hyperbolic cosine to tensor elements.
Definition: functions.hpp:214
void operator()(Tensor const &, Tensor &) const
Functor exponential (e^x) Applies element-wise exponential to tensor elements.
Definition: functions.hpp:148
void operator()(Tensor const &, Tensor &) const
Functor natural logarithm (ln(x)) Applies element-wise natural logarithm to tensor elements.
Definition: functions.hpp:140
void operator()(Tensor const &, Tensor &) const
Functor inverse square root (1/√x) Applies element-wise inverse square root to tensor elements.
Definition: functions.hpp:164
void operator()(Tensor const &, Tensor &) const
float epsilon
Definition: functions.hpp:165
Functor sine Applies element-wise sine to tensor elements (radians)
Definition: functions.hpp:182
void operator()(Tensor const &, Tensor &) const
Functor hyperbolic sine Applies element-wise hyperbolic sine to tensor elements.
Definition: functions.hpp:206
void operator()(Tensor const &, Tensor &) const
Functor square root (√x) Applies element-wise square root to tensor elements.
Definition: functions.hpp:156
void operator()(Tensor const &, Tensor &) const
Functor tangent Applies element-wise tangent to tensor elements (radians)
Definition: functions.hpp:198
void operator()(Tensor const &, Tensor &) const
Functor hyperbolic tangent Applies element-wise hyperbolic tangent to tensor elements.
Definition: functions.hpp:222
void operator()(Tensor const &, Tensor &) const