MLX
 
Loading...
Searching...
No Matches
unary_ops.h File Reference
#include <stdint.h>
#include <cmath>
#include <complex>
#include "mlx/backend/cpu/simd/simd.h"

Go to the source code of this file.

Classes

struct  mlx::core::detail::Abs
 
struct  mlx::core::detail::ArcCos
 
struct  mlx::core::detail::ArcCosh
 
struct  mlx::core::detail::ArcSin
 
struct  mlx::core::detail::ArcSinh
 
struct  mlx::core::detail::ArcTan
 
struct  mlx::core::detail::ArcTanh
 
struct  mlx::core::detail::BitwiseInvert
 
struct  mlx::core::detail::Ceil
 
struct  mlx::core::detail::Conjugate
 
struct  mlx::core::detail::Cos
 
struct  mlx::core::detail::Cosh
 
struct  mlx::core::detail::Erf
 
struct  mlx::core::detail::ErfInv
 
struct  mlx::core::detail::Exp
 
struct  mlx::core::detail::Expm1
 
struct  mlx::core::detail::Floor
 
struct  mlx::core::detail::Log
 
struct  mlx::core::detail::Log2
 
struct  mlx::core::detail::Log10
 
struct  mlx::core::detail::Log1p
 
struct  mlx::core::detail::LogicalNot
 
struct  mlx::core::detail::Negative
 
struct  mlx::core::detail::Round
 
struct  mlx::core::detail::Sin
 
struct  mlx::core::detail::Sinh
 
struct  mlx::core::detail::Sqrt
 
struct  mlx::core::detail::Rsqrt
 
struct  mlx::core::detail::Tan
 
struct  mlx::core::detail::Tanh
 
struct  mlx::core::detail::Imag
 
struct  mlx::core::detail::Real
 
struct  mlx::core::detail::Sigmoid
 
struct  mlx::core::detail::Sign
 
struct  mlx::core::detail::Square
 

Namespaces

namespace  mlx
 
namespace  mlx::core
 
namespace  mlx::core::detail
 

Macros

#define SINGLE()
 
#define DEFAULT_OP(Op, op)
 

Macro Definition Documentation

◆ DEFAULT_OP

#define DEFAULT_OP ( Op,
op )
Value:
struct Op { \
template <int N, typename T> \
Simd<T, N> operator()(Simd<T, N> x) { \
return simd::op(x); \
} \
SINGLE() \
};

◆ SINGLE

#define SINGLE ( )
Value:
template <typename T> \
T operator()(T x) { \
return (*this)(Simd<T, 1>(x)).value; \
}