feat(linear-static-3d-euler-beam): step 17 - parallel-for-tbb

This commit is contained in:
KOKO\Mimi
2026-08-09 18:52:35 +09:00
parent cfdac70756
commit 2f5e737fa1
6 changed files with 211 additions and 0 deletions
+32
View File
@@ -0,0 +1,32 @@
#pragma once
#include <cstddef>
#include <functional>
namespace fesa {
// Executes independent index-addressed work without exposing the backend.
// Callers own output storage and must confine each invocation to its index.
class ParallelFor {
public:
virtual ~ParallelFor() = default;
virtual void execute(
std::size_t count,
const std::function<void(std::size_t)>& body) const = 0;
};
class SerialParallelFor final : public ParallelFor {
public:
void execute(
std::size_t count,
const std::function<void(std::size_t)>& body) const override;
};
class TbbParallelFor final : public ParallelFor {
public:
void execute(
std::size_t count,
const std::function<void(std::size_t)>& body) const override;
};
} // namespace fesa