완성된 HHT trial의 constraint 자료 중복 평가 제거

This commit is contained in:
KOKO\Mimi
2026-10-14 21:46:11 +09:00
parent 2850ceaa89
commit 0e5b3e05dd
11 changed files with 939 additions and 16 deletions
+5
View File
@@ -40,6 +40,11 @@ ScopedLocalDenseThreads::~ScopedLocalDenseThreads() {
if (restore_default_) static_cast<void>(mkl_set_num_threads_local(0));
}
LocalDensePolicy ReadScopedLocalDensePolicy() noexcept {
const ScopedLocalDenseThreads scope{};
return {mkl_domain_get_max_threads(MKL_DOMAIN_BLAS), mkl_get_dynamic()};
}
bool CholeskyLowerAndInverse(const Matrix& matrix, Matrix& lower,
Matrix& inverse_lower, CholeskyFailure* failure) {
if (failure != nullptr) *failure = CholeskyFailure::kNone;
+12 -2
View File
@@ -1,10 +1,10 @@
#ifndef FESA_SRC_FESA_MATH_DENSE_BLAS_INTERNAL_H_
#define FESA_SRC_FESA_MATH_DENSE_BLAS_INTERNAL_H_
#include <mkl.h>
#include <cstddef>
#include <mkl.h>
#include "fesa/core/status.h"
#include "fesa/math/matrix.h"
#include "fesa/math/vector.h"
@@ -40,6 +40,16 @@ class ScopedLocalDenseThreads {
bool restore_default_{false};
};
/// @brief Records requested backend policy, without claiming actual threads.
struct LocalDensePolicy {
int blas_max_threads;
int dynamic;
};
/// @brief Reads BLAS policy inside the same restored scope as local elements.
/// @note No process-wide policy is changed; positive caller TLS is retained.
LocalDensePolicy ReadScopedLocalDensePolicy() noexcept;
/// @brief Converts a dense storage length to the private MKL integer type.
/// @return The converted length or an uncategorized overflow failure.
Result<MKL_INT> ToMklSize(std::size_t size);