68#define PULP_SIMD_DECLARE_KERNELS(T) \
69 void add(const T* a, const T* b, T* dst, std::size_t count) noexcept; \
70 void mul(const T* a, const T* b, T* dst, std::size_t count) noexcept; \
71 void fma(const T* a, const T* b, const T* c, T* dst, std::size_t count) noexcept; \
72 void set(T value, T* dst, std::size_t count) noexcept; \
73 void scale(const T* a, T scalar, T* dst, std::size_t count) noexcept; \
74 void add_scaled(const T* a, T scalar, T* dst, std::size_t count) noexcept; \
75 T sum(const T* data, std::size_t count) noexcept; \
76 T maximum(const T* data, std::size_t count) noexcept; \
77 T minimum(const T* data, std::size_t count) noexcept; \
78 void abs(const T* a, T* dst, std::size_t count) noexcept; \
79 void clamp(const T* a, T lo, T hi, T* dst, std::size_t count) noexcept; \
80 T dot(const T* a, const T* b, std::size_t count) noexcept; \
81 T sum_squares(const T* data, std::size_t count) noexcept; \
82 T max_abs(const T* data, std::size_t count) noexcept; \
83 void ramp_mul(const T* x, T start, T step, T* dst, std::size_t count) noexcept; \
84 void correlate(const T* x, const T* h, T* y, std::size_t n_out, std::size_t taps) noexcept; \
85 void decimate2(const T* x, const T* h, T* y, std::size_t n_out, std::size_t taps) noexcept;
96#if defined(PULP_SIMD_HAS_HIGHWAY)
103#if defined(PULP_SIMD_HAS_ACCELERATE)
104namespace accelerate {
118#if !defined(PULP_SIMD_DEFAULT_BACKEND_ACCELERATE) && \
119 !defined(PULP_SIMD_DEFAULT_BACKEND_HIGHWAY) && !defined(PULP_SIMD_DEFAULT_BACKEND_SCALAR)
130#if defined(PULP_SIMD_DEFAULT_BACKEND_ACCELERATE)
131namespace active_backend = backend::accelerate;
133#elif defined(PULP_SIMD_DEFAULT_BACKEND_HIGHWAY)
134namespace active_backend = backend::highway;
136#elif defined(PULP_SIMD_DEFAULT_BACKEND_SCALAR)
144using active_backend::abs;
145using active_backend::add;
146using active_backend::add_scaled;
147using active_backend::clamp;
148using active_backend::correlate;
149using active_backend::decimate2;
150using active_backend::dot;
151using active_backend::fma;
152using active_backend::max_abs;
153using active_backend::maximum;
154using active_backend::minimum;
155using active_backend::mul;
156using active_backend::ramp_mul;
157using active_backend::scale;
158using active_backend::set;
159using active_backend::sum;
160using active_backend::sum_squares;
162#if defined(PULP_SIMD_HAS_HIGHWAY)
183#undef PULP_SIMD_DECLARE_KERNELS
constexpr const char * active_backend_name
Definition simd.hpp:141
constexpr std::size_t float_lanes() noexcept
Definition simd.hpp:172
constexpr std::size_t double_lanes() noexcept
Definition simd.hpp:176
#define PULP_SIMD_SCALAR_DEFINE(SPEC, T)
Definition scalar_kernels.hpp:134
#define PULP_SIMD_DECLARE_KERNELS(T)
Definition simd.hpp:68