perf(solvers): scope default one-equation calls to one thread

This commit is contained in:
KOKO\Mimi
2026-10-14 15:56:03 +09:00
parent 4c4d943941
commit 770fa2a0d1
7 changed files with 144 additions and 0 deletions
@@ -14,6 +14,7 @@
#include "fesa/math/sparse_matrix.h"
#include "fesa/math/vector.h"
#include "math/dense_blas_internal.h"
namespace fesa {
namespace {
@@ -286,6 +287,8 @@ class MklPardisoSolver::Impl {
/// @brief Calls PARDISO with retained private arrays and phase state.
void CallPardiso(const MKL_INT phase, double* rhs, double* solution,
MKL_INT& error) {
const dense_blas_internal::ScopedSingleEquationThreads thread_scope{
static_cast<std::size_t>(equation_count_)};
pardiso(pt_.data(), &max_factorizations_, &matrix_number_, &mtype_, &phase,
&equation_count_, values_.data(), row_offsets_.data(),
column_indices_.data(), permutation_.data(), &rhs_count_,