perf(thread saftey): All Engines are now thread safe

Previously engines were not thread safe, a seperate engine would be
needed for every thread. This is no longer the case. This allows for
much more efficient parallel execution
This commit is contained in:
2025-12-12 12:08:47 -05:00
parent c7574a2f3d
commit e114c0e240
46 changed files with 3685 additions and 1604 deletions

View File

@@ -1,5 +1,6 @@
#include "gridfire/utils/logging.h"
#include "gridfire/engine/engine_abstract.h"
#include "gridfire/engine/scratchpads/blob.h"
#include <sstream>
#include <iomanip>
@@ -9,12 +10,12 @@
#include <string>
std::string gridfire::utils::formatNuclearTimescaleLogString(
engine::scratch::StateBlob &ctx,
const engine::DynamicEngine& engine,
const fourdst::composition::Composition& composition,
const double T9,
const double rho
const double T9, const double rho
) {
auto const& result = engine.getSpeciesTimescales(composition, T9, rho);
auto const& result = engine.getSpeciesTimescales(ctx, composition, T9, rho);
if (!result) {
std::ostringstream ss;
ss << "Failed to get species timescales: " << engine::EngineStatus_to_string(result.error());