MTL5 -- Matrix Template Library C++ API
mtl:: -- C++20 header-only linear algebra for mixed-precision algorithm design
Loading...
Searching...
No Matches
math.hpp File Reference
#include <cstddef>
#include <limits>
#include <type_traits>
#include <mtl/simd/batch.hpp>

Classes

struct  mtl::simd::detail::exp_constants< float >
struct  mtl::simd::detail::exp_constants< double >

Namespaces

namespace  mtl
namespace  mtl::simd
namespace  mtl::simd::detail
 Blocking parameters for T using the compiled SIMD width and the target hardware traits.

Functions

template<typename T>
requires (std::is_same_v<T, float> || std::is_same_v<T, double>)
batch< T > mtl::simd::exp (batch< T > x)
 e^x lane by lane, for float and double lanes.
template<typename T>
requires (std::is_same_v<T, float> || std::is_same_v<T, double>)
void mtl::simd::exp (const T *x, T *out, std::size_t n)
 out[i] = e^x[i] for i < n, by exp(batch<T>).