27 lines
1002 B
C++
27 lines
1002 B
C++
#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_
|