9#include "../seq/impl.hpp"
12#ifdef NUMERICS_HAS_BLAS
17void warn_blas_unavailable() {
18#ifndef NUMERICS_HAS_BLAS
19 static bool warned =
false;
23 "[numerics] WARNING: Backend::blas requested but BLAS was not found at "
25 " Falling back to Backend::blocked (cache-blocked).\n"
26 " Install OpenBLAS and reconfigure: "
27 "apt install libopenblas-dev | brew install openblas\n");
37#ifdef NUMERICS_HAS_BLAS
39 static_cast<int>(
A.rows()),
40 static_cast<int>(
B.cols()),
41 static_cast<int>(
A.cols()),
42 1.0,
A.data(),
static_cast<int>(
A.cols()),
43 B.data(),
static_cast<int>(
B.cols()),
44 0.0,
C.data(),
static_cast<int>(
C.cols()));
52#ifdef NUMERICS_HAS_BLAS
54 static_cast<int>(
A.rows()),
55 static_cast<int>(
A.cols()),
56 1.0,
A.data(),
static_cast<int>(
A.cols()),
66#ifdef NUMERICS_HAS_BLAS
Dense row-major matrix with optional GPU storage.
void matmul(const Matrix &A, const Matrix &B, Matrix &C)
void matadd(real alpha, const Matrix &A, real beta, const Matrix &B, Matrix &C)
void matvec(const Matrix &A, const Vector &x, Vector &y)
void matvec(const Matrix &A, const Vector &x, Vector &y)
void matmul_blocked(const Matrix &A, const Matrix &B, Matrix &C, idx block_size)
void matadd(real alpha, const Matrix &A, real beta, const Matrix &B, Matrix &C)
real beta(real a, real b)
B(a, b) – beta function.
constexpr T ipow(T x) noexcept
Compute x^N at compile time via repeated squaring.