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

Namespaces

namespace  mtl
namespace  mtl::detail
 mat*vec multiply into pre-allocated y: y = A * x.

Functions

template<typename Body>
void mtl::detail::parallel_ewise (std::size_t n, std::size_t work_per_elem, Body &&body)
 Run body(i) for every i in [0, n) across the pool, partitioned into contiguous chunks.
template<typename Body>
void mtl::detail::parallel_ewise_2d (std::size_t rows, std::size_t cols, std::size_t work_per_elem, Body &&body)
 Run body(r, c) for every element of a rows x cols index space, in row-major order, across the pool.