feat(cpp-object-oriented-modular-refactoring): step 10 - dense-blas-adapter

This commit is contained in:
KOKO\Mimi
2026-08-16 07:49:57 +09:00
parent 6b0ff31db0
commit 89fc13c873
7 changed files with 146 additions and 49 deletions
+26
View File
@@ -0,0 +1,26 @@
#ifndef FESA_SRC_FESA_MATH_DENSE_BLAS_INTERNAL_H_
#define FESA_SRC_FESA_MATH_DENSE_BLAS_INTERNAL_H_
#include <mkl.h>
#include <cstddef>
#include "fesa/core/status.h"
namespace fesa::dense_blas_internal {
/// @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);
/// @brief Copies contiguous double values through the private BLAS backend.
/// @param source Readable storage for size values when size is nonzero.
/// @param size Number of contiguous values to copy.
/// @param destination Writable storage for size values when size is nonzero.
/// @throws std::length_error if size exceeds the MKL integer range.
/// @note A zero-length copy accepts null pointers and does not call BLAS.
void CopyValues(const double* source, std::size_t size, double* destination);
} // namespace fesa::dense_blas_internal
#endif // FESA_SRC_FESA_MATH_DENSE_BLAS_INTERNAL_H_