rexlib 0.1.0
Device-agnostic array computing library for CryoEM and CryoET image processing, with a pluggable backend architecture
Loading...
Searching...
No Matches
parallel_for.hpp
1// SPDX-License-Identifier: GPL-3.0-only
2
3#pragma once
4
5#include "thread_pool.hpp"
6
7#include <cstddef>
8
9namespace rexlib
10{
11namespace cpu
12{
13
43template <typename Body>
45 thread_pool &pool,
46 std::size_t count,
47 std::size_t grain_size,
48 const Body &body
49);
50
51} // namespace cpu
52} // namespace rexlib
53
54#include "parallel_for.inl"
A fixed set of threads a loop's iterations are spread over.
Definition thread_pool.hpp:38
void parallel_for(thread_pool &pool, std::size_t count, std::size_t grain_size, const Body &body)
Run a loop, splitting it across a pool.
Arrays, the operations on them and the devices that run those operations.
Definition cpu_device.hpp:10
@ cpu
CPU of the host node.