Compare commits

...
188 Commits
Author SHA1 Message Date
Martin Kroeker 632ef87437 Merge pull request #5990 from jjerphan/wasm128-gemv
Add WASM SIMD128 SGEMV/DGEMV kernels
2026-08-22 12:10:59 +02:00
Julien Jerphanion b47183a713 Add WASM SIMD128 SGEMV/DGEMV kernels
kernel/wasm/KERNEL is included after KERNEL.WASM128_GENERIC and
unconditionally pointed S/D GEMV at RISC-V scalar gemv_{n,t}.c, so a
target-file SIMD kernel would never run.

Add kernel/wasm/gemv_{n,t}.c for both precisions. GEMV_T keeps 8
(float) / 4 (double) independent column accumulators with IEEE mul+add
and delays the horizontal add until after the inner loop. GEMV_N
streams four columns into y with a four-lane v128 unroll. Non-unit
stride stays scalar (no WASM gather/scatter).

Guard SGEMV{N,T}KERNEL/DGEMV{N,T}KERNEL with ifndef in KERNEL so the
target file wins. CGEMV/ZGEMV stay RISC-V scalar.

Signed-off-by: Julien Jerphanion <git@jjerphan.xyz>
2026-08-21 16:18:59 +02:00
Martin Kroeker 4919204154 Merge pull request #5989 from OpenMathLib/revert-5936-fixup-5883
Revert "Use QR for bidiagonal SVD with vectors in ?BDSDC (Reference-LAPACK PR 1300)"
2026-08-21 06:25:29 +02:00
Martin Kroeker ed0bb8903c Merge pull request #5988 from martin-frbg/issue5981
Ensure a safe distance between work arrays in the buffer of single-threaded POTRF
2026-08-21 01:09:35 +02:00
Martin Kroeker 77affe1f15 Revert "Use QR for bidiagonal SVD with vectors in ?BDSDC (Reference-LAPACK PR 1300)"
apple m / build-windows (cmake, gfortran, 0, 0) (push) Canceled after 0s
apple m / build-windows (cmake, gfortran, 0, 1) (push) Canceled after 0s
apple m / build-windows (cmake, gfortran, 1, 0) (push) Canceled after 0s
apple m / build-windows (cmake, gfortran, 1, 1) (push) Canceled after 0s
apple m / build-windows (make, gfortran, 0, 0) (push) Canceled after 0s
apple m / build-windows (make, gfortran, 0, 1) (push) Canceled after 0s
apple m / build-windows (make, gfortran, 1, 0) (push) Canceled after 0s
apple m / build-windows (make, gfortran, 1, 1) (push) Canceled after 0s
apple m / xbuild-x86_64 (push) Canceled after 0s
apple m / xbuild-ios (push) Canceled after 0s
apple m / xbuild-ios32 (push) Canceled after 0s
c910v qemu test / TEST (riscv64-linux-gnu, NO_SHARED=1 TARGET=C910V, C910V, riscv64-unknown-linux-gnu) (push) Canceled after 0s
c910v qemu test / TEST (riscv64-linux-gnu, NO_SHARED=1 TARGET=RISCV64_GENERIC, RISCV64_GENERIC, riscv64-linux-gnu) (push) Canceled after 0s
Run codspeed benchmarks / benchmarks (make, gfortran, ubuntu-22.04, 3.12) (push) Canceled after 0s
continuous build / build (cmake, clang, flang, ubuntu-latest) (push) Canceled after 0s
continuous build / build (cmake, clang, gfortran, macos-latest) (push) Canceled after 0s
continuous build / build (cmake, clang, gfortran, ubuntu-24.04-arm) (push) Canceled after 0s
continuous build / build (cmake, clang, gfortran, ubuntu-latest) (push) Canceled after 0s
continuous build / build (cmake, clang-21, flang, ubuntu-latest) (push) Canceled after 0s
continuous build / build (cmake, clang-21, gfortran, ubuntu-24.04-arm) (push) Canceled after 0s
continuous build / build (cmake, clang-21, gfortran, ubuntu-latest) (push) Canceled after 0s
continuous build / build (cmake, gcc, flang, ubuntu-latest) (push) Canceled after 0s
continuous build / build (cmake, gcc, gfortran, ubuntu-24.04-arm) (push) Canceled after 0s
continuous build / build (cmake, gcc, gfortran, ubuntu-latest) (push) Canceled after 0s
continuous build / build (make, clang, flang, ubuntu-latest) (push) Canceled after 0s
continuous build / build (make, clang, gfortran, macos-latest) (push) Canceled after 0s
continuous build / build (make, clang, gfortran, ubuntu-24.04-arm) (push) Canceled after 0s
continuous build / build (make, clang, gfortran, ubuntu-latest) (push) Canceled after 0s
continuous build / build (make, clang-21, flang, ubuntu-latest) (push) Canceled after 0s
continuous build / build (make, clang-21, gfortran, ubuntu-24.04-arm) (push) Canceled after 0s
continuous build / build (make, clang-21, gfortran, ubuntu-latest) (push) Canceled after 0s
continuous build / build (make, gcc, flang, ubuntu-latest) (push) Canceled after 0s
continuous build / build (make, gcc, gfortran, ubuntu-24.04-arm) (push) Canceled after 0s
continuous build / build (make, gcc, gfortran, ubuntu-latest) (push) Canceled after 0s
continuous build / msys2 (None, mingw-w64-ucrt-x86_64-fc, int32, UCRT64, mingw-w64-ucrt-x86_64) (push) Canceled after 0s
continuous build / msys2 (Release, <nil>, int32, MINGW32, mingw-w64-i686) (push) Canceled after 0s
continuous build / msys2 (Release, mingw-w64-clang-x86_64-fc, int32, CLANG64, mingw-w64-clang-x86_64) (push) Canceled after 0s
continuous build / msys2 (Release, mingw-w64-clang-x86_64-fc, int64, -DBINARY=64 -DINTERFACE64=1, CLANG64, mingw-w64-clang-x86_64) (push) Canceled after 0s
continuous build / msys2 (Release, mingw-w64-ucrt-x86_64-fc, int32, UCRT64, mingw-w64-ucrt-x86_64) (push) Canceled after 0s
continuous build / msys2 (Release, mingw-w64-ucrt-x86_64-fc, int64, -DBINARY=64 -DINTERFACE64=1, UCRT64, mingw-w64-ucrt-x86_64) (push) Canceled after 0s
continuous build / linux_thread_stress (openmp) (push) Canceled after 0s
continuous build / linux_thread_stress (pthread) (push) Canceled after 0s
continuous build / linux_thread_sanitizer (push) Canceled after 0s
continuous build / linux_thread_sanitizer_openmp (push) Canceled after 0s
continuous build / msys2_thread_stress (push) Canceled after 0s
continuous build / cross_build (DYNAMIC_ARCH=1 TARGET=GENERIC, mips64el, mips64el-linux-gnuabi64) (push) Canceled after 0s
continuous build / cross_build (TARGET=EV4, alpha, alpha-linux-gnu) (push) Canceled after 0s
continuous build / cross_build (TARGET=MIPS1004K, mipsel, mipsel-linux-gnu) (push) Canceled after 0s
continuous build / cross_build (TARGET=RISCV64_GENERIC, riscv64, riscv64-linux-gnu) (push) Canceled after 0s
continuous build / neoverse_build (push) Canceled after 0s
continuous build / neoverse_n1_build (push) Canceled after 0s
continuous build / neoverse_n1_omp_build (push) Canceled after 0s
continuous build / neoverse_n1_ilp64_build (push) Canceled after 0s
harmonyos / build (push) Canceled after 0s
loongarch64 qemu test / TEST (NO_SHARED=1 DYNAMIC_ARCH=1 TARGET=GENERIC, DYNAMIC_ARCH, loongarch64-linux-gnu) (push) Canceled after 0s
loongarch64 qemu test / TEST (NO_SHARED=1 DYNAMIC_ARCH=1 TARGET=LA264, LA264, loongarch64-linux-gnu) (push) Canceled after 0s
loongarch64 qemu test / TEST (NO_SHARED=1 DYNAMIC_ARCH=1 TARGET=LA464, LA464, loongarch64-linux-gnu) (push) Canceled after 0s
loongarch64 qemu test / TEST (NO_SHARED=1 DYNAMIC_ARCH=1 TARGET=LA64_GENERIC, LA64_GENERIC, loongarch64-linux-gnu) (push) Canceled after 0s
loongarch64 qemu test / TEST (NO_SHARED=1 DYNAMIC_ARCH=1 TARGET=LOONGSON2K1000, LOONGSON2K1000, loongarch64-linux-gnu) (push) Canceled after 0s
loongarch64 qemu test / TEST (NO_SHARED=1 DYNAMIC_ARCH=1 TARGET=LOONGSON3R5, LOONGSON3R5, loongarch64-linux-gnu) (push) Canceled after 0s
loongarch64 qemu test / TEST (NO_SHARED=1 DYNAMIC_ARCH=1 TARGET=LOONGSONGENERIC, LOONGSONGENERIC, loongarch64-linux-gnu) (push) Canceled after 0s
loongarch64 clang qemu test / TEST (NO_SHARED=1 DYNAMIC_ARCH=1 TARGET=GENERIC, DYNAMIC_ARCH) (push) Canceled after 0s
loongarch64 clang qemu test / TEST (NO_SHARED=1 DYNAMIC_ARCH=1 TARGET=LA264, LA264) (push) Canceled after 0s
loongarch64 clang qemu test / TEST (NO_SHARED=1 DYNAMIC_ARCH=1 TARGET=LA464, LA464) (push) Canceled after 0s
loongarch64 clang qemu test / TEST (NO_SHARED=1 DYNAMIC_ARCH=1 TARGET=LA64_GENERIC, LA64_GENERIC) (push) Canceled after 0s
loongarch64 clang qemu test / TEST (NO_SHARED=1 DYNAMIC_ARCH=1 TARGET=LOONGSON2K1000, LOONGSON2K1000) (push) Canceled after 0s
loongarch64 clang qemu test / TEST (NO_SHARED=1 DYNAMIC_ARCH=1 TARGET=LOONGSON3R5, LOONGSON3R5) (push) Canceled after 0s
loongarch64 clang qemu test / TEST (NO_SHARED=1 DYNAMIC_ARCH=1 TARGET=LOONGSONGENERIC, LOONGSONGENERIC) (push) Canceled after 0s
mips64 qemu test / TEST (NO_SHARED=1 TARGET=I6400, I6400, mipsisa64r6el-linux-gnuabi64) (push) Canceled after 0s
mips64 qemu test / TEST (NO_SHARED=1 TARGET=I6500, I6500, mipsisa64r6el-linux-gnuabi64) (push) Canceled after 0s
mips64 qemu test / TEST (NO_SHARED=1 TARGET=MIPS64_GENERIC, MIPS64_GENERIC, mips64el-linux-gnuabi64) (push) Canceled after 0s
mips64 qemu test / TEST (NO_SHARED=1 TARGET=P6600, P6600, mipsisa64r6el-linux-gnuabi64) (push) Canceled after 0s
mips64 qemu test / TEST (NO_SHARED=1 TARGET=SICORTEX, SICORTEX, mips64el-linux-gnuabi64) (push) Canceled after 0s
riscv64 zvl256b qemu test / TEST (TARGET=RISCV64_GENERIC BINARY=64 ARCH=riscv64 DYNAMIC_ARCH=1, rv64,g=true,c=true,v=true,vext_spec=v1.0,vlen=256,elen=64, DYNAMIC_ARCH=1) (push) Canceled after 0s
riscv64 zvl256b qemu test / TEST (TARGET=RISCV64_ZVL128B BINARY=64 ARCH=riscv64, rv64,g=true,c=true,v=true,vext_spec=v1.0,vlen=128,elen=64, RISCV64_ZVL128B) (push) Canceled after 0s
riscv64 zvl256b qemu test / TEST (TARGET=RISCV64_ZVL256B BINARY=64 ARCH=riscv64 BUILD_BFLOAT16=1 BUILD_HFLOAT16=1, rv64,g=true,c=true,v=true,vext_spec=v1.0,vlen=256,elen=64,zfh=true,zvfh=true,zvfbfwma=true, RISCV64_ZVL256B) (push) Canceled after 0s
2026-08-21 00:57:38 +02:00
Martin Kroeker 0944e9e7c1 Ensure a safe margin between work arrays in the buffer even when GEMM_PQR is small 2026-08-20 22:32:08 +02:00
Martin Kroeker 146beeda59 Ensure a safe margin between work arrays in the buffer even with small GEMM_R 2026-08-20 22:30:45 +02:00
Martin Kroeker 6d36cf6b9b Merge pull request #5984 from jjerphan/wasm128-axpy
Add a WASM SIMD128 SAXPY/DAXPY kernel
2026-08-20 20:22:42 +02:00
Martin Kroeker 0f74330773 Merge pull request #5985 from jjerphan/wasm128-cgemm
Add a WASM SIMD128 2x2 CGEMM microkernel
2026-08-20 20:21:13 +02:00
Martin Kroeker 4e2ab1f3f3 Merge pull request #5986 from jjerphan/wasm128-dtrmm
Add a WASM SIMD128 4x4 DTRMM microkernel
2026-08-20 20:20:12 +02:00
Julien Jerphanion 778224cee2 Add a WASM SIMD128 2x2 CGEMM microkernel
Vectorize the packed 2x2 CGEMM/ZGEMM inner loop with f32x4/f64x2
complex mul. Do not let kernel/wasm/KERNEL override the target
kernel the way 4x4 real GEMM already guards TRMM.

Signed-off-by: Julien Jerphanion <git@jjerphan.xyz>
2026-08-20 15:13:10 +02:00
Julien Jerphanion 459624cec2 Add a WASM SIMD128 4x4 DTRMM microkernel
Generic scalar DTRMM was the remaining Level-3 gap (~15 GFLOPS vs
~23 DGEMM). Keep SIMD for double only; single-precision TRMM already
auto-vectorized and a shared S+D kernel slowed SGEMM.

Signed-off-by: Julien Jerphanion <git@jjerphan.xyz>
2026-08-20 14:57:36 +02:00
Julien Jerphanion 12e3e23654 Add a WASM SIMD128 SAXPY/DAXPY kernel
kernel/wasm/KERNEL is included after KERNEL.WASM128_GENERIC and
unconditionally pointed S/D AXPY at RISC-V scalar axpy.c, so the
x86_64 V_SIMD sources listed in the target file never ran.

Add kernel/wasm/axpy.c for both precisions. Unit-stride y += da * x
uses eight independent v128 lanes (32 floats / 16 doubles) with IEEE
mul+add; remainder is one vector then scalar. Skip relaxed madd:
AXPY is checked to machine epsilon, and putting it in the generic
V_SIMD path previously slowed Level 1. Non-unit stride stays scalar
(no WASM gather); inc==0 uses that path so y[0] += n * da * x[0].

Guard SAXPYKERNEL/DAXPYKERNEL with ifndef in KERNEL so the target
file wins. CAXPY/ZAXPY stay RISC-V scalar.

On n=512..8192 vs the RISC-V champion, SAXPY is about 1.4–3.0x and
DAXPY about 1.4–2.2x. test.sh is green.

Signed-off-by: Julien Jerphanion <git@jjerphan.xyz>
2026-08-20 09:17:30 +02:00
Martin Kroeker 6d59c0de34 Merge pull request #5983 from jjerphan/wasm128-4x4-gemm
Add a 4x4 WASM SIMD128 GEMM microkernel
2026-08-19 19:15:43 +02:00
Julien Jerphanion 2ed3ca3940 wasm: add a 4x4 SIMD128 GEMM microkernel for SGEMM/DGEMM
Switch WASM128_GENERIC to unroll 4 with matching ncopy/tcopy and TRMM
4x4 so packing width stays consistent. Use relaxed SIMD madd in the
inner loop when compiled with -mrelaxed-simd.

Signed-off-by: Julien Jerphanion <git@jjerphan.xyz>
2026-08-19 14:17:22 +02:00
Julien Jerphanion 0fb0441220 wasm: gate TRSM call counters behind OPENBLAS_WASM_TRSM_PROFILE
Keep production STRSM/DTRSM free of always-on increments; enable the
counters only when counting invocations.

Signed-off-by: Julien Jerphanion <git@jjerphan.xyz>
2026-08-19 14:16:28 +02:00
Martin Kroeker cc3fc1e319 Merge pull request #5982 from Orcina-Ltd/clapack-dlamch-float-format
C_LAPACK: take the float format from <float.h> in dlamch/slamch
2026-08-18 16:05:14 +02:00
David Heffernan ffe8b242c7 C_LAPACK: take the float format from <float.h> in dlamch/slamch
INSTALL/dlamch.c and INSTALL/slamch.c are f2c translations of the deprecated
dlamchf77.f and slamchf77.f, which determine the floating point format at run
time by probing in dlamc1/dlamc2 rather than reading it from the environment.
The current dlamch.f and slamch.f use the Fortran 90 inquiry intrinsics
(EPSILON, TINY, HUGE, DIGITS, MINEXPONENT, MAXEXPONENT, RADIX) instead, but f2c
cannot translate those, so the C LAPACK selected by NOFORTRAN=1 has been left
with the older probing implementation.

The probe is only correct if double intermediates are genuinely rounded to
double. That does not hold on x87. Building 32 bit for a target without SSE2,
so with -mfpmath=387, and with gcc 16, the intermediates stay in registers and
the probe measures the 80 bit register format: it reports emin/emax as
-16381/16384, and a mantissa width that follows the caller's x87 precision
control bits (64 at extended precision, 53 at double). Written back as doubles,
rmin underflows to 0 and rmax overflows to +Inf, so dlamch('S') and dlamch('U')
return 0 and dlamch('O') returns +Inf.

Everything that scales by those values is then wrong, mostly silently. The
first symptom to surface was a floating point exception rather than a wrong
answer: dsbevx computes

    safmin = dlamch('S')
    eps    = dlamch('P')
    smlnum = safmin / eps
    bignum = 1 / smlnum

so a zero safe minimum makes smlnum zero and the next line divides by zero.
Callers that unmask the divide by zero exception get a hard failure there;
callers that do not get whatever the wrong scaling produces.

Replace the probe with the <float.h> constants, mirroring the values the
current dlamch.f and slamch.f return. This fixes two lesser problems at the
same time: rmach was left uninitialised when cmach matched nothing, where
dlamch.f returns zero; and the cached static results made both routines
unsafe to call concurrently on first use.

dlamc1-dlamc5 and slamc1-slamc5 are left in place. They become unreachable
from dlamch/slamch, but dlamc3 and slamc3 have callers of their own in dlaed3,
dlaed9, dlals0, dlasd3, dlasd8 and their complex equivalents, where they serve
as optimiser barriers.
2026-08-17 10:55:05 +01:00
Martin Kroeker d9f362aae8 Merge pull request #5830 from Felix-Gong/feature/rvv-trsm-zvl128b
Enable RVV-optimized TRSM kernels for RISCV64_ZVL128B
2026-08-16 22:51:51 +02:00
Martin Kroeker f2ba6a2213 Merge pull request #5980 from ajz34/fix/dynarch_small_matrix_batch
Fix: Small matrix `gemm_batch` with DYNAMIC_ARCH
2026-08-16 19:01:15 +02:00
Martin Kroeker 5bd5547bc9 Merge pull request #5979 from ajz34/fix/strided_colmajor
Fix: CBLAS order handling in `gemm_batch_strided` for column-major layout
2026-08-16 18:52:22 +02:00
Martin Kroeker b08df585f6 Merge pull request #5972 from Orcina-Ltd/asum-alignment-determinism
Title: kernel/x86_64: make AVX-512 asum/sum kernels independent of buffer alignment
2026-08-16 16:42:53 +02:00
Martin Kroeker 377753094d Merge pull request #5978 from martin-frbg/issue5976
Fix CMake cross-compilation to ARMV9SME (or DYNAMIC_ARCH containing same)
2026-08-15 20:13:54 +02:00
Martin Kroeker 7779b52f99 Merge pull request #5942 from HecaiYuan/develop
loongarch64: fix segfaults in copy kernels and adjust dsyrk block size
2026-08-15 18:37:08 +02:00
Martin Kroeker d7d350317b Merge pull request #5977 from martin-frbg/issue5975
Expressly restore the ARM64 generic OMATCOPY CT/RT kernels to plain C
2026-08-15 17:49:28 +02:00
0b663a112e Fix gemm_batch small matrix kernel address retrieval for correct call with DYNAMIC_ARCH activated
Co-authored-by: Claude Code <noreply@anthropic.com>
Co-authored-by: glm-5.3 <service@zhipuai.cn>
2026-08-15 23:04:20 +08:00
86c65a5a0c Fix CBLAS order handling in gemm_batch_strided for column-major layout
Co-authored-by: Claude Code <noreply@anthropic.com>
Co-authored-by: glm-5.3 <service@zhipuai.cn>
2026-08-15 21:35:33 +08:00
Martin Kroeker 98425fe1bc Fix misspelling of ARMV9SME target 2026-08-15 14:14:57 +02:00
Martin Kroeker e7083596c9 Expressly restore OMATCOPY CT/RT kernels to plain C 2026-08-15 14:09:44 +02:00
Martin Kroeker e0cabe9b59 Merge pull request #5971 from martin-frbg/issue5841
[WIP] Add ARMv9.2 SME GEMM kernels ported from vlovero's project
2026-08-15 09:14:17 +02:00
Martin Kroeker b83ffe61f3 Increase timeout for OSX DYNAMIC_ARCH job 2026-08-14 23:33:52 +02:00
Martin Kroeker 2d4212947e Increase KC 2026-08-14 22:10:20 +02:00
Martin Kroeker 7313f3ff6e Increase KC 2026-08-14 22:09:04 +02:00
Martin Kroeker 17d99746fe Merge branch 'OpenMathLib:develop' into issue5841 2026-08-14 15:00:23 +02:00
Martin Kroeker 40fea772be Merge pull request #5974 from martin-frbg/ci-macos15
Azure CI: Move mac jobs from deprecated macOS-14 image to macOS-15
2026-08-14 14:59:57 +02:00
Martin Kroeker a79dce7976 Keep the ios-armv7 job at xcode16.2/sdk 18.2 as 16.4 appears to have dropped armv7 2026-08-14 10:22:22 +02:00
Martin Kroeker d43c87d317 Update macOS SDK versions as well 2026-08-14 01:05:25 +02:00
Martin Kroeker 0e79f73488 Move mac jobs from deprecated macOS-14 image to macOS-15 2026-08-14 00:12:42 +02:00
Martin Kroeker 29de61484d Merge pull request #5973 from moluopro/fix-loongarch64-dsdot-accumulator
LoongArch: Fix DSDOT accumulator initialization
2026-08-13 23:13:29 +02:00
Martin Kroeker 9884c480ea Add casts to pacify homebrew-llvm 2026-08-13 22:20:23 +02:00
Martin Kroeker f285f47ab1 Merge branch 'develop' into issue5841 2026-08-13 20:04:43 +02:00
Martin Kroeker 305bd67178 Add +sme-f64f64 to build flags of VortexM4 and ARMV9SME 2026-08-13 18:51:35 +02:00
Martin Kroeker f8830b66e3 Add sme-f64f64 capability to VortexM4 and ARMV9SME build flags 2026-08-13 18:48:02 +02:00
Martin Kroeker 81dd859785 Move declarations of the ARM64 SME kernels to the appropriate headers 2026-08-13 18:43:48 +02:00
Martin Kroeker 3ead57fd2b Improve clobber lists and interfaces 2026-08-13 18:41:33 +02:00
Martin Kroeker c073f087b4 Add ARM64 SME GEMM kernels 2026-08-13 18:39:56 +02:00
Martin Kroeker 9724481b59 Add declarations for ARM64 SME GEMM kernels 2026-08-13 18:38:55 +02:00
moluopro fc6f4a3b46 CI: Re-enable LoongArch DSDOT test with Clang 2026-08-13 23:01:10 +08:00
moluopro 8f2a8fe318 CI: Re-enable LoongArch DSDOT test with GCC 2026-08-13 23:00:47 +08:00
moluopro 404f288a9d LoongArch: Fix DSDOT accumulator initialization 2026-08-13 23:00:41 +08:00
David Heffernan d793be85b4 kernel/x86_64: make AVX-512 asum/sum kernels independent of buffer alignment
The skylakex/cooperlake d/s/c/z asum and c/z sum microkernels peel leading
elements until the input pointer reaches a 64-byte boundary (a scalar loop in
dasum/sasum, a masked header load in the complex variants) before entering an
aligned-load accumulator loop. The peel count depends on the buffer address
mod 64, so the grouping of the sum into accumulators - and therefore the
rounding of the result - depends on where the caller's buffer happens to sit
in memory. The same data at a different address can give a bitwise-different
sum.

That address dependence surfaced as non-reproducibility in OrcaFlex: LAPACK's
dstein scales each inverse-iteration eigenvector by 1/dasum(...) over a heap
array whose alignment varies with allocation history, so eigenvectors from
identical inputs differed run to run in the last bits, which zero-tolerance
regression comparison flags.

Fix by dropping the alignment peel and using unaligned loads throughout, so
the summation order is a function of the length alone. On AVX-512 hardware
unaligned load instructions on addresses that happen to be aligned cost the
same as aligned loads; only genuinely split cache lines pay a small penalty,
negligible for these level-1 reductions.
2026-08-13 13:57:49 +01:00
Martin Kroeker 8d73a856fb Merge pull request #5970 from hugomeiland/cortexa72-dgemm-6x8
ARM64: Cortex-A72 DGEMM 6×8 microkernel and blocking
2026-08-12 18:12:23 +02:00
Martin Kroeker 4ae369ac0a Make the compute kernel static 2026-08-12 10:54:27 +02:00
Martin Kroeker 1ed99815fa Add SME GEMM kernels 2026-08-12 10:53:07 +02:00
Hugo MeilandandCursor 4e923d1ba6 Keep CORTEXA72 out of default DYNAMIC_ARCH
Per review: A72 was dropped from the default DYNAMIC_CORE list in
#4389 to limit arm64 binary size. Restore the A57 alias for default
DYNAMIC_ARCH; TARGET=CORTEXA72 and DYNAMIC_LIST=CORTEXA72 still get
the dedicated 6x8 kernels.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-11 18:52:45 +02:00
Martin Kroeker e24e0da779 Add sme-f64f64 to ARMV9SME archflags too 2026-08-11 17:58:17 +02:00
Martin Kroeker 39b56e9a05 Add ARM64 SME GEMM kernels 2026-08-11 12:16:04 +02:00
Martin Kroeker cf1b7c1ad9 Clean up non-OpenMP build and add CBLAS GEMM benchmark 2026-08-11 12:14:58 +02:00
Martin Kroeker 78f03216de Add SME GEMM kernels ported from vlovero's ARMv9.2-GEMM project 2026-08-11 12:12:29 +02:00
Martin Kroeker f2dc74796f Integrate SME GEMM kernels 2026-08-11 12:10:47 +02:00
Martin Kroeker 2f915c5e23 Add f64f64 extension to VortexM4 options 2026-08-11 12:10:03 +02:00
Martin Kroeker 5aa2c41e8d Credit Vincent Lovero for his ARM SME kernel work 2026-08-11 12:07:46 +02:00
Hugo MeilandandCursor df6032c375 Alias gotoblas_CORTEXA72 to ARMV8 on Darwin DYNAMIC_ARCH
Darwin's DYNAMIC_CORE only builds ARMV8/NEOVERSEN1/ARMV9SME/VORTEXM4,
so an unconditional extern gotoblas_CORTEXA72 left Apple M builds with
an undefined symbol. Mirror the CORTEXA57 Darwin alias.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-09 12:47:18 +02:00
Hugo MeilandandCursor 2b69faff24 Add generic neg_tcopy_6 for DGEMM_UNROLL_M=6
DYNAMIC_ARCH builds CORTEXA72 as a separate kernel and pull
dneg_tcopy from generic/neg_tcopy_$(DGEMM_UNROLL_M).c. Width 6 was
missing (only 1/2/4/8/16 existed), which broke the arm64 Graviton
Cirun and Azure DYNAMIC_ARM64 jobs.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-09 12:16:01 +02:00
Hugo MeilandandCursor 23f832c464 Wire CORTEXA72 6x8 blocking and DYNAMIC_ARCH dispatch
Give CORTEXA72 its own param.h block (UNROLL 6x8, P=120 Q=240, R=4096
shared-L2 / R=768 single-core), add it to DYNAMIC_CORE, and stop
aliasing gotoblas_CORTEXA72 to A57 so DYNAMIC_ARCH can select the new
kernels on MIDR 0xd08.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-09 10:31:35 +02:00
Hugo MeilandandCursor 560caa56e6 Add Cortex-A72 DGEMM 6x8 microkernel with MR=6 packers and TRSM
TARGET=CORTEXA72 previously reused the A57 8x4 path. Add a dedicated
6x8 NEON ukernel, contiguous MR=6 panel packers (stock gemm_*copy_6 is
4+2), and UNROLL_M=6-aware TRSM kernels so HPL/dtrsm does not corrupt
the heap. DTRMM falls back to generic 2x2 until a matching kernel exists.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-09 10:31:35 +02:00
Martin Kroeker 05518e0f11 Merge pull request #5969 from martin-frbg/lapack1346
Raise SE2,SEP test thresholds to account for xSTEINs orthogonality guarantee (Reference-LAPACK PR 1346)
2026-08-09 00:28:18 +02:00
Martin Kroeker 7fdb527565 Merge pull request #5968 from martin-frbg/lapack1342
Fix invalid reads in the single&double precision DMD tests (Reference-LAPACK PR 1342)
2026-08-09 00:27:58 +02:00
Martin Kroeker b8d6a7bef8 Merge pull request #5967 from martin-frbg/lapack1338
Fix spurious SGEBAL/DGEBAL test failure caused by wrong metric (Reference-LAPACK PR 1338)
2026-08-08 23:05:16 +02:00
Martin Kroeker 9ff46235ea Merge pull request #5966 from Ka-zam/relapack-sytrf-workspace
Fix workspace size in ReLAPACK sytrf/hetrf
2026-08-08 23:04:44 +02:00
Martin Kroeker 330063dec8 Raise threshold to account for orthogonality guarantee (Reference-LAPACK PR 1346) 2026-08-08 18:25:41 +02:00
Martin Kroeker 2f24d51c5d Raise threshold to accound for orthogonality guarantee (Reference-LAPACK PR 1346) 2026-08-08 18:24:25 +02:00
Martin Kroeker b22e3244e4 Fix read beyond the array bounds (Reference-LAPACK PR 1342) 2026-08-08 18:17:04 +02:00
Martin Kroeker 8554a7e586 Fix read beyond the array bounds (Reference-LAPACK PR 1342) 2026-08-08 18:15:49 +02:00
Martin Kroeker 4d35c91404 Add missing ABS to the error metric (Reference-LAPACK PR 1338) 2026-08-08 18:06:18 +02:00
Martin Kroeker a9a238157b Add missing ABS to the error metric (Reference-LAPACK PR 1338) 2026-08-08 18:04:28 +02:00
Magnus Lundmark 4a4cd8fbb6 Fix workspace size in ReLAPACK sytrf/hetrf
xREC_SPLIT rounds up, so n*(n/2) is smaller than the n by xREC_SPLIT(n)
workspace the top level recursion addresses whenever xREC_SPLIT(n) > n/2
(n=500 splits 252/248). The routines then write past the end of the
buffer they reported from the lWork=-1 query, silently corrupting both
the factorization and the heap.

Size the workspace with the same xREC_SPLIT the recursion uses.
2026-08-08 15:22:15 +02:00
Martin Kroeker 446c436e10 Merge pull request #5965 from martin-frbg/issue5958-2
Return a specific XERBLA error to the caller when buffer assignment fails
2026-08-07 22:34:18 +02:00
Martin Kroeker a6923005ec Merge pull request #5960 from ngoldbaum/shutdown-release-race
Fix multithreaded shutdown thread safety issues
2026-08-07 14:03:47 +02:00
Martin Kroeker 75b93b4465 Fix missing declaration of info 2026-08-07 13:56:43 +02:00
Martin Kroeker 761ebe91ab Fix return without code and buffer leak on other error path 2026-08-07 13:51:01 +02:00
Martin Kroeker ed2ba87203 Add error return on buffer assignment failure 2026-08-07 12:28:01 +02:00
Martin Kroeker cb8199dda2 Add error return on buffer assignment failure 2026-08-07 12:20:19 +02:00
Martin Kroeker ec6eb7922a Add error return on buffer assignment failure 2026-08-07 12:16:32 +02:00
Martin Kroeker ad7a417489 Merge pull request #5964 from ErnstPeng/la-small-matrix-dev
loongarch: add small matrix kernel of sgemm_lasx/lsx and dgemm_lsx
2026-08-06 14:43:06 +02:00
Martin Kroeker 1f83c8be22 Merge pull request #5962 from martin-frbg/ci-mips-qemu10
CI, MIPS64: Update qemu tag to 10.2.4 to get the fork fix
2026-08-06 08:15:32 +02:00
pengxu 284bcbae13 loongarch: add small matrix kernel of sgemm_lasx/lsx and dgemm_lsx 2026-08-06 10:14:23 +08:00
Martin Kroeker c56410d60f Update qemu tag to 10.2.4 to get the fork fix 2026-08-05 23:18:35 +02:00
Nathan Goldbaum b14b82ce17 Fix merge conflict resolution screwup 2026-08-05 15:12:14 -06:00
Martin Kroeker 721f5da709 Merge pull request #5961 from moluopro/fix-loongarch64-qemu-install
Fix issues with the LoongArch & macOS pipeline
2026-08-05 23:09:48 +02:00
Nathan Goldbaum 0041b780ed fix broken cmake 2026-08-05 09:28:41 -06:00
Nathan Goldbaum 28da957ee1 cache ntdll pointer at startup 2026-08-05 09:02:15 -06:00
Nathan Goldbaum 2bb30e03dd bump timeouts slightly 2026-08-05 09:01:58 -06:00
Nathan Goldbaum 4ea40779bd Add explanatory note about RtlDllShutdownInProgress 2026-08-05 08:37:44 -06:00
moluopro 210b6a2962 AzureCI: Increase timeouts for slow macOS jobs 2026-08-05 22:31:54 +08:00
moluopro fbe55b25c9 CI: Install QEMU 10.2.1 for LoongArch tests 2026-08-05 22:31:54 +08:00
Nathan Goldbaum 8c7c04b671 Merge branch 'develop' into shutdown-release-race 2026-08-05 08:14:52 -06:00
Nathan Goldbaum b8d83a72f4 Avoid possible hang on Windows by introspecting shutdown state 2026-08-05 08:10:43 -06:00
Nathan Goldbaum 95120da710 Centralize buffer release bookkeeping 2026-08-05 08:10:30 -06:00
Martin Kroeker 0c5fc4552b Merge pull request #5956 from moluopro/fix-openmp-exec-buffer-lifetime
Fix stale workspace pointers in reused thread queues
2026-08-05 09:39:56 +02:00
Martin Kroeker 64ad27325a Merge pull request #5959 from martin-frbg/loongarch-ci-qemu
CI: Update qemu in the loongarch64 job to version 10 with fixed fork behavior
2026-08-05 09:38:56 +02:00
Nathan Goldbaum 6e5c5255b0 add multithreaded shutdown stress test 2026-08-04 19:16:32 -06:00
Martin Kroeker 0392a36007 sudo wget to write in /usr/bin 2026-08-05 00:01:18 +02:00
Martin Kroeker e24af350c0 fix option capitalization 2026-08-04 23:36:19 +02:00
Martin Kroeker dacfb92ec3 Overwrite the outdated qemu with a binary of 10.2.4 2026-08-04 23:18:53 +02:00
Martin Kroeker b6ee68da06 Merge pull request #5955 from moluopro/fix-riscv64-gemm-gemv-forwarding
Fix RISC-V GEMM/GEMV forwarding in Make builds
2026-08-04 15:40:38 +02:00
Martin Kroeker acfe406eb7 Merge pull request #5957 from uuiitwp/develop
Fix pointer comparison in laed3.c threading threshold
2026-08-04 14:22:11 +02:00
Martin Kroeker 914f3ae6a8 Merge pull request #5949 from martin-frbg/issue5947
Prevent accidental increase of the thread count inside a parallel region
2026-08-04 14:21:05 +02:00
uuiitwp d591836293 Fix pointer comparison in laed3.c threading threshold 2026-08-04 14:36:18 +08:00
moluopro d7dc043d61 Run mixed callback test with Make 2026-08-04 12:06:17 +08:00
moluopro 880a4a596e Register mixed callback test with CMake 2026-08-04 12:06:17 +08:00
moluopro 99f7c78e79 Test mixed DGEMM with thread callbacks 2026-08-04 12:06:17 +08:00
moluopro 61f5f03311 Use worker workspace for threaded SBMV 2026-08-04 12:06:17 +08:00
moluopro dddd08507e Preserve Windows queue workspace inputs 2026-08-04 12:06:17 +08:00
moluopro a7b6ce7ae0 Preserve OpenMP queue workspace inputs 2026-08-04 12:06:17 +08:00
moluopro 21d02cf01e Preserve pthread queue workspace inputs 2026-08-04 12:06:17 +08:00
moluopro 5c57734ac6 Track worker workspace in thread queues 2026-08-04 12:06:17 +08:00
moluopro ecc04e57cf Fix RISC-V GEMM/GEMV forwarding in Make builds 2026-08-03 22:05:43 +08:00
Martin Kroeker c3db185d6c Merge pull request #5879 from amritahs-ibm/BGEMM_PPC
BGEMM Kernel implementation for Power PC Architecture
2026-07-31 00:04:15 +02:00
Martin Kroeker 80920a3242 Merge pull request #5944 from lujiaweics/fix/zrotg-missing-profile-end
Fix build error in zrotg.c with FUNCTION_PROFILE=1 from Makefile.rule
2026-07-30 23:34:06 +02:00
Martin Kroeker 2621df71d5 Merge pull request #5952 from pkubaj/patch-3
system.cmake: mirror recent Makefile.power commits
2026-07-29 19:40:30 +02:00
Martin Kroeker 2a921cfe85 Merge pull request #5951 from martin-frbg/fixup5577
Make get/set_affinity visible again and export functions in the OpenMP blas server too
2026-07-29 11:02:40 +02:00
Piotr Kubaj 76e12db33b system.cmake: mirror recent Makefile.power commits
Fixes builds with clang when using cmake.
2026-07-29 08:48:25 +00:00
Martin Kroeker 28e75a8530 Tag get/set_affinity with OPENBLAS_EXPORT 2026-07-28 20:52:15 +02:00
Martin Kroeker 4230fe472e Tag openblas_set_num_threads and get/set_affinity with OPENBLAS_EXPORT 2026-07-28 20:45:46 +02:00
Martin Kroeker e7363c16c1 Merge pull request #5948 from martin-frbg/issue5946
Copy PROLOGUE into PROLOGUE_EXPORT for other arch/os combinations that have assembly kernels
2026-07-28 20:41:25 +02:00
Martin Kroeker 842189bf3f Prevent accidental increase of the thread count inside a parallel region 2026-07-28 14:27:26 +02:00
Martin Kroeker e17e958a09 Copy PROLOGUE into PROLOGUE_EXPORT 2026-07-28 11:59:54 +02:00
Martin Kroeker e231f4bb89 Copy PROLOGUE to PROLOGUE_EXPORT 2026-07-28 11:57:24 +02:00
Martin Kroeker 876310b12c Define PROLOGUE_EXPORT (same as PROLOGUE for now) 2026-07-28 11:49:25 +02:00
Martin Kroeker c6aeca0365 Define PROLOGUE_EXPORT for AIX and OSX (same as PROLOGUE) 2026-07-28 11:46:30 +02:00
Martin Kroeker 181aadf226 Merge pull request #5945 from OpenMathLib/revert-5921-issue5905
Revert "Mark temporaries as volatile to avoid SIGBUS in multithreaded builds with gcc15+ on 32bit FreeBSD/x86"
2026-07-27 07:48:58 +02:00
Martin Kroeker b080247a21 Revert "Mark temporaries as volatile to avoid SIGBUS in multithreaded builds with gcc15+ on 32bit FreeBSD/x86"
apple m / build-windows (cmake, gfortran, 0, 0) (push) Canceled after 0s
apple m / build-windows (cmake, gfortran, 0, 1) (push) Canceled after 0s
apple m / build-windows (cmake, gfortran, 1, 0) (push) Canceled after 0s
apple m / build-windows (cmake, gfortran, 1, 1) (push) Canceled after 0s
apple m / build-windows (make, gfortran, 0, 0) (push) Canceled after 0s
apple m / build-windows (make, gfortran, 0, 1) (push) Canceled after 0s
apple m / build-windows (make, gfortran, 1, 0) (push) Canceled after 0s
apple m / build-windows (make, gfortran, 1, 1) (push) Canceled after 0s
apple m / xbuild-x86_64 (push) Canceled after 0s
apple m / xbuild-ios (push) Canceled after 0s
apple m / xbuild-ios32 (push) Canceled after 0s
c910v qemu test / TEST (riscv64-linux-gnu, NO_SHARED=1 TARGET=C910V, C910V, riscv64-unknown-linux-gnu) (push) Canceled after 0s
c910v qemu test / TEST (riscv64-linux-gnu, NO_SHARED=1 TARGET=RISCV64_GENERIC, RISCV64_GENERIC, riscv64-linux-gnu) (push) Canceled after 0s
Run codspeed benchmarks / benchmarks (make, gfortran, ubuntu-22.04, 3.12) (push) Canceled after 0s
continuous build / build (cmake, clang, flang, ubuntu-latest) (push) Canceled after 0s
continuous build / build (cmake, clang, gfortran, macos-latest) (push) Canceled after 0s
continuous build / build (cmake, clang, gfortran, ubuntu-24.04-arm) (push) Canceled after 0s
continuous build / build (cmake, clang, gfortran, ubuntu-latest) (push) Canceled after 0s
continuous build / build (cmake, clang-21, flang, ubuntu-latest) (push) Canceled after 0s
continuous build / build (cmake, clang-21, gfortran, ubuntu-24.04-arm) (push) Canceled after 0s
continuous build / build (cmake, clang-21, gfortran, ubuntu-latest) (push) Canceled after 0s
continuous build / build (cmake, gcc, flang, ubuntu-latest) (push) Canceled after 0s
continuous build / build (cmake, gcc, gfortran, ubuntu-24.04-arm) (push) Canceled after 0s
continuous build / build (cmake, gcc, gfortran, ubuntu-latest) (push) Canceled after 0s
continuous build / build (make, clang, flang, ubuntu-latest) (push) Canceled after 0s
continuous build / build (make, clang, gfortran, macos-latest) (push) Canceled after 0s
continuous build / build (make, clang, gfortran, ubuntu-24.04-arm) (push) Canceled after 0s
continuous build / build (make, clang, gfortran, ubuntu-latest) (push) Canceled after 0s
continuous build / build (make, clang-21, flang, ubuntu-latest) (push) Canceled after 0s
continuous build / build (make, clang-21, gfortran, ubuntu-24.04-arm) (push) Canceled after 0s
continuous build / build (make, clang-21, gfortran, ubuntu-latest) (push) Canceled after 0s
continuous build / build (make, gcc, flang, ubuntu-latest) (push) Canceled after 0s
continuous build / build (make, gcc, gfortran, ubuntu-24.04-arm) (push) Canceled after 0s
continuous build / build (make, gcc, gfortran, ubuntu-latest) (push) Canceled after 0s
continuous build / msys2 (None, mingw-w64-ucrt-x86_64-fc, int32, UCRT64, mingw-w64-ucrt-x86_64) (push) Canceled after 0s
continuous build / msys2 (Release, <nil>, int32, MINGW32, mingw-w64-i686) (push) Canceled after 0s
continuous build / msys2 (Release, mingw-w64-clang-x86_64-fc, int32, CLANG64, mingw-w64-clang-x86_64) (push) Canceled after 0s
continuous build / msys2 (Release, mingw-w64-clang-x86_64-fc, int64, -DBINARY=64 -DINTERFACE64=1, CLANG64, mingw-w64-clang-x86_64) (push) Canceled after 0s
continuous build / msys2 (Release, mingw-w64-ucrt-x86_64-fc, int32, UCRT64, mingw-w64-ucrt-x86_64) (push) Canceled after 0s
continuous build / msys2 (Release, mingw-w64-ucrt-x86_64-fc, int64, -DBINARY=64 -DINTERFACE64=1, UCRT64, mingw-w64-ucrt-x86_64) (push) Canceled after 0s
continuous build / linux_thread_stress (openmp) (push) Canceled after 0s
continuous build / linux_thread_stress (pthread) (push) Canceled after 0s
continuous build / linux_thread_sanitizer (push) Canceled after 0s
continuous build / linux_thread_sanitizer_openmp (push) Canceled after 0s
continuous build / msys2_thread_stress (push) Canceled after 0s
continuous build / cross_build (DYNAMIC_ARCH=1 TARGET=GENERIC, mips64el, mips64el-linux-gnuabi64) (push) Canceled after 0s
continuous build / cross_build (TARGET=EV4, alpha, alpha-linux-gnu) (push) Canceled after 0s
continuous build / cross_build (TARGET=MIPS1004K, mipsel, mipsel-linux-gnu) (push) Canceled after 0s
continuous build / cross_build (TARGET=RISCV64_GENERIC, riscv64, riscv64-linux-gnu) (push) Canceled after 0s
continuous build / neoverse_build (push) Canceled after 0s
continuous build / neoverse_n1_build (push) Canceled after 0s
continuous build / neoverse_n1_omp_build (push) Canceled after 0s
continuous build / neoverse_n1_ilp64_build (push) Canceled after 0s
harmonyos / build (push) Canceled after 0s
loongarch64 qemu test / TEST (NO_SHARED=1 DYNAMIC_ARCH=1 TARGET=GENERIC, DYNAMIC_ARCH, loongarch64-linux-gnu) (push) Canceled after 0s
loongarch64 qemu test / TEST (NO_SHARED=1 DYNAMIC_ARCH=1 TARGET=LA264, LA264, loongarch64-linux-gnu) (push) Canceled after 0s
loongarch64 qemu test / TEST (NO_SHARED=1 DYNAMIC_ARCH=1 TARGET=LA464, LA464, loongarch64-linux-gnu) (push) Canceled after 0s
loongarch64 qemu test / TEST (NO_SHARED=1 DYNAMIC_ARCH=1 TARGET=LA64_GENERIC, LA64_GENERIC, loongarch64-linux-gnu) (push) Canceled after 0s
loongarch64 qemu test / TEST (NO_SHARED=1 DYNAMIC_ARCH=1 TARGET=LOONGSON2K1000, LOONGSON2K1000, loongarch64-linux-gnu) (push) Canceled after 0s
loongarch64 qemu test / TEST (NO_SHARED=1 DYNAMIC_ARCH=1 TARGET=LOONGSON3R5, LOONGSON3R5, loongarch64-linux-gnu) (push) Canceled after 0s
loongarch64 qemu test / TEST (NO_SHARED=1 DYNAMIC_ARCH=1 TARGET=LOONGSONGENERIC, LOONGSONGENERIC, loongarch64-linux-gnu) (push) Canceled after 0s
loongarch64 clang qemu test / TEST (NO_SHARED=1 DYNAMIC_ARCH=1 TARGET=GENERIC, DYNAMIC_ARCH) (push) Canceled after 0s
loongarch64 clang qemu test / TEST (NO_SHARED=1 DYNAMIC_ARCH=1 TARGET=LA264, LA264) (push) Canceled after 0s
loongarch64 clang qemu test / TEST (NO_SHARED=1 DYNAMIC_ARCH=1 TARGET=LA464, LA464) (push) Canceled after 0s
loongarch64 clang qemu test / TEST (NO_SHARED=1 DYNAMIC_ARCH=1 TARGET=LA64_GENERIC, LA64_GENERIC) (push) Canceled after 0s
loongarch64 clang qemu test / TEST (NO_SHARED=1 DYNAMIC_ARCH=1 TARGET=LOONGSON2K1000, LOONGSON2K1000) (push) Canceled after 0s
loongarch64 clang qemu test / TEST (NO_SHARED=1 DYNAMIC_ARCH=1 TARGET=LOONGSON3R5, LOONGSON3R5) (push) Canceled after 0s
loongarch64 clang qemu test / TEST (NO_SHARED=1 DYNAMIC_ARCH=1 TARGET=LOONGSONGENERIC, LOONGSONGENERIC) (push) Canceled after 0s
mips64 qemu test / TEST (NO_SHARED=1 TARGET=I6400, I6400, mipsisa64r6el-linux-gnuabi64) (push) Canceled after 0s
mips64 qemu test / TEST (NO_SHARED=1 TARGET=I6500, I6500, mipsisa64r6el-linux-gnuabi64) (push) Canceled after 0s
mips64 qemu test / TEST (NO_SHARED=1 TARGET=MIPS64_GENERIC, MIPS64_GENERIC, mips64el-linux-gnuabi64) (push) Canceled after 0s
mips64 qemu test / TEST (NO_SHARED=1 TARGET=P6600, P6600, mipsisa64r6el-linux-gnuabi64) (push) Canceled after 0s
mips64 qemu test / TEST (NO_SHARED=1 TARGET=SICORTEX, SICORTEX, mips64el-linux-gnuabi64) (push) Canceled after 0s
riscv64 zvl256b qemu test / TEST (TARGET=RISCV64_GENERIC BINARY=64 ARCH=riscv64 DYNAMIC_ARCH=1, rv64,g=true,c=true,v=true,vext_spec=v1.0,vlen=256,elen=64, DYNAMIC_ARCH=1) (push) Canceled after 0s
riscv64 zvl256b qemu test / TEST (TARGET=RISCV64_ZVL128B BINARY=64 ARCH=riscv64, rv64,g=true,c=true,v=true,vext_spec=v1.0,vlen=128,elen=64, RISCV64_ZVL128B) (push) Canceled after 0s
riscv64 zvl256b qemu test / TEST (TARGET=RISCV64_ZVL256B BINARY=64 ARCH=riscv64 BUILD_BFLOAT16=1 BUILD_HFLOAT16=1, rv64,g=true,c=true,v=true,vext_spec=v1.0,vlen=256,elen=64,zfh=true,zvfh=true,zvfbfwma=true, RISCV64_ZVL256B) (push) Canceled after 0s
2026-07-26 22:51:58 +02:00
lujiaweics b6ad3e2079 Fix build error in zrotg.c with FUNCTION_PROFILE=1 from Makefile.rule
Add missing FUNCTION_PROFILE_END / IDEBUG_END after all return
paths to properly close the brace opened by FUNCTION_PROFILE_START.
Use a do { … } while(0) wrapper so the macros stay outside any
nested block.
2026-07-27 01:58:17 +08:00
yuanhecai d16316e942 LoongArch64: adjust dsyrk GEMM_P block size to avoid failure
On LoongArch LA464 platform, dsyrk produces incorrect results
when processing certain block sizes, which in turn causes
dcholesky and dpotrf to fail on positive-definite matrices.

The issue manifests with specific block dimension combinations
(e.g., 80x16). Adjust GEMM_P from 112 to 96 so that
dsyrk's blocking logic avoids generating the problematic size.
2026-07-24 15:15:09 +08:00
yuanhecai 1b3358b3c5 LoongArch64: fix dgemm_ncopy_4_lsx.S segfault for small columns 2026-07-24 15:14:34 +08:00
yuanhecai 4c78593874 LoongArch64: fix sgemm_ncopy_16_lasx.S segfault for small columns 2026-07-24 15:13:42 +08:00
yuanhecai 018891aa98 LoongArch64: fix sgemm_ncopy_8_lasx.S segfault for small columns 2026-07-24 15:12:51 +08:00
Martin Kroeker 8766886cfc Merge pull request #5577 from mattip/attrib-hidden
add visibility=default to exported functions, visibility=hidden to most assembler
2026-07-24 00:16:00 +02:00
Martin Kroeker 15a14842a1 Expressly add visibility=default to override the "hidden" in CFLAGS 2026-07-23 20:14:14 +02:00
Martin Kroeker 0ddb20ffea Merge pull request #5940 from martin-frbg/lapack1332
Fix memory freeing on error paths of LAPACKE C/ZGEJSV,C/ZGESVDX (Reference-LAPACK PR 1332)
2026-07-23 10:34:28 +02:00
Martin Kroeker a543bd5d07 Export openblas_cancel and openblas_xerbla_handler 2026-07-23 10:33:28 +02:00
Amrita H S 8d439717c5 power/sbgemm_kernel_power10.c: reformat to 4-space indentation
Pure cosmetic cleanup; no functional changes.

Convert all tab-indented code to 4-space indent, align macro
continuation backslashes, switch brace placement to consistent K&R
style, reformat multi-line vector initialisers, and remove trailing
whitespace on SAVE4x2_ACC1_SCALAR.

Signed-off-by: Amrita H S <amritahs@linux.vnet.ibm.com>
2026-07-23 02:14:01 -05:00
Amrita H S 0d6d459161 power/bgemm: add BFloat16-in, BFloat16-out GEMM kernel for POWER10
Add BGEMM (BF16 input → BF16 output) for POWER10 by reusing the
existing SBGEMM kernel infrastructure. A -DBGEMM compile flag switches
only the store path; the xvbf16ger2pp MMA instruction and BF16 packing
routines are shared with SBGEMM unchanged.

Changes
-------
kernel/power/KERNEL.POWER10
  - Register BGEMM kernel and copy-routine targets, reusing the
    sbgemm_ncopy/tcopy sources (packing layout is identical).

kernel/power/sbgemm_kernel_power10.c
  - Under BGEMM: force v4sf_t to float so accumulators stay in
    float32; add STORE4_BF16/STORE2_BF16 macros (read BF16 C, widen,
    apply alpha*acc, convert back via xvcvspbf16, store); add
    f32_to_bf16_scalar() for m&1/n&1 tails; add BGEMM variants of
    all SAVE_ACC macros covering the full m/n tile hierarchy.

param.h
  - Add BGEMM_DEFAULT_UNROLL_M=16, UNROLL_N=8, P/Q/R blocking
    parameters for POWER10, matching the 16x8 kernel tile.

Unit test (utest/test_extensions/test_bgemm.c)
  - Uses SBGEMM as a trusted reference. 21 test cases cover all four
    transpose combinations, all m/n remainder paths, odd-k, alpha=0,
    beta=0/1, and the m>=32 fast path. Tolerance 0.01 to account for
    the one extra BF16 rounding on the BGEMM store.

Performance (POWER10, single-threaded, Transa=N Transb=N)
----------------------------------------------------------
Step=1 (sizes 1–200):
  - Sizes 1–80:   baseline 0.1–128 MFlops (scalar fallback);
                  patch 0.1–39,656 MFlops (up to ~350x faster at M=80).
  - Sizes 81–200: patch 3x–24x faster (avg ~10x) with 16×8 MMA tile
                  engaged.

Step=8 (sizes 8–1024):
  - Baseline peaks at ~2,950 MFlops (avg ~1,746 MFlops).
  - Patch sustains 75,000–1,009,866 MFlops for sizes 384–960,
    exceeding 1 TFlops at large sizes.
  - Median speedup ~99x; average speedup ~140x across all sizes.

Signed-off-by: Amrita H S <amritahs@linux.vnet.ibm.com>
2026-07-23 02:13:31 -05:00
Martin Kroeker 2a9e09faad Merge pull request #5941 from martin-frbg/issue5937
Fix C/C++ atomics conflict in compilation of the cpp_thread_tests
2026-07-23 08:58:14 +02:00
Martin Kroeker 52f0572564 Guard use of C11 atomics against C++ compilation 2026-07-23 00:08:50 +02:00
Martin Kroeker c3de327dd5 Add CX factorization (expert) routines ?GECXX (Reference-LAPACK PR 1161) (#5938)
* Add CX factorization (expert) routines ?GECXX (Reference-LAPACK PR 1161)
2026-07-23 00:02:28 +02:00
Martin Kroeker 251169b710 Fix invalid deallocations on error paths (Reference-LAPACK PR 1332) 2026-07-22 23:59:08 +02:00
Martin Kroeker cf8a045b0e Merge pull request #5939 from martin-frbg/lapack1331
Avoid computing ONE/HUGE unless needed (Reference-LAPACK PR 1331)
2026-07-22 21:58:57 +02:00
Martin Kroeker b6df159a67 Avoid computing ONE/HUGE unless needed (Reference-LAPACK PR 1331) 2026-07-22 17:49:20 +02:00
Martin Kroeker 8c1535b8d9 Merge pull request #5936 from martin-frbg/fixup-5883
Use QR for bidiagonal SVD with vectors in ?BDSDC (Reference-LAPACK PR 1300)
2026-07-22 11:40:52 +02:00
Martin Kroeker 39cdbe6a3c expose openblas_set_xerbla 2026-07-22 00:07:43 +02:00
Martin Kroeker 63ad298a67 Merge branch 'develop' into attrib-hidden 2026-07-21 20:00:16 +02:00
Martin Kroeker 1c6f5f4efd Use QR for bidiagonal SVD with vectors in ?BDSDC (Reference-LAPACK PR 1300) 2026-07-21 18:50:28 +02:00
Martin Kroeker efab2a2fde Merge pull request #5929 from moluopro/remove-misspelled-bdsdc-sources
Fix CMake dynamic-arch fallback and remove unused BDSDC source copies
2026-07-21 18:40:25 +02:00
Martin Kroeker 0b54dd1154 Merge pull request #5933 from martin-frbg/issue5932
Fix compilation with MinGW-W64-Clang under Windows-Arm64
2026-07-20 07:50:42 +02:00
Martin Kroeker d496ab17c2 Merge pull request #5882 from KenoAIStaging/kf/cancellation
Add an asynchronous cancellation API for in-flight operations
2026-07-20 00:25:16 +02:00
Martin Kroeker 4ab4f1eae9 Fix identification of MinGW64 on WoA 2026-07-20 00:20:05 +02:00
Martin Kroeker 96d60aa6a8 Fix version check and prefix llvm backend option 2026-07-20 00:14:23 +02:00
Martin Kroeker 0d928ca275 stack-hazard-size is a llvm backend option 2026-07-20 00:09:07 +02:00
Martin Kroeker 544afb15d6 stack-hazard-size is a llvm backend option 2026-07-20 00:06:48 +02:00
Martin Kroeker f959027a06 Merge pull request #5925 from martin-frbg/fix_getarch_woa
Fix getarch build error in Windows-on-Arm
2026-07-19 17:57:39 +02:00
moluopro 1b64851291 RISCV64-CI: Backport QEMU clone_lock fix 2026-07-19 23:32:40 +08:00
moluopro 43f18d82f5 AzureCI: Parallelize macOS CMake build 2026-07-19 23:32:22 +08:00
Felix-Gong 837c5f67d3 Fix RVV TRSM packed-A traversal
Tile packed-A traversal by GEMM_UNROLL_M so the RVV TRSM solver matches the GEMM/itcopy packing contract on non-x280 RISC-V targets. This keeps the RVV solve path while avoiding VLEN-dependent corruption when VSETVL_MAX differs from the target GEMM unroll width.

Signed-off-by: Xiaofei Gong <gongxiaofei24@iscas.ac.cn>
Signed-off-by: YuanSheng <yuansheng@isrc.iscas.ac.cn>
2026-07-19 14:43:14 +00:00
moluopro 6421c17643 AzureCI: Restore SkylakeX fallback coverage
Keep SkylakeX in the dynamic list with NO_AVX512 so the CMake job verifies that it is demoted to Haswell.
2026-07-19 20:48:28 +08:00
moluopro 2f21ad9282 CMake: Use effective core for fallback kernels
Keep the logical target for dynamic dispatch names while selecting kernel sources and capabilities from the core chosen by getarch after ISA restrictions.
2026-07-19 20:48:10 +08:00
moluopro e21bffc882 AzureCI: Align dynamic list with NO_AVX512 2026-07-19 18:59:06 +08:00
moluopro c7d1f1381c AzureCI: Fix DYNAMIC_LIST in CMake jobs
Pass DYNAMIC_LIST as a semicolon-separated CMake list so each target becomes a separate preprocessor definition. Make the affected scripts fail immediately instead of masking configuration failures.
2026-07-19 14:38:03 +08:00
Keno FischerandClaude Fable 5 7a07c8e1f4 Add an asynchronous cancellation API for in-flight operations
Long-running BLAS calls (a large gemm can run for minutes) cannot
currently be interrupted: callers embedding OpenBLAS (e.g. the Julia
runtime responding to a user's ^C) can only wait for completion or kill
the process. Add a minimal cooperative cancellation protocol:

Every thread owns a pointer-sized generation slot in thread-local
storage, whose stable address is returned by openblas_cancel_token().
Instrumented compute drivers advance the slot to a fresh even
generation at operation entry on the issuing thread (forwarding the
slot and generation to worker threads through blas_arg_t) and poll it
at block granularity. openblas_cancel(token, loaded_token) - callable
from any thread - sets the cancel bit (bit 0) iff the slot still holds
loaded_token, so a canceller that loaded the value while an operation
was in flight stops exactly that operation, while stale or racing
requests either miss or dirty an already-dead generation, both
harmless. There is no object lifecycle: nothing to allocate, bind,
reset, or free.

A cancelled operation returns quickly, leaving its output buffer in an
unspecified partially-updated state that the caller must discard; every
synchronization point in the threaded driver is still executed, so
sibling threads never stall and the library remains consistent for
subsequent calls. Coverage: the level-3 gemm/symm/hemm drivers
(level3.c and level3_thread.c).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012nCkyKUguncLLJrH9K5o7m
2026-07-19 04:20:28 +00:00
moluopro 14d78d31c8 Remove unused misspelled DBDSDC source copy 2026-07-19 11:33:01 +08:00
moluopro e3b9b82636 Remove unused misspelled SBDSDC source copy 2026-07-19 11:32:53 +08:00
Martin Kroeker 3f55cbce38 Fix array/pointer argument mismatch on WoA 2026-07-17 14:31:37 +02:00
Martin Kroeker a7d62fe5de Set version to 0.3.34.dev 2026-07-16 22:06:49 +02:00
Martin Kroeker c604fcf79c Set version to 0.3.34.dev 2026-07-16 22:06:08 +02:00
Martin Kroeker 59907029f6 Merge pull request #5923 from OpenMathLib/release-0.3.0
Merge back from 0.3.34 release to copy tag
2026-07-16 22:05:10 +02:00
Matti Picus ea44d63ad7 copy exports.h to palack-netlib/LAPACKE/include 2026-02-06 17:44:38 +11:00
Matti Picus a5eeb2bb08 move cflag modification in Makefile and fixup lapack c compilation 2026-02-05 21:24:33 +11:00
Matti Picus fc243a36e8 cleanup, set '-fvisibility=hidden' flag 2026-02-05 06:31:18 +11:00
Matti Picus 3c5cea0ca9 remove '-fvisibility=hidden' in cmake LAPACK_CFLAGS 2026-02-05 06:31:18 +11:00
mattip c4d1ab81c6 typo 2026-02-05 06:31:18 +11:00
mattip 5d13317c8f add another OPENBLAS_EXPORT 2026-02-05 06:31:18 +11:00
mattip d0c4d08637 fix position of OPENBLAS_EXPORT, decorate server_win32 function 2026-02-05 06:31:18 +11:00
mattip 1353767996 add OPENBLAS_EXPORT to cblas.h during build, remove for install 2026-02-05 06:31:17 +11:00
mattip da494a58da windows needs declaration to match definition 2026-02-05 06:31:17 +11:00
mattip b53e015473 only use '.hidden' on ELF 2026-02-05 06:31:17 +11:00
mattip 73f34751fd move defines to separate file for kernels/generic/lsame.c 2026-02-05 06:31:17 +11:00
mattip be7da1f111 add visibility=default to exported functions, visibility=hidden to most assembler 2026-02-05 06:31:17 +11:00
341 changed files with 48048 additions and 3830 deletions
+3
View File
@@ -58,8 +58,11 @@ jobs:
run: |
# Force use c910v qemu-user
wget https://github.com/revyos/qemu/commit/222729c7455784dd855216d7a2bec4bd8f2a6800.patch
# Backport the upstream linux-user clone_lock fix
wget -O qemu-clone-lock.patch https://gitlab.com/qemu-project/qemu/-/commit/d22e9aec572396836782e993cb18d598e6012688.patch
cd qemu
patch -p1 < ../222729c7455784dd855216d7a2bec4bd8f2a6800.patch
patch -p1 < ../qemu-clone-lock.patch
export CXXFLAGS="-Wno-error"; export CFLAGS="-Wno-error"
./configure --prefix=$GITHUB_WORKSPACE/qemu-install --target-list=riscv64-linux-user --disable-system
make -j$(nproc)
+2 -2
View File
@@ -593,7 +593,7 @@ jobs:
- name: Build OpenBLAS
run: |
cd build
cmake --build . --target dgemm_thread_safety dgemm_thread_safety_mixed dgemv_thread_safety
cmake --build . --target dgemm_thread_safety dgemm_thread_safety_mixed dgemm_thread_safety_shutdown dgemv_thread_safety
- name: Show ccache status
continue-on-error: true
@@ -611,7 +611,7 @@ jobs:
run: |
cd build
export PATH="$PWD/lib:$PATH"
OPENBLAS_NUM_THREADS=8 OMP_NUM_THREADS=16 ctest -R 'dgemm_thread_safety|dgemm_thread_safety_mixed|dgemv_thread_safety' --output-on-failure
OPENBLAS_NUM_THREADS=8 OMP_NUM_THREADS=16 ctest -R 'dgemm_thread_safety|dgemm_thread_safety_mixed|dgemm_thread_safety_shutdown|dgemv_thread_safety' --output-on-failure
cross_build:
+12 -5
View File
@@ -51,7 +51,7 @@ jobs:
- name: Install APT deps
run: |
sudo apt-get update && \
sudo apt-get install autoconf automake autotools-dev ninja-build make ccache qemu-user-static \
sudo apt-get install autoconf automake autotools-dev ninja-build make ccache \
gcc-14-loongarch64-linux-gnu g++-14-loongarch64-linux-gnu gfortran-14-loongarch64-linux-gnu
- name: Compilation cache
@@ -70,11 +70,18 @@ jobs:
echo "compression = true" >> ~/.ccache/ccache.conf
ccache -s
- name: Disable utest dsdot:dsdot_n_1
- name: Install QEMU 10.2.1
run: |
echo -n > utest/test_dsdot.c
echo "Due to the current version of qemu causing utest cases to fail,"
echo "the utest dsdot:dsdot_n_1 have been temporarily disabled."
qemu_deb="${RUNNER_TEMP}/qemu-user_10.2.1+ds-1ubuntu3_amd64.deb"
qemu_root="${RUNNER_TEMP}/qemu-user-10.2.1"
wget --output-document="${qemu_deb}" \
https://archive.ubuntu.com/ubuntu/pool/universe/q/qemu/qemu-user_10.2.1+ds-1ubuntu3_amd64.deb
echo "e6bdaac070232a44b8657cad84ac0853d84b7167b55af82370af040291f55bd8 ${qemu_deb}" \
| sha256sum --check -
dpkg-deb --extract "${qemu_deb}" "${qemu_root}"
sudo install -m 0755 "${qemu_root}/usr/bin/qemu-loongarch64" \
/usr/local/bin/qemu-loongarch64-static
qemu-loongarch64-static --version
- name: Build OpenBLAS
run: |
-6
View File
@@ -92,12 +92,6 @@ jobs:
echo "compression = true" >> ~/.ccache/ccache.conf
ccache -s
- name: Disable utest dsdot:dsdot_n_1
run: |
echo -n > utest/test_dsdot.c
echo "Due to the qemu versions 7.2 causing utest cases to fail,"
echo "the utest dsdot:dsdot_n_1 have been temporarily disabled."
- name: Build OpenBLAS
run: make CC='ccache clang --target=loongarch64-linux-gnu --sysroot=/opt/loongson-gnu-toolchain-8.3-x86_64-loongarch64-linux-gnu-rc1.3/loongarch64-linux-gnu/sysroot/ -static' FC='ccache loongarch64-linux-gnu-gfortran -static' HOSTCC='ccache clang' CROSS_SUFFIX=llvm- NO_SHARED=1 ${{ matrix.opts }} -j$(nproc)
+1 -1
View File
@@ -56,7 +56,7 @@ jobs:
with:
repository: qemu/qemu
path: qemu
ref: ae35f033b874c627d81d51070187fbf55f0bf1a7
ref: 3e0bcba1ca7d6607ca49a988d165f052a3a53323
- name: build qemu
run: |
+3 -2
View File
@@ -9,7 +9,7 @@ project(OpenBLAS C ASM)
set(OpenBLAS_MAJOR_VERSION 0)
set(OpenBLAS_MINOR_VERSION 3)
set(OpenBLAS_PATCH_VERSION 34)
set(OpenBLAS_PATCH_VERSION 34.dev)
set(OpenBLAS_VERSION "${OpenBLAS_MAJOR_VERSION}.${OpenBLAS_MINOR_VERSION}.${OpenBLAS_PATCH_VERSION}")
@@ -733,7 +733,8 @@ if(NOT NO_CBLAS)
message (STATUS "Generating cblas.h in ${CMAKE_INSTALL_INCLUDEDIR}")
set(CBLAS_H ${CMAKE_BINARY_DIR}/generated/cblas.h)
file(READ ${CMAKE_CURRENT_SOURCE_DIR}/cblas.h CBLAS_H_CONTENTS)
string(REPLACE "common" "openblas_config" CBLAS_H_CONTENTS_NEW "${CBLAS_H_CONTENTS}")
string(REPLACE "common" "openblas_config" CBLAS_H_CONTENTS_NEW2 "${CBLAS_H_CONTENTS}")
string(REPLACE "OPENBLAS_EXPORT " "" CBLAS_H_CONTENTS_NEW "${CBLAS_H_CONTENTS_NEW2}")
# Symbol prefix/suffix settings rename exported functions, not C typedefs.
# Protect callback type names from the textual function-name rewriting below.
+4
View File
@@ -283,4 +283,8 @@ hheei <hheei@users.noreply.github.com>
* Aadityansha Verma <https://github.com/aadityansha06>
* [2026-07-14] Add independent transpose support for C in GEADD (sgeadd/dgeadd/cgeadd/zgeadd).
* Vincent Lovero <https://github.com/vlovero>
* [2026-08-11] ARM v9.2 SME GEMM kernels for Apple M
* Hugo Meiland <hugo@meiland.nl>
* [2026-08-09] Add Cortex-A72 DGEMM 6x8 microkernel and blocking
+3
View File
@@ -158,6 +158,9 @@ x86_64:
wasm:
- added optimized kernels for STRSM and DTRSM
- added a 4x4 WASM SIMD128 GEMM microkernel for SGEMM/DGEMM with matching
4-wide packing and TRMM, using relaxed SIMD madd in the inner loop
- gated leftover WASM TRSM call counters behind OPENBLAS_WASM_TRSM_PROFILE
====================================================================
Version 0.3.32
+3 -3
View File
@@ -59,11 +59,11 @@ endif
endif
ifeq ($(CORE), ARMV9SME)
CCOMMON_OPT += -march=armv9-a+sve2+sme
CCOMMON_OPT += -march=armv9-a+sve2+sme+sme-f64f64
FCOMMON_OPT += -march=armv9-a+sve2
ifdef OS_WINDOWS
ifeq ($(C_COMPILER), CLANG)
CCOMMON_OPT += --aarch64-stack-hazard-size=0
CCOMMON_OPT += -mllvm --aarch64-stack-hazard-size=0
endif
endif
endif
@@ -310,7 +310,7 @@ endif
ifeq ($(CORE), VORTEXM4)
ifneq ($(C_COMPILER), GCC)
CCOMMON_OPT += -march=armv8.4-a+sme
CCOMMON_OPT += -march=armv8.4-a+sme+sme-f64f64
#ifneq ($(APPLECLANG),1)
#override LDFLAGS += -lclang_rt_builtins-aarch64
#endif
+5
View File
@@ -91,11 +91,16 @@ ifdef SYMBOLSUFFIX
@sed 's/\(openblas_complex_\)\([^ ]*\)$(SYMBOLSUFFIX)/\1\2 /g' cblas.tmp > cblas.tmp2
@sed 's/goto[^() ]*/&$(SYMBOLSUFFIX)/g' cblas.tmp2 > cblas.tmp
endif
@sed 's/OPENBLAS_EXPORT //' cblas.tmp > cblas.tmp2
@sed 's/common/openblas_config/g' cblas.tmp2 > cblas.tmp
@sed -e 's/OPENBLAS_DOJOB_CALLBACK_TYPE/openblas_dojob_callback/g' \
-e 's/OPENBLAS_THREADS_CALLBACK_TYPE/openblas_threads_callback/g' \
-e 's/OPENBLAS_XERBLA_HANDLER_TYPE/openblas_xerbla_handler/g' \
-e 's/common/openblas_config/g' \
cblas.tmp > "$(DESTDIR)$(OPENBLAS_INCLUDE_DIR)/cblas.h"
endif
ifneq ($(OSNAME), AIX)
+1 -1
View File
@@ -3,7 +3,7 @@
#
# This library's version
VERSION = 0.3.34
VERSION = 0.3.34.dev
# If you set this prefix, the library name will be lib$(LIBNAMEPREFIX)openblas.a
# and lib$(LIBNAMEPREFIX)openblas.so, with a matching soname in the shared library
+5 -5
View File
@@ -18,10 +18,6 @@ HOSTARCH := $(shell uname -m)
ifeq ($(HOSTARCH), amd64)
HOSTARCH=x86_64
endif
ifeq ($(HOSTARCH), i386)
HOSTARCH=x86
override BINARY=32
endif
# Catch conflicting usage of ARCH in some BSD environments
ifeq ($(ARCH), amd64)
@@ -289,7 +285,7 @@ GEMM_GEMV_FORWARD = 1
SBGEMM_GEMV_FORWARD = 1
BGEMM_GEMV_FORWARD = 1
endif
ifeq ($(ARCH), riscv)
ifeq ($(ARCH), riscv64)
GEMM_GEMV_FORWARD = 1
endif
ifeq ($(ARCH), power)
@@ -604,11 +600,13 @@ ifeq ($(F_COMPILER), GFORTRAN)
ifeq ($(C_COMPILER), $(filter $(C_COMPILER),GCC LSB))
EXPRECISION = 1
CCOMMON_OPT += -DEXPRECISION -m128bit-long-double
CCOMMON_OPT += -fvisibility=hidden
FCOMMON_OPT += -m128bit-long-double
endif
ifeq ($(C_COMPILER), CLANG)
EXPRECISION = 1
CCOMMON_OPT += -DEXPRECISION
CCOMMON_OPT += -fvisibility=hidden
FCOMMON_OPT += -m128bit-long-double
endif
endif
@@ -627,11 +625,13 @@ ifeq ($(F_COMPILER), GFORTRAN)
ifeq ($(C_COMPILER), $(filter $(C_COMPILER),GCC LSB))
EXPRECISION = 1
CCOMMON_OPT += -DEXPRECISION -m128bit-long-double
CCOMMON_OPT += -fvisibility=hidden
FCOMMON_OPT += -m128bit-long-double
endif
ifeq ($(C_COMPILER), CLANG)
EXPRECISION = 1
CCOMMON_OPT += -DEXPRECISION
CCOMMON_OPT += -fvisibility=hidden
FCOMMON_OPT += -m128bit-long-double
endif
endif
+1 -1
View File
@@ -1 +1 @@
CCOMMON_OPT += -msimd128
CCOMMON_OPT += -msimd128 -mrelaxed-simd
+25 -19
View File
@@ -165,7 +165,7 @@ jobs:
- job: OSX_OpenMP
pool:
vmImage: 'macOS-14'
vmImage: 'macOS-15'
steps:
- script: |
brew update
@@ -175,7 +175,7 @@ jobs:
- job: OSX_GCC_Nothreads
pool:
vmImage: 'macOS-14'
vmImage: 'macOS-15'
steps:
- script: |
brew update
@@ -190,6 +190,7 @@ jobs:
make CC=gcc-15 FC=gfortran-15
- job: OSX_LLVM_flangnew
timeoutInMinutes: 100
pool:
vmImage: 'macOS-latest'
variables:
@@ -203,6 +204,7 @@ jobs:
make TARGET=NEHALEM CC=/usr/local/opt/llvm/bin/clang FC=/usr/local/opt/flang/bin/flang NO_SHARED=1
- job: OSX_OpenMP_Clang
timeoutInMinutes: 100
pool:
vmImage: 'macOS-latest'
variables:
@@ -216,6 +218,7 @@ jobs:
make TARGET=CORE2 USE_OPENMP=1 DYNAMIC_ARCH=1 DYNAMIC_LIST='NEHALEM HASWELL SKYLAKEX' CC=/usr/local/opt/llvm/bin/clang NOFORTRAN=1
- job: OSX_OpenMP_Clang_cmake
timeoutInMinutes: 100
pool:
vmImage: 'macOS-latest'
variables:
@@ -223,25 +226,28 @@ jobs:
LIBRARY_PATH: /usr/local/opt/llvm/lib
steps:
- script: |
set -euo pipefail
brew update
brew install llvm libomp
mkdir build
cd build
cmake -DTARGET=CORE2 -DUSE_OPENMP=1 -DINTERFACE64=1 -DDYNAMIC_ARCH=1 -DDYNAMIC_LIST='NEHALEM HASWELL SKYLAKEX' -DCMAKE_C_COMPILER=/usr/local/opt/llvm/bin/clang -DNOFORTRAN=1 -DNO_AVX512=1 ..
make
cmake -DTARGET=CORE2 -DUSE_OPENMP=1 -DINTERFACE64=1 -DDYNAMIC_ARCH=1 -DDYNAMIC_LIST='NEHALEM;HASWELL;SKYLAKEX' -DCMAKE_C_COMPILER=/usr/local/opt/llvm/bin/clang -DNOFORTRAN=1 -DNO_AVX512=1 ..
cmake --build . --parallel "$(sysctl -n hw.logicalcpu)"
ctest
- job: OSX_dynarch_cmake
timeoutInMinutes: 100
pool:
vmImage: 'macOS-14'
vmImage: 'macOS-15'
variables:
LD_LIBRARY_PATH: /usr/local/opt/llvm/lib
LIBRARY_PATH: /usr/local/opt/llvm/lib
steps:
- script: |
set -euo pipefail
mkdir build
cd build
cmake -DTARGET=CORE2 -DDYNAMIC_ARCH=1 -DDYNAMIC_LIST='NEHALEM HASWELL SKYLAKEX' -DCMAKE_C_COMPILER=gcc-13 -DCMAKE_Fortran_COMPILER=gfortran-13 -DBUILD_SHARED_LIBS=ON ..
cmake -DTARGET=CORE2 -DDYNAMIC_ARCH=1 -DDYNAMIC_LIST='NEHALEM;HASWELL;SKYLAKEX' -DCMAKE_C_COMPILER=gcc-13 -DCMAKE_Fortran_COMPILER=gfortran-13 -DBUILD_SHARED_LIBS=ON ..
cmake --build .
ctest
@@ -281,7 +287,7 @@ jobs:
- job: OSX_NDK_ARMV7
pool:
vmImage: 'macOS-14'
vmImage: 'macOS-15'
steps:
- script: |
brew update
@@ -291,19 +297,19 @@ jobs:
- job: OSX_IOS_ARMV8
pool:
vmImage: 'macOS-14'
vmImage: 'macOS-15'
variables:
CC: /Applications/Xcode_16.2.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang
CFLAGS: -O2 -Wno-macro-redefined -isysroot /Applications/Xcode_16.2.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS18.2.sdk -arch arm64 -miphoneos-version-min=10.0
CC: /Applications/Xcode_16.4.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang
CFLAGS: -O2 -Wno-macro-redefined -isysroot /Applications/Xcode_16.4.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS18.5.sdk -arch arm64 -miphoneos-version-min=10.0
steps:
- script: |
ls /Applications/Xcode_16.2.app/Contents/Developer/Platforms/
ls /Applications/Xcode_16.2.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs
ls /Applications/Xcode_16.4.app/Contents/Developer/Platforms/
ls /Applications/Xcode_16.4.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs
make TARGET=ARMV8 DYNAMIC_ARCH=1 NUM_THREADS=32 HOSTCC=clang NOFORTRAN=1
- job: OSX_IOS_ARMV7
pool:
vmImage: 'macOS-14'
vmImage: 'macOS-15'
variables:
CC: /Applications/Xcode_16.2.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang
CFLAGS: -O2 -mno-thumb -Wno-macro-redefined -isysroot /Applications/Xcode_16.2.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS18.2.sdk -arch armv7 -miphoneos-version-min=5.1
@@ -313,15 +319,15 @@ jobs:
- job: OSX_xbuild_DYNAMIC_ARM64
pool:
vmImage: 'macOS-14'
vmImage: 'macOS-15'
variables:
CC: /Applications/Xcode_16.2.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang
CFLAGS: -O2 -Wno-macro-redefined -isysroot /Applications/Xcode_16.2.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.2.sdk -arch arm64
CC: /Applications/Xcode_16.4.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang
CFLAGS: -O2 -Wno-macro-redefined -isysroot /Applications/Xcode_16.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.5.sdk -arch arm64
steps:
- script: |
ls /Applications/Xcode_16.2.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs
/Applications/Xcode_12.2.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -arch arm64 --print-supported-cpus
/Applications/Xcode_16.2.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang --version
ls /Applications/Xcode_16.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs
/Applications/Xcode_16.4.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -arch arm64 --print-supported-cpus
/Applications/Xcode_16.4.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang --version
make TARGET=ARMV8 DYNAMIC_ARCH=1 NUM_THREADS=32 HOSTCC=clang NOFORTRAN=1
- job: ALPINE_MUSL
+35 -1
View File
@@ -95,10 +95,15 @@ else
GOTO_HFLOAT_TARGETS=
endif
ifeq ($(USE_OPENMP), 1)
SMALLSCALING=smallscaling
endif
ifeq ($(OSNAME), WINNT)
goto :: slinpack.goto dlinpack.goto clinpack.goto zlinpack.goto \
scholesky.goto dcholesky.goto ccholesky.goto zcholesky.goto \
cblas_sgemm.goto cblas_dgemm.goto cblas_cgemm.goto cblas_zgemm.goto \
sgemm.goto dgemm.goto cgemm.goto zgemm.goto \
strmm.goto dtrmm.goto ctrmm.goto ztrmm.goto \
strsm.goto dtrsm.goto ctrsm.goto ztrsm.goto \
@@ -268,6 +273,7 @@ mkl :: slinpack.mkl dlinpack.mkl clinpack.mkl zlinpack.mkl \
else
goto :: sgemm.goto dgemm.goto cgemm.goto zgemm.goto \
cblas_sgemm.goto cblas_dgemm.goto cblas_cgemm.goto cblas_zgemm.goto \
strmm.goto dtrmm.goto ctrmm.goto ztrmm.goto \
strsm.goto dtrsm.goto ctrsm.goto ztrsm.goto \
sspr.goto dspr.goto \
@@ -301,7 +307,7 @@ goto :: sgemm.goto dgemm.goto cgemm.goto zgemm.goto \
stpsv.goto dtpsv.goto ctpsv.goto ztpsv.goto \
strsv.goto dtrsv.goto ctrsv.goto ztrsv.goto \
ssymm.goto dsymm.goto csymm.goto zsymm.goto \
smallscaling \
$(SMALLSCALING) \
isamax.goto idamax.goto icamax.goto izamax.goto \
ismax.goto idmax.goto \
isamin.goto idamin.goto icamin.goto izamin.goto \
@@ -681,6 +687,18 @@ endif
sgemm.goto : sgemm.$(SUFFIX) ../$(LIBNAME)
$(CC) $(CFLAGS) -o $(@F) $^ $(CEXTRALIB) $(EXTRALIB) $(FEXTRALIB) -lm
cblas_sgemm.goto : cblas_sgemm.$(SUFFIX) ../$(LIBNAME)
$(CC) $(CFLAGS) -o $(@F) $^ $(CEXTRALIB) $(EXTRALIB) $(FEXTRALIB) -lm
cblas_dgemm.goto : cblas_dgemm.$(SUFFIX) ../$(LIBNAME)
$(CC) $(CFLAGS) -o $(@F) $^ $(CEXTRALIB) $(EXTRALIB) $(FEXTRALIB) -lm
cblas_cgemm.goto : cblas_cgemm.$(SUFFIX) ../$(LIBNAME)
$(CC) $(CFLAGS) -o $(@F) $^ $(CEXTRALIB) $(EXTRALIB) $(FEXTRALIB) -lm
cblas_zgemm.goto : cblas_zgemm.$(SUFFIX) ../$(LIBNAME)
$(CC) $(CFLAGS) -o $(@F) $^ $(CEXTRALIB) $(EXTRALIB) $(FEXTRALIB) -lm
sgemm.acml : sgemm.$(SUFFIX)
-$(CC) $(CFLAGS) -o $(@F) $^ $(LIBACML) $(CEXTRALIB) $(EXTRALIB) $(FEXTRALIB)
@@ -3027,6 +3045,18 @@ cgemm.$(SUFFIX) : gemm.c
zgemm.$(SUFFIX) : gemm.c
$(CC) $(CFLAGS) -c -DCOMPLEX -DDOUBLE -o $(@F) $^
cblas_sgemm.$(SUFFIX) : cblasgemm.c
$(CC) $(CFLAGS) -c -UCOMPLEX -UDOUBLE -o $(@F) $^
cblas_dgemm.$(SUFFIX) : cblasgemm.c
$(CC) $(CFLAGS) -c -UCOMPLEX -DDOUBLE -o $(@F) $^
cblas_cgemm.$(SUFFIX) : cblasgemm.c
$(CC) $(CFLAGS) -c -DCOMPLEX -UDOUBLE -o $(@F) $^
cblas_zgemm.$(SUFFIX) : cblasgemm.c
$(CC) $(CFLAGS) -c -DCOMPLEX -DDOUBLE -o $(@F) $^
ssymm.$(SUFFIX) : symm.c
$(CC) $(CFLAGS) -c -UCOMPLEX -UDOUBLE -o $(@F) $^
@@ -3533,7 +3563,11 @@ zomatcopy.$(SUFFIX) : omatcopy.c
smallscaling: smallscaling.c ../$(LIBNAME)
ifeq ($(C_COMPILER), GCC)
$(CC) $(CFLAGS) -o $(@F) $^ $(EXTRALIB) -fopenmp -lm -lpthread
else
$(CC) $(CFLAGS) -o $(@F) $^ $(EXTRALIB) -quak -openmp -lm -lpthread
endif
clean ::
@rm -f *.goto *.mkl *.acml *.atlas *.veclib *.essl smallscaling
+233
View File
@@ -0,0 +1,233 @@
/***************************************************************************
Copyright (c) 2014, The OpenBLAS Project
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in
the documentation and/or other materials provided with the
distribution.
3. Neither the name of the OpenBLAS project nor the names of
its contributors may be used to endorse or promote products
derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE OPENBLAS PROJECT OR CONTRIBUTORS BE
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*****************************************************************************/
#include "bench.h"
#include "cblas.h"
#undef GEMM
#ifndef COMPLEX
#ifdef DOUBLE
#define GEMM cblas_dgemm
#elif defined(BFLOAT16) && defined(BGEMM)
#define GEMM cblas_bgemm
#elif defined(BFLOAT16)
#define GEMM cblas_sbgemm
#undef IFLOAT
#define IFLOAT bfloat16
#elif defined(HFLOAT16)
#define GEMM cblas_shgemm
#undef IFLOAT
#define IFLOAT hfloat16
#else
#define GEMM cblas_sgemm
#undef IFLOAT
#define IFLOAT float
#endif
#else
#ifdef DOUBLE
#define GEMM cblas_zgemm
#else
#define GEMM cblas_cgemm
#endif
#endif
int main(int argc, char *argv[]){
IFLOAT *a, *b;
//IFLOAT *aa, *bb;
FLOAT *c;
//FLOAT *cc;
#ifdef BGEMM
blasint one=1;
blasint two=2;
float alpha_in[] = {1.0, 0.0};
float beta_in[] = {0.0, 0.0};
FLOAT alpha[2], beta[2];
sbstobf16_(&two, alpha_in, &one, alpha, &one);
sbstobf16_(&two, beta_in, &one, beta, &one);
#else
#ifdef COMPLEX
FLOAT alpha[] = {1.0, 0.0};
FLOAT beta [] = {0.0, 0.0};
#else
FLOAT alpha = 1.0;
FLOAT beta = 0.0;
#endif
#endif
CBLAS_TRANSPOSE transa = CblasNoTrans;
CBLAS_TRANSPOSE transb = CblasNoTrans;
char transac, transbc;
blasint m, n, k, i, j, lda, ldb, ldc;
int loops = 1;
int has_param_m = 0;
int has_param_n = 0;
int has_param_k = 0;
int has_param_lda = 0;
int has_param_ldb = 0;
char *p;
//blasint sme=0;
int from = 1;
int to = 200;
int step = 1;
double time1, timeg;
argc--;argv++;
if (argc > 0) { from = atol(*argv); argc--; argv++; }
if (argc > 0) { to = MAX(atol(*argv), from); argc--; argv++; }
if (argc > 0) { step = atol(*argv); argc--; argv++; }
if ((p = getenv("OPENBLAS_TRANS"))) {
transa=(*p=='N') ? CblasNoTrans : CblasTrans;
transb=(*p=='N') ? CblasNoTrans : CblasTrans;
}
if ((p = getenv("OPENBLAS_TRANSA"))) {
transa=(*p=='N') ? CblasNoTrans : CblasTrans;
}
if ((p = getenv("OPENBLAS_TRANSB"))) {
transb=(*p=='N') ? CblasNoTrans : CblasTrans;
}
transac=(transa==CblasNoTrans) ? 'N' : 'T';
transbc=(transb==CblasNoTrans) ? 'N' : 'T';
fprintf(stderr, "From : %3d To : %3d Step=%d : Transa=%c : Transb=%c\n", from, to, step, transac, transbc);
p = getenv("OPENBLAS_LOOPS");
if ( p != NULL ) {
loops = atoi(p);
}
if ((p = getenv("OPENBLAS_PARAM_M"))) {
m = atoi(p);
has_param_m=1;
} else {
m = to;
}
if ((p = getenv("OPENBLAS_PARAM_N"))) {
n = atoi(p);
has_param_n=1;
} else {
n = to;
}
if ((p = getenv("OPENBLAS_PARAM_K"))) {
k = atoi(p);
has_param_k=1;
} else {
k = to;
}
if ((p = getenv("OPENBLAS_PARAM_LDA"))) {
lda = atoi(p);
has_param_lda=1;
}
if ((p = getenv("OPENBLAS_PARAM_LDB"))) {
ldb = atoi(p);
has_param_ldb=1;
}
if (( a = (IFLOAT *)malloc(sizeof(IFLOAT) * m * k * COMPSIZE)) == NULL) {
fprintf(stderr,"Out of Memory!!\n");exit(1);
}
if (( b = (IFLOAT *)malloc(sizeof(IFLOAT) * k * n * COMPSIZE)) == NULL) {
fprintf(stderr,"Out of Memory!!\n");exit(1);
}
if (( c = (FLOAT *)malloc(sizeof(FLOAT) * m * n * COMPSIZE)) == NULL) {
fprintf(stderr,"Out of Memory!!\n");exit(1);
}
//if (( aa = (IFLOAT *)malloc(sizeof(IFLOAT) * m * k * COMPSIZE)) == NULL) {
// fprintf(stderr,"Out of Memory!!\n");exit(1);
//}
//if (( bb = (IFLOAT *)malloc(sizeof(IFLOAT) * k * n * COMPSIZE)) == NULL) {
// fprintf(stderr,"Out of Memory!!\n");exit(1);
//}
//if (( cc = (FLOAT *)malloc(sizeof(FLOAT) * m * n * COMPSIZE)) == NULL) {
// fprintf(stderr,"Out of Memory!!\n");exit(1);
//}
#ifdef __linux
srandom(getpid());
#endif
for (i = 0; i < m * k * COMPSIZE; i++) {
a[i] = ((IFLOAT) rand() / (IFLOAT) RAND_MAX) - 0.5;
// aa[i]=a[i];
}
for (i = 0; i < k * n * COMPSIZE; i++) {
b[i] = ((IFLOAT) rand() / (IFLOAT) RAND_MAX) - 0.5;
// bb[i]=b[i];
}
for (i = 0; i < m * n * COMPSIZE; i++) {
c[i] = ((FLOAT) rand() / (FLOAT) RAND_MAX) - 0.5;
// cc[i]=c[i];
}
fprintf(stderr, " SIZE Flops Time\n");
for (i = from; i <= to; i += step) {
timeg=0;
if (!has_param_m) { m = i; }
if (!has_param_n) { n = i; }
if (!has_param_k) { k = i; }
if (!has_param_lda) {
if (transa == CblasNoTrans) { lda = k; }
else { lda = m; }
}
if (!has_param_ldb) {
if (transb == CblasNoTrans) { ldb = n; }
else { ldb = k; }
}
ldc = n;
fprintf(stderr, " M=%4d, N=%4d, K=%4d : ", (int)m, (int)n, (int)k);
begin();
for (j=0; j<loops; j++) {
GEMM (CblasRowMajor,transa, transb, m, n, k, alpha, a, lda, b, ldb, beta, c, ldc);
}
// for (ii = 0; ii < m * n * COMPSIZE; ii++) if (fabsf(c[ii]-cc[ii])>1.5e-5){fprintf(stderr,"mismatch %d %f != %f: %g\n",ii,c[ii],cc[ii],fabsf(c[ii]-cc[ii]));}
end();
time1 = getsec();
timeg = time1/loops;
fprintf(stderr,
" %10.2f MFlops %10.6f sec\n",
COMPSIZE * COMPSIZE * 2. * (double)k * (double)m * (double)n / timeg * 1.e-6, time1);
}
return 0;
}
// void main(int argc, char *argv[]) __attribute__((weak, alias("MAIN__")));
+3 -1
View File
@@ -1,3 +1,4 @@
//#pragma clang optimize off
/***************************************************************************
Copyright (c) 2014, The OpenBLAS Project
All rights reserved.
@@ -45,6 +46,7 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#define IFLOAT hfloat16
#else
#define GEMM BLASFUNC(sgemm)
#undef IFLOAT
#define IFLOAT float
#endif
@@ -186,7 +188,7 @@ int main(int argc, char *argv[]){
timeg = time1/loops;
fprintf(stderr,
" %10.2f MFlops %10.6f sec\n",
" %10.2lf MFlops %10.6f sec\n",
COMPSIZE * COMPSIZE * 2. * (double)k * (double)m * (double)n / timeg * 1.e-6, time1);
}
+252 -231
View File
@@ -38,26 +38,26 @@ extern "C" {
#endif /* __cplusplus */
/*Set the number of threads on runtime.*/
void openblas_set_num_threads(int num_threads);
void goto_set_num_threads(int num_threads);
int openblas_set_num_threads_local(int num_threads);
OPENBLAS_EXPORT void openblas_set_num_threads(int num_threads);
OPENBLAS_EXPORT void goto_set_num_threads(int num_threads);
OPENBLAS_EXPORT int openblas_set_num_threads_local(int num_threads);
/*Get the number of threads on runtime.*/
int openblas_get_num_threads(void);
OPENBLAS_EXPORT int openblas_get_num_threads(void);
/*Get the number of physical processors (cores).*/
int openblas_get_num_procs(void);
OPENBLAS_EXPORT int openblas_get_num_procs(void);
/*Get the build configure on runtime.*/
char* openblas_get_config(void);
OPENBLAS_EXPORT char* openblas_get_config(void);
/*Get the CPU corename on runtime.*/
char* openblas_get_corename(void);
OPENBLAS_EXPORT char* openblas_get_corename(void);
/*Set the threading backend to a custom callback.*/
typedef void (*openblas_dojob_callback)(int thread_num, void *jobdata, int dojob_data);
typedef void (*openblas_threads_callback)(int sync, openblas_dojob_callback dojob, int numjobs, size_t jobdata_elsize, void *jobdata, int dojob_data);
void openblas_set_threads_callback_function(openblas_threads_callback callback);
OPENBLAS_EXPORT void openblas_set_threads_callback_function(openblas_threads_callback callback);
/* Replace the XERBLA handler for this OpenBLAS instance and return the
* previous handler. Passing NULL restores the default. Callbacks may run
@@ -71,17 +71,38 @@ typedef void (*openblas_xerbla_handler)(const char *name,
const blasint *info,
size_t name_length);
#endif
openblas_xerbla_handler openblas_set_xerbla(openblas_xerbla_handler handler);
OPENBLAS_EXPORT openblas_xerbla_handler openblas_set_xerbla(openblas_xerbla_handler handler);
/* Cooperative cancellation of in-flight operations.
*
* Every thread owns a pointer-sized generation slot;
* openblas_cancel_token() returns its (stable) address for the calling
* thread. Supported compute drivers (currently the level-3 GEMM drivers)
* advance the slot to a fresh even generation at operation entry on the
* issuing thread and poll it during the computation. To cancel the
* operation in flight on a thread, load that thread's slot value, verify
* the operation you mean to cancel is still the current one, and call
* openblas_cancel(token, loaded_value): the cancel bit (bit 0) is set iff
* the slot still holds the loaded value, so stale requests cannot affect
* later operations. A cancelled operation leaves its output in an
* unspecified, partially-updated state; the caller must discard the
* result. The library itself stays consistent and can service further
* calls. openblas_cancel_token() may return NULL if per-thread state
* cannot be allocated; cancellation is then unavailable on that thread
* (openblas_cancel(NULL, ...) is a harmless no-op). These symbols are
* exported without any symbol prefix/suffix decoration. */
size_t *openblas_cancel_token(void);
OPENBLAS_EXPORT void openblas_cancel(size_t *token, size_t loaded_token);
#ifdef OPENBLAS_OS_LINUX
/* Sets thread affinity for OpenBLAS threads. `thread_idx` is in [0, openblas_get_num_threads()-1]. */
int openblas_setaffinity(int thread_idx, size_t cpusetsize, cpu_set_t* cpu_set);
OPENBLAS_EXPORT int openblas_setaffinity(int thread_idx, size_t cpusetsize, cpu_set_t* cpu_set);
/* Queries thread affinity for OpenBLAS threads. `thread_idx` is in [0, openblas_get_num_threads()-1]. */
int openblas_getaffinity(int thread_idx, size_t cpusetsize, cpu_set_t* cpu_set);
OPENBLAS_EXPORT int openblas_getaffinity(int thread_idx, size_t cpusetsize, cpu_set_t* cpu_set);
#endif
/* Get the parallelization type which is used by OpenBLAS */
int openblas_get_parallel(void);
OPENBLAS_EXPORT int openblas_get_parallel(void);
/* OpenBLAS is compiled for sequential use */
#define OPENBLAS_SEQUENTIAL 0
/* OpenBLAS is compiled using normal threading model */
@@ -108,400 +129,400 @@ typedef enum CBLAS_DIAG {CblasNonUnit=131, CblasUnit=132} CBLAS_DIAG;
typedef enum CBLAS_SIDE {CblasLeft=141, CblasRight=142} CBLAS_SIDE;
typedef CBLAS_ORDER CBLAS_LAYOUT;
float cblas_sdsdot(OPENBLAS_CONST blasint n, OPENBLAS_CONST float alpha, OPENBLAS_CONST float *x, OPENBLAS_CONST blasint incx, OPENBLAS_CONST float *y, OPENBLAS_CONST blasint incy);
double cblas_dsdot (OPENBLAS_CONST blasint n, OPENBLAS_CONST float *x, OPENBLAS_CONST blasint incx, OPENBLAS_CONST float *y, OPENBLAS_CONST blasint incy);
float cblas_sdot(OPENBLAS_CONST blasint n, OPENBLAS_CONST float *x, OPENBLAS_CONST blasint incx, OPENBLAS_CONST float *y, OPENBLAS_CONST blasint incy);
double cblas_ddot(OPENBLAS_CONST blasint n, OPENBLAS_CONST double *x, OPENBLAS_CONST blasint incx, OPENBLAS_CONST double *y, OPENBLAS_CONST blasint incy);
OPENBLAS_EXPORT float cblas_sdsdot(OPENBLAS_CONST blasint n, OPENBLAS_CONST float alpha, OPENBLAS_CONST float *x, OPENBLAS_CONST blasint incx, OPENBLAS_CONST float *y, OPENBLAS_CONST blasint incy);
OPENBLAS_EXPORT double cblas_dsdot (OPENBLAS_CONST blasint n, OPENBLAS_CONST float *x, OPENBLAS_CONST blasint incx, OPENBLAS_CONST float *y, OPENBLAS_CONST blasint incy);
OPENBLAS_EXPORT float cblas_sdot(OPENBLAS_CONST blasint n, OPENBLAS_CONST float *x, OPENBLAS_CONST blasint incx, OPENBLAS_CONST float *y, OPENBLAS_CONST blasint incy);
OPENBLAS_EXPORT double cblas_ddot(OPENBLAS_CONST blasint n, OPENBLAS_CONST double *x, OPENBLAS_CONST blasint incx, OPENBLAS_CONST double *y, OPENBLAS_CONST blasint incy);
openblas_complex_float cblas_cdotu(OPENBLAS_CONST blasint n, OPENBLAS_CONST void *x, OPENBLAS_CONST blasint incx, OPENBLAS_CONST void *y, OPENBLAS_CONST blasint incy);
openblas_complex_float cblas_cdotc(OPENBLAS_CONST blasint n, OPENBLAS_CONST void *x, OPENBLAS_CONST blasint incx, OPENBLAS_CONST void *y, OPENBLAS_CONST blasint incy);
openblas_complex_double cblas_zdotu(OPENBLAS_CONST blasint n, OPENBLAS_CONST void *x, OPENBLAS_CONST blasint incx, OPENBLAS_CONST void *y, OPENBLAS_CONST blasint incy);
openblas_complex_double cblas_zdotc(OPENBLAS_CONST blasint n, OPENBLAS_CONST void *x, OPENBLAS_CONST blasint incx, OPENBLAS_CONST void *y, OPENBLAS_CONST blasint incy);
OPENBLAS_EXPORT openblas_complex_float cblas_cdotu(OPENBLAS_CONST blasint n, OPENBLAS_CONST void *x, OPENBLAS_CONST blasint incx, OPENBLAS_CONST void *y, OPENBLAS_CONST blasint incy);
OPENBLAS_EXPORT openblas_complex_float cblas_cdotc(OPENBLAS_CONST blasint n, OPENBLAS_CONST void *x, OPENBLAS_CONST blasint incx, OPENBLAS_CONST void *y, OPENBLAS_CONST blasint incy);
OPENBLAS_EXPORT openblas_complex_double cblas_zdotu(OPENBLAS_CONST blasint n, OPENBLAS_CONST void *x, OPENBLAS_CONST blasint incx, OPENBLAS_CONST void *y, OPENBLAS_CONST blasint incy);
OPENBLAS_EXPORT openblas_complex_double cblas_zdotc(OPENBLAS_CONST blasint n, OPENBLAS_CONST void *x, OPENBLAS_CONST blasint incx, OPENBLAS_CONST void *y, OPENBLAS_CONST blasint incy);
void cblas_cdotu_sub(OPENBLAS_CONST blasint n, OPENBLAS_CONST void *x, OPENBLAS_CONST blasint incx, OPENBLAS_CONST void *y, OPENBLAS_CONST blasint incy, void *ret);
void cblas_cdotc_sub(OPENBLAS_CONST blasint n, OPENBLAS_CONST void *x, OPENBLAS_CONST blasint incx, OPENBLAS_CONST void *y, OPENBLAS_CONST blasint incy, void *ret);
void cblas_zdotu_sub(OPENBLAS_CONST blasint n, OPENBLAS_CONST void *x, OPENBLAS_CONST blasint incx, OPENBLAS_CONST void *y, OPENBLAS_CONST blasint incy, void *ret);
void cblas_zdotc_sub(OPENBLAS_CONST blasint n, OPENBLAS_CONST void *x, OPENBLAS_CONST blasint incx, OPENBLAS_CONST void *y, OPENBLAS_CONST blasint incy, void *ret);
OPENBLAS_EXPORT void cblas_cdotu_sub(OPENBLAS_CONST blasint n, OPENBLAS_CONST void *x, OPENBLAS_CONST blasint incx, OPENBLAS_CONST void *y, OPENBLAS_CONST blasint incy, void *ret);
OPENBLAS_EXPORT void cblas_cdotc_sub(OPENBLAS_CONST blasint n, OPENBLAS_CONST void *x, OPENBLAS_CONST blasint incx, OPENBLAS_CONST void *y, OPENBLAS_CONST blasint incy, void *ret);
OPENBLAS_EXPORT void cblas_zdotu_sub(OPENBLAS_CONST blasint n, OPENBLAS_CONST void *x, OPENBLAS_CONST blasint incx, OPENBLAS_CONST void *y, OPENBLAS_CONST blasint incy, void *ret);
OPENBLAS_EXPORT void cblas_zdotc_sub(OPENBLAS_CONST blasint n, OPENBLAS_CONST void *x, OPENBLAS_CONST blasint incx, OPENBLAS_CONST void *y, OPENBLAS_CONST blasint incy, void *ret);
float cblas_sasum (OPENBLAS_CONST blasint n, OPENBLAS_CONST float *x, OPENBLAS_CONST blasint incx);
double cblas_dasum (OPENBLAS_CONST blasint n, OPENBLAS_CONST double *x, OPENBLAS_CONST blasint incx);
float cblas_scasum(OPENBLAS_CONST blasint n, OPENBLAS_CONST void *x, OPENBLAS_CONST blasint incx);
double cblas_dzasum(OPENBLAS_CONST blasint n, OPENBLAS_CONST void *x, OPENBLAS_CONST blasint incx);
OPENBLAS_EXPORT float cblas_sasum (OPENBLAS_CONST blasint n, OPENBLAS_CONST float *x, OPENBLAS_CONST blasint incx);
OPENBLAS_EXPORT double cblas_dasum (OPENBLAS_CONST blasint n, OPENBLAS_CONST double *x, OPENBLAS_CONST blasint incx);
OPENBLAS_EXPORT float cblas_scasum(OPENBLAS_CONST blasint n, OPENBLAS_CONST void *x, OPENBLAS_CONST blasint incx);
OPENBLAS_EXPORT double cblas_dzasum(OPENBLAS_CONST blasint n, OPENBLAS_CONST void *x, OPENBLAS_CONST blasint incx);
float cblas_ssum (OPENBLAS_CONST blasint n, OPENBLAS_CONST float *x, OPENBLAS_CONST blasint incx);
double cblas_dsum (OPENBLAS_CONST blasint n, OPENBLAS_CONST double *x, OPENBLAS_CONST blasint incx);
float cblas_scsum(OPENBLAS_CONST blasint n, OPENBLAS_CONST void *x, OPENBLAS_CONST blasint incx);
double cblas_dzsum(OPENBLAS_CONST blasint n, OPENBLAS_CONST void *x, OPENBLAS_CONST blasint incx);
OPENBLAS_EXPORT float cblas_ssum (OPENBLAS_CONST blasint n, OPENBLAS_CONST float *x, OPENBLAS_CONST blasint incx);
OPENBLAS_EXPORT double cblas_dsum (OPENBLAS_CONST blasint n, OPENBLAS_CONST double *x, OPENBLAS_CONST blasint incx);
OPENBLAS_EXPORT float cblas_scsum(OPENBLAS_CONST blasint n, OPENBLAS_CONST void *x, OPENBLAS_CONST blasint incx);
OPENBLAS_EXPORT double cblas_dzsum(OPENBLAS_CONST blasint n, OPENBLAS_CONST void *x, OPENBLAS_CONST blasint incx);
float cblas_snrm2 (OPENBLAS_CONST blasint N, OPENBLAS_CONST float *X, OPENBLAS_CONST blasint incX);
double cblas_dnrm2 (OPENBLAS_CONST blasint N, OPENBLAS_CONST double *X, OPENBLAS_CONST blasint incX);
float cblas_scnrm2(OPENBLAS_CONST blasint N, OPENBLAS_CONST void *X, OPENBLAS_CONST blasint incX);
double cblas_dznrm2(OPENBLAS_CONST blasint N, OPENBLAS_CONST void *X, OPENBLAS_CONST blasint incX);
OPENBLAS_EXPORT float cblas_snrm2 (OPENBLAS_CONST blasint N, OPENBLAS_CONST float *X, OPENBLAS_CONST blasint incX);
OPENBLAS_EXPORT double cblas_dnrm2 (OPENBLAS_CONST blasint N, OPENBLAS_CONST double *X, OPENBLAS_CONST blasint incX);
OPENBLAS_EXPORT float cblas_scnrm2(OPENBLAS_CONST blasint N, OPENBLAS_CONST void *X, OPENBLAS_CONST blasint incX);
OPENBLAS_EXPORT double cblas_dznrm2(OPENBLAS_CONST blasint N, OPENBLAS_CONST void *X, OPENBLAS_CONST blasint incX);
CBLAS_INDEX cblas_isamax(OPENBLAS_CONST blasint n, OPENBLAS_CONST float *x, OPENBLAS_CONST blasint incx);
CBLAS_INDEX cblas_idamax(OPENBLAS_CONST blasint n, OPENBLAS_CONST double *x, OPENBLAS_CONST blasint incx);
CBLAS_INDEX cblas_icamax(OPENBLAS_CONST blasint n, OPENBLAS_CONST void *x, OPENBLAS_CONST blasint incx);
CBLAS_INDEX cblas_izamax(OPENBLAS_CONST blasint n, OPENBLAS_CONST void *x, OPENBLAS_CONST blasint incx);
OPENBLAS_EXPORT CBLAS_INDEX cblas_isamax(OPENBLAS_CONST blasint n, OPENBLAS_CONST float *x, OPENBLAS_CONST blasint incx);
OPENBLAS_EXPORT CBLAS_INDEX cblas_idamax(OPENBLAS_CONST blasint n, OPENBLAS_CONST double *x, OPENBLAS_CONST blasint incx);
OPENBLAS_EXPORT CBLAS_INDEX cblas_icamax(OPENBLAS_CONST blasint n, OPENBLAS_CONST void *x, OPENBLAS_CONST blasint incx);
OPENBLAS_EXPORT CBLAS_INDEX cblas_izamax(OPENBLAS_CONST blasint n, OPENBLAS_CONST void *x, OPENBLAS_CONST blasint incx);
CBLAS_INDEX cblas_isamin(OPENBLAS_CONST blasint n, OPENBLAS_CONST float *x, OPENBLAS_CONST blasint incx);
CBLAS_INDEX cblas_idamin(OPENBLAS_CONST blasint n, OPENBLAS_CONST double *x, OPENBLAS_CONST blasint incx);
CBLAS_INDEX cblas_icamin(OPENBLAS_CONST blasint n, OPENBLAS_CONST void *x, OPENBLAS_CONST blasint incx);
CBLAS_INDEX cblas_izamin(OPENBLAS_CONST blasint n, OPENBLAS_CONST void *x, OPENBLAS_CONST blasint incx);
OPENBLAS_EXPORT CBLAS_INDEX cblas_isamin(OPENBLAS_CONST blasint n, OPENBLAS_CONST float *x, OPENBLAS_CONST blasint incx);
OPENBLAS_EXPORT CBLAS_INDEX cblas_idamin(OPENBLAS_CONST blasint n, OPENBLAS_CONST double *x, OPENBLAS_CONST blasint incx);
OPENBLAS_EXPORT CBLAS_INDEX cblas_icamin(OPENBLAS_CONST blasint n, OPENBLAS_CONST void *x, OPENBLAS_CONST blasint incx);
OPENBLAS_EXPORT CBLAS_INDEX cblas_izamin(OPENBLAS_CONST blasint n, OPENBLAS_CONST void *x, OPENBLAS_CONST blasint incx);
float cblas_samax(OPENBLAS_CONST blasint n, OPENBLAS_CONST float *x, OPENBLAS_CONST blasint incx);
double cblas_damax(OPENBLAS_CONST blasint n, OPENBLAS_CONST double *x, OPENBLAS_CONST blasint incx);
float cblas_scamax(OPENBLAS_CONST blasint n, OPENBLAS_CONST void *x, OPENBLAS_CONST blasint incx);
double cblas_dzamax(OPENBLAS_CONST blasint n, OPENBLAS_CONST void *x, OPENBLAS_CONST blasint incx);
OPENBLAS_EXPORT float cblas_samax(OPENBLAS_CONST blasint n, OPENBLAS_CONST float *x, OPENBLAS_CONST blasint incx);
OPENBLAS_EXPORT double cblas_damax(OPENBLAS_CONST blasint n, OPENBLAS_CONST double *x, OPENBLAS_CONST blasint incx);
OPENBLAS_EXPORT float cblas_scamax(OPENBLAS_CONST blasint n, OPENBLAS_CONST void *x, OPENBLAS_CONST blasint incx);
OPENBLAS_EXPORT double cblas_dzamax(OPENBLAS_CONST blasint n, OPENBLAS_CONST void *x, OPENBLAS_CONST blasint incx);
float cblas_samin(OPENBLAS_CONST blasint n, OPENBLAS_CONST float *x, OPENBLAS_CONST blasint incx);
double cblas_damin(OPENBLAS_CONST blasint n, OPENBLAS_CONST double *x, OPENBLAS_CONST blasint incx);
float cblas_scamin(OPENBLAS_CONST blasint n, OPENBLAS_CONST void *x, OPENBLAS_CONST blasint incx);
double cblas_dzamin(OPENBLAS_CONST blasint n, OPENBLAS_CONST void *x, OPENBLAS_CONST blasint incx);
OPENBLAS_EXPORT float cblas_samin(OPENBLAS_CONST blasint n, OPENBLAS_CONST float *x, OPENBLAS_CONST blasint incx);
OPENBLAS_EXPORT double cblas_damin(OPENBLAS_CONST blasint n, OPENBLAS_CONST double *x, OPENBLAS_CONST blasint incx);
OPENBLAS_EXPORT float cblas_scamin(OPENBLAS_CONST blasint n, OPENBLAS_CONST void *x, OPENBLAS_CONST blasint incx);
OPENBLAS_EXPORT double cblas_dzamin(OPENBLAS_CONST blasint n, OPENBLAS_CONST void *x, OPENBLAS_CONST blasint incx);
CBLAS_INDEX cblas_ismax(OPENBLAS_CONST blasint n, OPENBLAS_CONST float *x, OPENBLAS_CONST blasint incx);
CBLAS_INDEX cblas_idmax(OPENBLAS_CONST blasint n, OPENBLAS_CONST double *x, OPENBLAS_CONST blasint incx);
CBLAS_INDEX cblas_icmax(OPENBLAS_CONST blasint n, OPENBLAS_CONST void *x, OPENBLAS_CONST blasint incx);
CBLAS_INDEX cblas_izmax(OPENBLAS_CONST blasint n, OPENBLAS_CONST void *x, OPENBLAS_CONST blasint incx);
OPENBLAS_EXPORT CBLAS_INDEX cblas_ismax(OPENBLAS_CONST blasint n, OPENBLAS_CONST float *x, OPENBLAS_CONST blasint incx);
OPENBLAS_EXPORT CBLAS_INDEX cblas_idmax(OPENBLAS_CONST blasint n, OPENBLAS_CONST double *x, OPENBLAS_CONST blasint incx);
OPENBLAS_EXPORT CBLAS_INDEX cblas_icmax(OPENBLAS_CONST blasint n, OPENBLAS_CONST void *x, OPENBLAS_CONST blasint incx);
OPENBLAS_EXPORT CBLAS_INDEX cblas_izmax(OPENBLAS_CONST blasint n, OPENBLAS_CONST void *x, OPENBLAS_CONST blasint incx);
CBLAS_INDEX cblas_ismin(OPENBLAS_CONST blasint n, OPENBLAS_CONST float *x, OPENBLAS_CONST blasint incx);
CBLAS_INDEX cblas_idmin(OPENBLAS_CONST blasint n, OPENBLAS_CONST double *x, OPENBLAS_CONST blasint incx);
CBLAS_INDEX cblas_icmin(OPENBLAS_CONST blasint n, OPENBLAS_CONST void *x, OPENBLAS_CONST blasint incx);
CBLAS_INDEX cblas_izmin(OPENBLAS_CONST blasint n, OPENBLAS_CONST void *x, OPENBLAS_CONST blasint incx);
OPENBLAS_EXPORT CBLAS_INDEX cblas_ismin(OPENBLAS_CONST blasint n, OPENBLAS_CONST float *x, OPENBLAS_CONST blasint incx);
OPENBLAS_EXPORT CBLAS_INDEX cblas_idmin(OPENBLAS_CONST blasint n, OPENBLAS_CONST double *x, OPENBLAS_CONST blasint incx);
OPENBLAS_EXPORT CBLAS_INDEX cblas_icmin(OPENBLAS_CONST blasint n, OPENBLAS_CONST void *x, OPENBLAS_CONST blasint incx);
OPENBLAS_EXPORT CBLAS_INDEX cblas_izmin(OPENBLAS_CONST blasint n, OPENBLAS_CONST void *x, OPENBLAS_CONST blasint incx);
void cblas_saxpy(OPENBLAS_CONST blasint n, OPENBLAS_CONST float alpha, OPENBLAS_CONST float *x, OPENBLAS_CONST blasint incx, float *y, OPENBLAS_CONST blasint incy);
void cblas_daxpy(OPENBLAS_CONST blasint n, OPENBLAS_CONST double alpha, OPENBLAS_CONST double *x, OPENBLAS_CONST blasint incx, double *y, OPENBLAS_CONST blasint incy);
void cblas_caxpy(OPENBLAS_CONST blasint n, OPENBLAS_CONST void *alpha, OPENBLAS_CONST void *x, OPENBLAS_CONST blasint incx, void *y, OPENBLAS_CONST blasint incy);
void cblas_zaxpy(OPENBLAS_CONST blasint n, OPENBLAS_CONST void *alpha, OPENBLAS_CONST void *x, OPENBLAS_CONST blasint incx, void *y, OPENBLAS_CONST blasint incy);
OPENBLAS_EXPORT void cblas_saxpy(OPENBLAS_CONST blasint n, OPENBLAS_CONST float alpha, OPENBLAS_CONST float *x, OPENBLAS_CONST blasint incx, float *y, OPENBLAS_CONST blasint incy);
OPENBLAS_EXPORT void cblas_daxpy(OPENBLAS_CONST blasint n, OPENBLAS_CONST double alpha, OPENBLAS_CONST double *x, OPENBLAS_CONST blasint incx, double *y, OPENBLAS_CONST blasint incy);
OPENBLAS_EXPORT void cblas_caxpy(OPENBLAS_CONST blasint n, OPENBLAS_CONST void *alpha, OPENBLAS_CONST void *x, OPENBLAS_CONST blasint incx, void *y, OPENBLAS_CONST blasint incy);
OPENBLAS_EXPORT void cblas_zaxpy(OPENBLAS_CONST blasint n, OPENBLAS_CONST void *alpha, OPENBLAS_CONST void *x, OPENBLAS_CONST blasint incx, void *y, OPENBLAS_CONST blasint incy);
void cblas_caxpyc(OPENBLAS_CONST blasint n, OPENBLAS_CONST void *alpha, OPENBLAS_CONST void *x, OPENBLAS_CONST blasint incx, void *y, OPENBLAS_CONST blasint incy);
void cblas_zaxpyc(OPENBLAS_CONST blasint n, OPENBLAS_CONST void *alpha, OPENBLAS_CONST void *x, OPENBLAS_CONST blasint incx, void *y, OPENBLAS_CONST blasint incy);
OPENBLAS_EXPORT void cblas_caxpyc(OPENBLAS_CONST blasint n, OPENBLAS_CONST void *alpha, OPENBLAS_CONST void *x, OPENBLAS_CONST blasint incx, void *y, OPENBLAS_CONST blasint incy);
OPENBLAS_EXPORT void cblas_zaxpyc(OPENBLAS_CONST blasint n, OPENBLAS_CONST void *alpha, OPENBLAS_CONST void *x, OPENBLAS_CONST blasint incx, void *y, OPENBLAS_CONST blasint incy);
void cblas_scopy(OPENBLAS_CONST blasint n, OPENBLAS_CONST float *x, OPENBLAS_CONST blasint incx, float *y, OPENBLAS_CONST blasint incy);
void cblas_dcopy(OPENBLAS_CONST blasint n, OPENBLAS_CONST double *x, OPENBLAS_CONST blasint incx, double *y, OPENBLAS_CONST blasint incy);
void cblas_ccopy(OPENBLAS_CONST blasint n, OPENBLAS_CONST void *x, OPENBLAS_CONST blasint incx, void *y, OPENBLAS_CONST blasint incy);
void cblas_zcopy(OPENBLAS_CONST blasint n, OPENBLAS_CONST void *x, OPENBLAS_CONST blasint incx, void *y, OPENBLAS_CONST blasint incy);
OPENBLAS_EXPORT void cblas_scopy(OPENBLAS_CONST blasint n, OPENBLAS_CONST float *x, OPENBLAS_CONST blasint incx, float *y, OPENBLAS_CONST blasint incy);
OPENBLAS_EXPORT void cblas_dcopy(OPENBLAS_CONST blasint n, OPENBLAS_CONST double *x, OPENBLAS_CONST blasint incx, double *y, OPENBLAS_CONST blasint incy);
OPENBLAS_EXPORT void cblas_ccopy(OPENBLAS_CONST blasint n, OPENBLAS_CONST void *x, OPENBLAS_CONST blasint incx, void *y, OPENBLAS_CONST blasint incy);
OPENBLAS_EXPORT void cblas_zcopy(OPENBLAS_CONST blasint n, OPENBLAS_CONST void *x, OPENBLAS_CONST blasint incx, void *y, OPENBLAS_CONST blasint incy);
void cblas_sswap(OPENBLAS_CONST blasint n, float *x, OPENBLAS_CONST blasint incx, float *y, OPENBLAS_CONST blasint incy);
void cblas_dswap(OPENBLAS_CONST blasint n, double *x, OPENBLAS_CONST blasint incx, double *y, OPENBLAS_CONST blasint incy);
void cblas_cswap(OPENBLAS_CONST blasint n, void *x, OPENBLAS_CONST blasint incx, void *y, OPENBLAS_CONST blasint incy);
void cblas_zswap(OPENBLAS_CONST blasint n, void *x, OPENBLAS_CONST blasint incx, void *y, OPENBLAS_CONST blasint incy);
OPENBLAS_EXPORT void cblas_sswap(OPENBLAS_CONST blasint n, float *x, OPENBLAS_CONST blasint incx, float *y, OPENBLAS_CONST blasint incy);
OPENBLAS_EXPORT void cblas_dswap(OPENBLAS_CONST blasint n, double *x, OPENBLAS_CONST blasint incx, double *y, OPENBLAS_CONST blasint incy);
OPENBLAS_EXPORT void cblas_cswap(OPENBLAS_CONST blasint n, void *x, OPENBLAS_CONST blasint incx, void *y, OPENBLAS_CONST blasint incy);
OPENBLAS_EXPORT void cblas_zswap(OPENBLAS_CONST blasint n, void *x, OPENBLAS_CONST blasint incx, void *y, OPENBLAS_CONST blasint incy);
void cblas_srot(OPENBLAS_CONST blasint N, float *X, OPENBLAS_CONST blasint incX, float *Y, OPENBLAS_CONST blasint incY, OPENBLAS_CONST float c, OPENBLAS_CONST float s);
void cblas_drot(OPENBLAS_CONST blasint N, double *X, OPENBLAS_CONST blasint incX, double *Y, OPENBLAS_CONST blasint incY, OPENBLAS_CONST double c, OPENBLAS_CONST double s);
void cblas_csrot(OPENBLAS_CONST blasint n, OPENBLAS_CONST void *x, OPENBLAS_CONST blasint incx, void *y, OPENBLAS_CONST blasint incY, OPENBLAS_CONST float c, OPENBLAS_CONST float s);
void cblas_zdrot(OPENBLAS_CONST blasint n, OPENBLAS_CONST void *x, OPENBLAS_CONST blasint incx, void *y, OPENBLAS_CONST blasint incY, OPENBLAS_CONST double c, OPENBLAS_CONST double s);
OPENBLAS_EXPORT void cblas_srot(OPENBLAS_CONST blasint N, float *X, OPENBLAS_CONST blasint incX, float *Y, OPENBLAS_CONST blasint incY, OPENBLAS_CONST float c, OPENBLAS_CONST float s);
OPENBLAS_EXPORT void cblas_drot(OPENBLAS_CONST blasint N, double *X, OPENBLAS_CONST blasint incX, double *Y, OPENBLAS_CONST blasint incY, OPENBLAS_CONST double c, OPENBLAS_CONST double s);
OPENBLAS_EXPORT void cblas_csrot(OPENBLAS_CONST blasint n, OPENBLAS_CONST void *x, OPENBLAS_CONST blasint incx, void *y, OPENBLAS_CONST blasint incY, OPENBLAS_CONST float c, OPENBLAS_CONST float s);
OPENBLAS_EXPORT void cblas_zdrot(OPENBLAS_CONST blasint n, OPENBLAS_CONST void *x, OPENBLAS_CONST blasint incx, void *y, OPENBLAS_CONST blasint incY, OPENBLAS_CONST double c, OPENBLAS_CONST double s);
void cblas_srotg(float *a, float *b, float *c, float *s);
void cblas_drotg(double *a, double *b, double *c, double *s);
void cblas_crotg(void *a, void *b, float *c, void *s);
void cblas_zrotg(void *a, void *b, double *c, void *s);
OPENBLAS_EXPORT void cblas_srotg(float *a, float *b, float *c, float *s);
OPENBLAS_EXPORT void cblas_drotg(double *a, double *b, double *c, double *s);
OPENBLAS_EXPORT void cblas_crotg(void *a, void *b, float *c, void *s);
OPENBLAS_EXPORT void cblas_zrotg(void *a, void *b, double *c, void *s);
void cblas_srotm(OPENBLAS_CONST blasint N, float *X, OPENBLAS_CONST blasint incX, float *Y, OPENBLAS_CONST blasint incY, OPENBLAS_CONST float *P);
void cblas_drotm(OPENBLAS_CONST blasint N, double *X, OPENBLAS_CONST blasint incX, double *Y, OPENBLAS_CONST blasint incY, OPENBLAS_CONST double *P);
OPENBLAS_EXPORT void cblas_srotm(OPENBLAS_CONST blasint N, float *X, OPENBLAS_CONST blasint incX, float *Y, OPENBLAS_CONST blasint incY, OPENBLAS_CONST float *P);
OPENBLAS_EXPORT void cblas_drotm(OPENBLAS_CONST blasint N, double *X, OPENBLAS_CONST blasint incX, double *Y, OPENBLAS_CONST blasint incY, OPENBLAS_CONST double *P);
void cblas_srotmg(float *d1, float *d2, float *b1, OPENBLAS_CONST float b2, float *P);
void cblas_drotmg(double *d1, double *d2, double *b1, OPENBLAS_CONST double b2, double *P);
OPENBLAS_EXPORT void cblas_srotmg(float *d1, float *d2, float *b1, OPENBLAS_CONST float b2, float *P);
OPENBLAS_EXPORT void cblas_drotmg(double *d1, double *d2, double *b1, OPENBLAS_CONST double b2, double *P);
void cblas_sscal(OPENBLAS_CONST blasint N, OPENBLAS_CONST float alpha, float *X, OPENBLAS_CONST blasint incX);
void cblas_dscal(OPENBLAS_CONST blasint N, OPENBLAS_CONST double alpha, double *X, OPENBLAS_CONST blasint incX);
void cblas_cscal(OPENBLAS_CONST blasint N, OPENBLAS_CONST void *alpha, void *X, OPENBLAS_CONST blasint incX);
void cblas_zscal(OPENBLAS_CONST blasint N, OPENBLAS_CONST void *alpha, void *X, OPENBLAS_CONST blasint incX);
void cblas_csscal(OPENBLAS_CONST blasint N, OPENBLAS_CONST float alpha, void *X, OPENBLAS_CONST blasint incX);
void cblas_zdscal(OPENBLAS_CONST blasint N, OPENBLAS_CONST double alpha, void *X, OPENBLAS_CONST blasint incX);
OPENBLAS_EXPORT void cblas_sscal(OPENBLAS_CONST blasint N, OPENBLAS_CONST float alpha, float *X, OPENBLAS_CONST blasint incX);
OPENBLAS_EXPORT void cblas_dscal(OPENBLAS_CONST blasint N, OPENBLAS_CONST double alpha, double *X, OPENBLAS_CONST blasint incX);
OPENBLAS_EXPORT void cblas_cscal(OPENBLAS_CONST blasint N, OPENBLAS_CONST void *alpha, void *X, OPENBLAS_CONST blasint incX);
OPENBLAS_EXPORT void cblas_zscal(OPENBLAS_CONST blasint N, OPENBLAS_CONST void *alpha, void *X, OPENBLAS_CONST blasint incX);
OPENBLAS_EXPORT void cblas_csscal(OPENBLAS_CONST blasint N, OPENBLAS_CONST float alpha, void *X, OPENBLAS_CONST blasint incX);
OPENBLAS_EXPORT void cblas_zdscal(OPENBLAS_CONST blasint N, OPENBLAS_CONST double alpha, void *X, OPENBLAS_CONST blasint incX);
void cblas_sgemv(OPENBLAS_CONST enum CBLAS_ORDER order, OPENBLAS_CONST enum CBLAS_TRANSPOSE trans, OPENBLAS_CONST blasint m, OPENBLAS_CONST blasint n,
OPENBLAS_EXPORT void cblas_sgemv(OPENBLAS_CONST enum CBLAS_ORDER order, OPENBLAS_CONST enum CBLAS_TRANSPOSE trans, OPENBLAS_CONST blasint m, OPENBLAS_CONST blasint n,
OPENBLAS_CONST float alpha, OPENBLAS_CONST float *a, OPENBLAS_CONST blasint lda, OPENBLAS_CONST float *x, OPENBLAS_CONST blasint incx, OPENBLAS_CONST float beta, float *y, OPENBLAS_CONST blasint incy);
void cblas_dgemv(OPENBLAS_CONST enum CBLAS_ORDER order, OPENBLAS_CONST enum CBLAS_TRANSPOSE trans, OPENBLAS_CONST blasint m, OPENBLAS_CONST blasint n,
OPENBLAS_EXPORT void cblas_dgemv(OPENBLAS_CONST enum CBLAS_ORDER order, OPENBLAS_CONST enum CBLAS_TRANSPOSE trans, OPENBLAS_CONST blasint m, OPENBLAS_CONST blasint n,
OPENBLAS_CONST double alpha, OPENBLAS_CONST double *a, OPENBLAS_CONST blasint lda, OPENBLAS_CONST double *x, OPENBLAS_CONST blasint incx, OPENBLAS_CONST double beta, double *y, OPENBLAS_CONST blasint incy);
void cblas_cgemv(OPENBLAS_CONST enum CBLAS_ORDER order, OPENBLAS_CONST enum CBLAS_TRANSPOSE trans, OPENBLAS_CONST blasint m, OPENBLAS_CONST blasint n,
OPENBLAS_EXPORT void cblas_cgemv(OPENBLAS_CONST enum CBLAS_ORDER order, OPENBLAS_CONST enum CBLAS_TRANSPOSE trans, OPENBLAS_CONST blasint m, OPENBLAS_CONST blasint n,
OPENBLAS_CONST void *alpha, OPENBLAS_CONST void *a, OPENBLAS_CONST blasint lda, OPENBLAS_CONST void *x, OPENBLAS_CONST blasint incx, OPENBLAS_CONST void *beta, void *y, OPENBLAS_CONST blasint incy);
void cblas_zgemv(OPENBLAS_CONST enum CBLAS_ORDER order, OPENBLAS_CONST enum CBLAS_TRANSPOSE trans, OPENBLAS_CONST blasint m, OPENBLAS_CONST blasint n,
OPENBLAS_EXPORT void cblas_zgemv(OPENBLAS_CONST enum CBLAS_ORDER order, OPENBLAS_CONST enum CBLAS_TRANSPOSE trans, OPENBLAS_CONST blasint m, OPENBLAS_CONST blasint n,
OPENBLAS_CONST void *alpha, OPENBLAS_CONST void *a, OPENBLAS_CONST blasint lda, OPENBLAS_CONST void *x, OPENBLAS_CONST blasint incx, OPENBLAS_CONST void *beta, void *y, OPENBLAS_CONST blasint incy);
void cblas_sger (OPENBLAS_CONST enum CBLAS_ORDER order, OPENBLAS_CONST blasint M, OPENBLAS_CONST blasint N, OPENBLAS_CONST float alpha, OPENBLAS_CONST float *X, OPENBLAS_CONST blasint incX, OPENBLAS_CONST float *Y, OPENBLAS_CONST blasint incY, float *A, OPENBLAS_CONST blasint lda);
void cblas_dger (OPENBLAS_CONST enum CBLAS_ORDER order, OPENBLAS_CONST blasint M, OPENBLAS_CONST blasint N, OPENBLAS_CONST double alpha, OPENBLAS_CONST double *X, OPENBLAS_CONST blasint incX, OPENBLAS_CONST double *Y, OPENBLAS_CONST blasint incY, double *A, OPENBLAS_CONST blasint lda);
void cblas_cgeru(OPENBLAS_CONST enum CBLAS_ORDER order, OPENBLAS_CONST blasint M, OPENBLAS_CONST blasint N, OPENBLAS_CONST void *alpha, OPENBLAS_CONST void *X, OPENBLAS_CONST blasint incX, OPENBLAS_CONST void *Y, OPENBLAS_CONST blasint incY, void *A, OPENBLAS_CONST blasint lda);
void cblas_cgerc(OPENBLAS_CONST enum CBLAS_ORDER order, OPENBLAS_CONST blasint M, OPENBLAS_CONST blasint N, OPENBLAS_CONST void *alpha, OPENBLAS_CONST void *X, OPENBLAS_CONST blasint incX, OPENBLAS_CONST void *Y, OPENBLAS_CONST blasint incY, void *A, OPENBLAS_CONST blasint lda);
void cblas_zgeru(OPENBLAS_CONST enum CBLAS_ORDER order, OPENBLAS_CONST blasint M, OPENBLAS_CONST blasint N, OPENBLAS_CONST void *alpha, OPENBLAS_CONST void *X, OPENBLAS_CONST blasint incX, OPENBLAS_CONST void *Y, OPENBLAS_CONST blasint incY, void *A, OPENBLAS_CONST blasint lda);
void cblas_zgerc(OPENBLAS_CONST enum CBLAS_ORDER order, OPENBLAS_CONST blasint M, OPENBLAS_CONST blasint N, OPENBLAS_CONST void *alpha, OPENBLAS_CONST void *X, OPENBLAS_CONST blasint incX, OPENBLAS_CONST void *Y, OPENBLAS_CONST blasint incY, void *A, OPENBLAS_CONST blasint lda);
OPENBLAS_EXPORT void cblas_sger (OPENBLAS_CONST enum CBLAS_ORDER order, OPENBLAS_CONST blasint M, OPENBLAS_CONST blasint N, OPENBLAS_CONST float alpha, OPENBLAS_CONST float *X, OPENBLAS_CONST blasint incX, OPENBLAS_CONST float *Y, OPENBLAS_CONST blasint incY, float *A, OPENBLAS_CONST blasint lda);
OPENBLAS_EXPORT void cblas_dger (OPENBLAS_CONST enum CBLAS_ORDER order, OPENBLAS_CONST blasint M, OPENBLAS_CONST blasint N, OPENBLAS_CONST double alpha, OPENBLAS_CONST double *X, OPENBLAS_CONST blasint incX, OPENBLAS_CONST double *Y, OPENBLAS_CONST blasint incY, double *A, OPENBLAS_CONST blasint lda);
OPENBLAS_EXPORT void cblas_cgeru(OPENBLAS_CONST enum CBLAS_ORDER order, OPENBLAS_CONST blasint M, OPENBLAS_CONST blasint N, OPENBLAS_CONST void *alpha, OPENBLAS_CONST void *X, OPENBLAS_CONST blasint incX, OPENBLAS_CONST void *Y, OPENBLAS_CONST blasint incY, void *A, OPENBLAS_CONST blasint lda);
OPENBLAS_EXPORT void cblas_cgerc(OPENBLAS_CONST enum CBLAS_ORDER order, OPENBLAS_CONST blasint M, OPENBLAS_CONST blasint N, OPENBLAS_CONST void *alpha, OPENBLAS_CONST void *X, OPENBLAS_CONST blasint incX, OPENBLAS_CONST void *Y, OPENBLAS_CONST blasint incY, void *A, OPENBLAS_CONST blasint lda);
OPENBLAS_EXPORT void cblas_zgeru(OPENBLAS_CONST enum CBLAS_ORDER order, OPENBLAS_CONST blasint M, OPENBLAS_CONST blasint N, OPENBLAS_CONST void *alpha, OPENBLAS_CONST void *X, OPENBLAS_CONST blasint incX, OPENBLAS_CONST void *Y, OPENBLAS_CONST blasint incY, void *A, OPENBLAS_CONST blasint lda);
OPENBLAS_EXPORT void cblas_zgerc(OPENBLAS_CONST enum CBLAS_ORDER order, OPENBLAS_CONST blasint M, OPENBLAS_CONST blasint N, OPENBLAS_CONST void *alpha, OPENBLAS_CONST void *X, OPENBLAS_CONST blasint incX, OPENBLAS_CONST void *Y, OPENBLAS_CONST blasint incY, void *A, OPENBLAS_CONST blasint lda);
void cblas_strsv(OPENBLAS_CONST enum CBLAS_ORDER order, OPENBLAS_CONST enum CBLAS_UPLO Uplo, OPENBLAS_CONST enum CBLAS_TRANSPOSE TransA, OPENBLAS_CONST enum CBLAS_DIAG Diag, OPENBLAS_CONST blasint N, OPENBLAS_CONST float *A, OPENBLAS_CONST blasint lda, float *X, OPENBLAS_CONST blasint incX);
void cblas_dtrsv(OPENBLAS_CONST enum CBLAS_ORDER order, OPENBLAS_CONST enum CBLAS_UPLO Uplo, OPENBLAS_CONST enum CBLAS_TRANSPOSE TransA, OPENBLAS_CONST enum CBLAS_DIAG Diag, OPENBLAS_CONST blasint N, OPENBLAS_CONST double *A, OPENBLAS_CONST blasint lda, double *X, OPENBLAS_CONST blasint incX);
void cblas_ctrsv(OPENBLAS_CONST enum CBLAS_ORDER order, OPENBLAS_CONST enum CBLAS_UPLO Uplo, OPENBLAS_CONST enum CBLAS_TRANSPOSE TransA, OPENBLAS_CONST enum CBLAS_DIAG Diag, OPENBLAS_CONST blasint N, OPENBLAS_CONST void *A, OPENBLAS_CONST blasint lda, void *X, OPENBLAS_CONST blasint incX);
void cblas_ztrsv(OPENBLAS_CONST enum CBLAS_ORDER order, OPENBLAS_CONST enum CBLAS_UPLO Uplo, OPENBLAS_CONST enum CBLAS_TRANSPOSE TransA, OPENBLAS_CONST enum CBLAS_DIAG Diag, OPENBLAS_CONST blasint N, OPENBLAS_CONST void *A, OPENBLAS_CONST blasint lda, void *X, OPENBLAS_CONST blasint incX);
OPENBLAS_EXPORT void cblas_strsv(OPENBLAS_CONST enum CBLAS_ORDER order, OPENBLAS_CONST enum CBLAS_UPLO Uplo, OPENBLAS_CONST enum CBLAS_TRANSPOSE TransA, OPENBLAS_CONST enum CBLAS_DIAG Diag, OPENBLAS_CONST blasint N, OPENBLAS_CONST float *A, OPENBLAS_CONST blasint lda, float *X, OPENBLAS_CONST blasint incX);
OPENBLAS_EXPORT void cblas_dtrsv(OPENBLAS_CONST enum CBLAS_ORDER order, OPENBLAS_CONST enum CBLAS_UPLO Uplo, OPENBLAS_CONST enum CBLAS_TRANSPOSE TransA, OPENBLAS_CONST enum CBLAS_DIAG Diag, OPENBLAS_CONST blasint N, OPENBLAS_CONST double *A, OPENBLAS_CONST blasint lda, double *X, OPENBLAS_CONST blasint incX);
OPENBLAS_EXPORT void cblas_ctrsv(OPENBLAS_CONST enum CBLAS_ORDER order, OPENBLAS_CONST enum CBLAS_UPLO Uplo, OPENBLAS_CONST enum CBLAS_TRANSPOSE TransA, OPENBLAS_CONST enum CBLAS_DIAG Diag, OPENBLAS_CONST blasint N, OPENBLAS_CONST void *A, OPENBLAS_CONST blasint lda, void *X, OPENBLAS_CONST blasint incX);
OPENBLAS_EXPORT void cblas_ztrsv(OPENBLAS_CONST enum CBLAS_ORDER order, OPENBLAS_CONST enum CBLAS_UPLO Uplo, OPENBLAS_CONST enum CBLAS_TRANSPOSE TransA, OPENBLAS_CONST enum CBLAS_DIAG Diag, OPENBLAS_CONST blasint N, OPENBLAS_CONST void *A, OPENBLAS_CONST blasint lda, void *X, OPENBLAS_CONST blasint incX);
void cblas_strmv(OPENBLAS_CONST enum CBLAS_ORDER order, OPENBLAS_CONST enum CBLAS_UPLO Uplo, OPENBLAS_CONST enum CBLAS_TRANSPOSE TransA, OPENBLAS_CONST enum CBLAS_DIAG Diag, OPENBLAS_CONST blasint N, OPENBLAS_CONST float *A, OPENBLAS_CONST blasint lda, float *X, OPENBLAS_CONST blasint incX);
void cblas_dtrmv(OPENBLAS_CONST enum CBLAS_ORDER order, OPENBLAS_CONST enum CBLAS_UPLO Uplo, OPENBLAS_CONST enum CBLAS_TRANSPOSE TransA, OPENBLAS_CONST enum CBLAS_DIAG Diag, OPENBLAS_CONST blasint N, OPENBLAS_CONST double *A, OPENBLAS_CONST blasint lda, double *X, OPENBLAS_CONST blasint incX);
void cblas_ctrmv(OPENBLAS_CONST enum CBLAS_ORDER order, OPENBLAS_CONST enum CBLAS_UPLO Uplo, OPENBLAS_CONST enum CBLAS_TRANSPOSE TransA, OPENBLAS_CONST enum CBLAS_DIAG Diag, OPENBLAS_CONST blasint N, OPENBLAS_CONST void *A, OPENBLAS_CONST blasint lda, void *X, OPENBLAS_CONST blasint incX);
void cblas_ztrmv(OPENBLAS_CONST enum CBLAS_ORDER order, OPENBLAS_CONST enum CBLAS_UPLO Uplo, OPENBLAS_CONST enum CBLAS_TRANSPOSE TransA, OPENBLAS_CONST enum CBLAS_DIAG Diag, OPENBLAS_CONST blasint N, OPENBLAS_CONST void *A, OPENBLAS_CONST blasint lda, void *X, OPENBLAS_CONST blasint incX);
OPENBLAS_EXPORT void cblas_strmv(OPENBLAS_CONST enum CBLAS_ORDER order, OPENBLAS_CONST enum CBLAS_UPLO Uplo, OPENBLAS_CONST enum CBLAS_TRANSPOSE TransA, OPENBLAS_CONST enum CBLAS_DIAG Diag, OPENBLAS_CONST blasint N, OPENBLAS_CONST float *A, OPENBLAS_CONST blasint lda, float *X, OPENBLAS_CONST blasint incX);
OPENBLAS_EXPORT void cblas_dtrmv(OPENBLAS_CONST enum CBLAS_ORDER order, OPENBLAS_CONST enum CBLAS_UPLO Uplo, OPENBLAS_CONST enum CBLAS_TRANSPOSE TransA, OPENBLAS_CONST enum CBLAS_DIAG Diag, OPENBLAS_CONST blasint N, OPENBLAS_CONST double *A, OPENBLAS_CONST blasint lda, double *X, OPENBLAS_CONST blasint incX);
OPENBLAS_EXPORT void cblas_ctrmv(OPENBLAS_CONST enum CBLAS_ORDER order, OPENBLAS_CONST enum CBLAS_UPLO Uplo, OPENBLAS_CONST enum CBLAS_TRANSPOSE TransA, OPENBLAS_CONST enum CBLAS_DIAG Diag, OPENBLAS_CONST blasint N, OPENBLAS_CONST void *A, OPENBLAS_CONST blasint lda, void *X, OPENBLAS_CONST blasint incX);
OPENBLAS_EXPORT void cblas_ztrmv(OPENBLAS_CONST enum CBLAS_ORDER order, OPENBLAS_CONST enum CBLAS_UPLO Uplo, OPENBLAS_CONST enum CBLAS_TRANSPOSE TransA, OPENBLAS_CONST enum CBLAS_DIAG Diag, OPENBLAS_CONST blasint N, OPENBLAS_CONST void *A, OPENBLAS_CONST blasint lda, void *X, OPENBLAS_CONST blasint incX);
void cblas_ssyr(OPENBLAS_CONST enum CBLAS_ORDER order, OPENBLAS_CONST enum CBLAS_UPLO Uplo, OPENBLAS_CONST blasint N, OPENBLAS_CONST float alpha, OPENBLAS_CONST float *X, OPENBLAS_CONST blasint incX, float *A, OPENBLAS_CONST blasint lda);
void cblas_dsyr(OPENBLAS_CONST enum CBLAS_ORDER order, OPENBLAS_CONST enum CBLAS_UPLO Uplo, OPENBLAS_CONST blasint N, OPENBLAS_CONST double alpha, OPENBLAS_CONST double *X, OPENBLAS_CONST blasint incX, double *A, OPENBLAS_CONST blasint lda);
void cblas_cher(OPENBLAS_CONST enum CBLAS_ORDER order, OPENBLAS_CONST enum CBLAS_UPLO Uplo, OPENBLAS_CONST blasint N, OPENBLAS_CONST float alpha, OPENBLAS_CONST void *X, OPENBLAS_CONST blasint incX, void *A, OPENBLAS_CONST blasint lda);
void cblas_zher(OPENBLAS_CONST enum CBLAS_ORDER order, OPENBLAS_CONST enum CBLAS_UPLO Uplo, OPENBLAS_CONST blasint N, OPENBLAS_CONST double alpha, OPENBLAS_CONST void *X, OPENBLAS_CONST blasint incX, void *A, OPENBLAS_CONST blasint lda);
OPENBLAS_EXPORT void cblas_ssyr(OPENBLAS_CONST enum CBLAS_ORDER order, OPENBLAS_CONST enum CBLAS_UPLO Uplo, OPENBLAS_CONST blasint N, OPENBLAS_CONST float alpha, OPENBLAS_CONST float *X, OPENBLAS_CONST blasint incX, float *A, OPENBLAS_CONST blasint lda);
OPENBLAS_EXPORT void cblas_dsyr(OPENBLAS_CONST enum CBLAS_ORDER order, OPENBLAS_CONST enum CBLAS_UPLO Uplo, OPENBLAS_CONST blasint N, OPENBLAS_CONST double alpha, OPENBLAS_CONST double *X, OPENBLAS_CONST blasint incX, double *A, OPENBLAS_CONST blasint lda);
OPENBLAS_EXPORT void cblas_cher(OPENBLAS_CONST enum CBLAS_ORDER order, OPENBLAS_CONST enum CBLAS_UPLO Uplo, OPENBLAS_CONST blasint N, OPENBLAS_CONST float alpha, OPENBLAS_CONST void *X, OPENBLAS_CONST blasint incX, void *A, OPENBLAS_CONST blasint lda);
OPENBLAS_EXPORT void cblas_zher(OPENBLAS_CONST enum CBLAS_ORDER order, OPENBLAS_CONST enum CBLAS_UPLO Uplo, OPENBLAS_CONST blasint N, OPENBLAS_CONST double alpha, OPENBLAS_CONST void *X, OPENBLAS_CONST blasint incX, void *A, OPENBLAS_CONST blasint lda);
void cblas_ssyr2(OPENBLAS_CONST enum CBLAS_ORDER order, OPENBLAS_CONST enum CBLAS_UPLO Uplo,OPENBLAS_CONST blasint N, OPENBLAS_CONST float alpha, OPENBLAS_CONST float *X,
OPENBLAS_EXPORT void cblas_ssyr2(OPENBLAS_CONST enum CBLAS_ORDER order, OPENBLAS_CONST enum CBLAS_UPLO Uplo,OPENBLAS_CONST blasint N, OPENBLAS_CONST float alpha, OPENBLAS_CONST float *X,
OPENBLAS_CONST blasint incX, OPENBLAS_CONST float *Y, OPENBLAS_CONST blasint incY, float *A, OPENBLAS_CONST blasint lda);
void cblas_dsyr2(OPENBLAS_CONST enum CBLAS_ORDER order, OPENBLAS_CONST enum CBLAS_UPLO Uplo, OPENBLAS_CONST blasint N, OPENBLAS_CONST double alpha, OPENBLAS_CONST double *X,
OPENBLAS_EXPORT void cblas_dsyr2(OPENBLAS_CONST enum CBLAS_ORDER order, OPENBLAS_CONST enum CBLAS_UPLO Uplo, OPENBLAS_CONST blasint N, OPENBLAS_CONST double alpha, OPENBLAS_CONST double *X,
OPENBLAS_CONST blasint incX, OPENBLAS_CONST double *Y, OPENBLAS_CONST blasint incY, double *A, OPENBLAS_CONST blasint lda);
void cblas_cher2(OPENBLAS_CONST enum CBLAS_ORDER order, OPENBLAS_CONST enum CBLAS_UPLO Uplo, OPENBLAS_CONST blasint N, OPENBLAS_CONST void *alpha, OPENBLAS_CONST void *X, OPENBLAS_CONST blasint incX,
OPENBLAS_EXPORT void cblas_cher2(OPENBLAS_CONST enum CBLAS_ORDER order, OPENBLAS_CONST enum CBLAS_UPLO Uplo, OPENBLAS_CONST blasint N, OPENBLAS_CONST void *alpha, OPENBLAS_CONST void *X, OPENBLAS_CONST blasint incX,
OPENBLAS_CONST void *Y, OPENBLAS_CONST blasint incY, void *A, OPENBLAS_CONST blasint lda);
void cblas_zher2(OPENBLAS_CONST enum CBLAS_ORDER order, OPENBLAS_CONST enum CBLAS_UPLO Uplo, OPENBLAS_CONST blasint N, OPENBLAS_CONST void *alpha, OPENBLAS_CONST void *X, OPENBLAS_CONST blasint incX,
OPENBLAS_EXPORT void cblas_zher2(OPENBLAS_CONST enum CBLAS_ORDER order, OPENBLAS_CONST enum CBLAS_UPLO Uplo, OPENBLAS_CONST blasint N, OPENBLAS_CONST void *alpha, OPENBLAS_CONST void *X, OPENBLAS_CONST blasint incX,
OPENBLAS_CONST void *Y, OPENBLAS_CONST blasint incY, void *A, OPENBLAS_CONST blasint lda);
void cblas_sgbmv(OPENBLAS_CONST enum CBLAS_ORDER order, OPENBLAS_CONST enum CBLAS_TRANSPOSE TransA, OPENBLAS_CONST blasint M, OPENBLAS_CONST blasint N,
OPENBLAS_EXPORT void cblas_sgbmv(OPENBLAS_CONST enum CBLAS_ORDER order, OPENBLAS_CONST enum CBLAS_TRANSPOSE TransA, OPENBLAS_CONST blasint M, OPENBLAS_CONST blasint N,
OPENBLAS_CONST blasint KL, OPENBLAS_CONST blasint KU, OPENBLAS_CONST float alpha, OPENBLAS_CONST float *A, OPENBLAS_CONST blasint lda, OPENBLAS_CONST float *X, OPENBLAS_CONST blasint incX, OPENBLAS_CONST float beta, float *Y, OPENBLAS_CONST blasint incY);
void cblas_dgbmv(OPENBLAS_CONST enum CBLAS_ORDER order, OPENBLAS_CONST enum CBLAS_TRANSPOSE TransA, OPENBLAS_CONST blasint M, OPENBLAS_CONST blasint N,
OPENBLAS_EXPORT void cblas_dgbmv(OPENBLAS_CONST enum CBLAS_ORDER order, OPENBLAS_CONST enum CBLAS_TRANSPOSE TransA, OPENBLAS_CONST blasint M, OPENBLAS_CONST blasint N,
OPENBLAS_CONST blasint KL, OPENBLAS_CONST blasint KU, OPENBLAS_CONST double alpha, OPENBLAS_CONST double *A, OPENBLAS_CONST blasint lda, OPENBLAS_CONST double *X, OPENBLAS_CONST blasint incX, OPENBLAS_CONST double beta, double *Y, OPENBLAS_CONST blasint incY);
void cblas_cgbmv(OPENBLAS_CONST enum CBLAS_ORDER order, OPENBLAS_CONST enum CBLAS_TRANSPOSE TransA, OPENBLAS_CONST blasint M, OPENBLAS_CONST blasint N,
OPENBLAS_EXPORT void cblas_cgbmv(OPENBLAS_CONST enum CBLAS_ORDER order, OPENBLAS_CONST enum CBLAS_TRANSPOSE TransA, OPENBLAS_CONST blasint M, OPENBLAS_CONST blasint N,
OPENBLAS_CONST blasint KL, OPENBLAS_CONST blasint KU, OPENBLAS_CONST void *alpha, OPENBLAS_CONST void *A, OPENBLAS_CONST blasint lda, OPENBLAS_CONST void *X, OPENBLAS_CONST blasint incX, OPENBLAS_CONST void *beta, void *Y, OPENBLAS_CONST blasint incY);
void cblas_zgbmv(OPENBLAS_CONST enum CBLAS_ORDER order, OPENBLAS_CONST enum CBLAS_TRANSPOSE TransA, OPENBLAS_CONST blasint M, OPENBLAS_CONST blasint N,
OPENBLAS_EXPORT void cblas_zgbmv(OPENBLAS_CONST enum CBLAS_ORDER order, OPENBLAS_CONST enum CBLAS_TRANSPOSE TransA, OPENBLAS_CONST blasint M, OPENBLAS_CONST blasint N,
OPENBLAS_CONST blasint KL, OPENBLAS_CONST blasint KU, OPENBLAS_CONST void *alpha, OPENBLAS_CONST void *A, OPENBLAS_CONST blasint lda, OPENBLAS_CONST void *X, OPENBLAS_CONST blasint incX, OPENBLAS_CONST void *beta, void *Y, OPENBLAS_CONST blasint incY);
void cblas_ssbmv(OPENBLAS_CONST enum CBLAS_ORDER order, OPENBLAS_CONST enum CBLAS_UPLO Uplo, OPENBLAS_CONST blasint N, OPENBLAS_CONST blasint K, OPENBLAS_CONST float alpha, OPENBLAS_CONST float *A,
OPENBLAS_EXPORT void cblas_ssbmv(OPENBLAS_CONST enum CBLAS_ORDER order, OPENBLAS_CONST enum CBLAS_UPLO Uplo, OPENBLAS_CONST blasint N, OPENBLAS_CONST blasint K, OPENBLAS_CONST float alpha, OPENBLAS_CONST float *A,
OPENBLAS_CONST blasint lda, OPENBLAS_CONST float *X, OPENBLAS_CONST blasint incX, OPENBLAS_CONST float beta, float *Y, OPENBLAS_CONST blasint incY);
void cblas_dsbmv(OPENBLAS_CONST enum CBLAS_ORDER order, OPENBLAS_CONST enum CBLAS_UPLO Uplo, OPENBLAS_CONST blasint N, OPENBLAS_CONST blasint K, OPENBLAS_CONST double alpha, OPENBLAS_CONST double *A,
OPENBLAS_EXPORT void cblas_dsbmv(OPENBLAS_CONST enum CBLAS_ORDER order, OPENBLAS_CONST enum CBLAS_UPLO Uplo, OPENBLAS_CONST blasint N, OPENBLAS_CONST blasint K, OPENBLAS_CONST double alpha, OPENBLAS_CONST double *A,
OPENBLAS_CONST blasint lda, OPENBLAS_CONST double *X, OPENBLAS_CONST blasint incX, OPENBLAS_CONST double beta, double *Y, OPENBLAS_CONST blasint incY);
void cblas_stbmv(OPENBLAS_CONST enum CBLAS_ORDER order, OPENBLAS_CONST enum CBLAS_UPLO Uplo, OPENBLAS_CONST enum CBLAS_TRANSPOSE TransA, OPENBLAS_CONST enum CBLAS_DIAG Diag,
OPENBLAS_EXPORT void cblas_stbmv(OPENBLAS_CONST enum CBLAS_ORDER order, OPENBLAS_CONST enum CBLAS_UPLO Uplo, OPENBLAS_CONST enum CBLAS_TRANSPOSE TransA, OPENBLAS_CONST enum CBLAS_DIAG Diag,
OPENBLAS_CONST blasint N, OPENBLAS_CONST blasint K, OPENBLAS_CONST float *A, OPENBLAS_CONST blasint lda, float *X, OPENBLAS_CONST blasint incX);
void cblas_dtbmv(OPENBLAS_CONST enum CBLAS_ORDER order, OPENBLAS_CONST enum CBLAS_UPLO Uplo, OPENBLAS_CONST enum CBLAS_TRANSPOSE TransA, OPENBLAS_CONST enum CBLAS_DIAG Diag,
OPENBLAS_EXPORT void cblas_dtbmv(OPENBLAS_CONST enum CBLAS_ORDER order, OPENBLAS_CONST enum CBLAS_UPLO Uplo, OPENBLAS_CONST enum CBLAS_TRANSPOSE TransA, OPENBLAS_CONST enum CBLAS_DIAG Diag,
OPENBLAS_CONST blasint N, OPENBLAS_CONST blasint K, OPENBLAS_CONST double *A, OPENBLAS_CONST blasint lda, double *X, OPENBLAS_CONST blasint incX);
void cblas_ctbmv(OPENBLAS_CONST enum CBLAS_ORDER order, OPENBLAS_CONST enum CBLAS_UPLO Uplo, OPENBLAS_CONST enum CBLAS_TRANSPOSE TransA, OPENBLAS_CONST enum CBLAS_DIAG Diag,
OPENBLAS_EXPORT void cblas_ctbmv(OPENBLAS_CONST enum CBLAS_ORDER order, OPENBLAS_CONST enum CBLAS_UPLO Uplo, OPENBLAS_CONST enum CBLAS_TRANSPOSE TransA, OPENBLAS_CONST enum CBLAS_DIAG Diag,
OPENBLAS_CONST blasint N, OPENBLAS_CONST blasint K, OPENBLAS_CONST void *A, OPENBLAS_CONST blasint lda, void *X, OPENBLAS_CONST blasint incX);
void cblas_ztbmv(OPENBLAS_CONST enum CBLAS_ORDER order, OPENBLAS_CONST enum CBLAS_UPLO Uplo, OPENBLAS_CONST enum CBLAS_TRANSPOSE TransA, OPENBLAS_CONST enum CBLAS_DIAG Diag,
OPENBLAS_EXPORT void cblas_ztbmv(OPENBLAS_CONST enum CBLAS_ORDER order, OPENBLAS_CONST enum CBLAS_UPLO Uplo, OPENBLAS_CONST enum CBLAS_TRANSPOSE TransA, OPENBLAS_CONST enum CBLAS_DIAG Diag,
OPENBLAS_CONST blasint N, OPENBLAS_CONST blasint K, OPENBLAS_CONST void *A, OPENBLAS_CONST blasint lda, void *X, OPENBLAS_CONST blasint incX);
void cblas_stbsv(OPENBLAS_CONST enum CBLAS_ORDER order, OPENBLAS_CONST enum CBLAS_UPLO Uplo, OPENBLAS_CONST enum CBLAS_TRANSPOSE TransA, OPENBLAS_CONST enum CBLAS_DIAG Diag,
OPENBLAS_EXPORT void cblas_stbsv(OPENBLAS_CONST enum CBLAS_ORDER order, OPENBLAS_CONST enum CBLAS_UPLO Uplo, OPENBLAS_CONST enum CBLAS_TRANSPOSE TransA, OPENBLAS_CONST enum CBLAS_DIAG Diag,
OPENBLAS_CONST blasint N, OPENBLAS_CONST blasint K, OPENBLAS_CONST float *A, OPENBLAS_CONST blasint lda, float *X, OPENBLAS_CONST blasint incX);
void cblas_dtbsv(OPENBLAS_CONST enum CBLAS_ORDER order, OPENBLAS_CONST enum CBLAS_UPLO Uplo, OPENBLAS_CONST enum CBLAS_TRANSPOSE TransA, OPENBLAS_CONST enum CBLAS_DIAG Diag,
OPENBLAS_EXPORT void cblas_dtbsv(OPENBLAS_CONST enum CBLAS_ORDER order, OPENBLAS_CONST enum CBLAS_UPLO Uplo, OPENBLAS_CONST enum CBLAS_TRANSPOSE TransA, OPENBLAS_CONST enum CBLAS_DIAG Diag,
OPENBLAS_CONST blasint N, OPENBLAS_CONST blasint K, OPENBLAS_CONST double *A, OPENBLAS_CONST blasint lda, double *X, OPENBLAS_CONST blasint incX);
void cblas_ctbsv(OPENBLAS_CONST enum CBLAS_ORDER order, OPENBLAS_CONST enum CBLAS_UPLO Uplo, OPENBLAS_CONST enum CBLAS_TRANSPOSE TransA, OPENBLAS_CONST enum CBLAS_DIAG Diag,
OPENBLAS_EXPORT void cblas_ctbsv(OPENBLAS_CONST enum CBLAS_ORDER order, OPENBLAS_CONST enum CBLAS_UPLO Uplo, OPENBLAS_CONST enum CBLAS_TRANSPOSE TransA, OPENBLAS_CONST enum CBLAS_DIAG Diag,
OPENBLAS_CONST blasint N, OPENBLAS_CONST blasint K, OPENBLAS_CONST void *A, OPENBLAS_CONST blasint lda, void *X, OPENBLAS_CONST blasint incX);
void cblas_ztbsv(OPENBLAS_CONST enum CBLAS_ORDER order, OPENBLAS_CONST enum CBLAS_UPLO Uplo, OPENBLAS_CONST enum CBLAS_TRANSPOSE TransA, OPENBLAS_CONST enum CBLAS_DIAG Diag,
OPENBLAS_EXPORT void cblas_ztbsv(OPENBLAS_CONST enum CBLAS_ORDER order, OPENBLAS_CONST enum CBLAS_UPLO Uplo, OPENBLAS_CONST enum CBLAS_TRANSPOSE TransA, OPENBLAS_CONST enum CBLAS_DIAG Diag,
OPENBLAS_CONST blasint N, OPENBLAS_CONST blasint K, OPENBLAS_CONST void *A, OPENBLAS_CONST blasint lda, void *X, OPENBLAS_CONST blasint incX);
void cblas_stpmv(OPENBLAS_CONST enum CBLAS_ORDER order, OPENBLAS_CONST enum CBLAS_UPLO Uplo, OPENBLAS_CONST enum CBLAS_TRANSPOSE TransA, OPENBLAS_CONST enum CBLAS_DIAG Diag,
OPENBLAS_EXPORT void cblas_stpmv(OPENBLAS_CONST enum CBLAS_ORDER order, OPENBLAS_CONST enum CBLAS_UPLO Uplo, OPENBLAS_CONST enum CBLAS_TRANSPOSE TransA, OPENBLAS_CONST enum CBLAS_DIAG Diag,
OPENBLAS_CONST blasint N, OPENBLAS_CONST float *Ap, float *X, OPENBLAS_CONST blasint incX);
void cblas_dtpmv(OPENBLAS_CONST enum CBLAS_ORDER order, OPENBLAS_CONST enum CBLAS_UPLO Uplo, OPENBLAS_CONST enum CBLAS_TRANSPOSE TransA, OPENBLAS_CONST enum CBLAS_DIAG Diag,
OPENBLAS_EXPORT void cblas_dtpmv(OPENBLAS_CONST enum CBLAS_ORDER order, OPENBLAS_CONST enum CBLAS_UPLO Uplo, OPENBLAS_CONST enum CBLAS_TRANSPOSE TransA, OPENBLAS_CONST enum CBLAS_DIAG Diag,
OPENBLAS_CONST blasint N, OPENBLAS_CONST double *Ap, double *X, OPENBLAS_CONST blasint incX);
void cblas_ctpmv(OPENBLAS_CONST enum CBLAS_ORDER order, OPENBLAS_CONST enum CBLAS_UPLO Uplo, OPENBLAS_CONST enum CBLAS_TRANSPOSE TransA, OPENBLAS_CONST enum CBLAS_DIAG Diag,
OPENBLAS_EXPORT void cblas_ctpmv(OPENBLAS_CONST enum CBLAS_ORDER order, OPENBLAS_CONST enum CBLAS_UPLO Uplo, OPENBLAS_CONST enum CBLAS_TRANSPOSE TransA, OPENBLAS_CONST enum CBLAS_DIAG Diag,
OPENBLAS_CONST blasint N, OPENBLAS_CONST void *Ap, void *X, OPENBLAS_CONST blasint incX);
void cblas_ztpmv(OPENBLAS_CONST enum CBLAS_ORDER order, OPENBLAS_CONST enum CBLAS_UPLO Uplo, OPENBLAS_CONST enum CBLAS_TRANSPOSE TransA, OPENBLAS_CONST enum CBLAS_DIAG Diag,
OPENBLAS_EXPORT void cblas_ztpmv(OPENBLAS_CONST enum CBLAS_ORDER order, OPENBLAS_CONST enum CBLAS_UPLO Uplo, OPENBLAS_CONST enum CBLAS_TRANSPOSE TransA, OPENBLAS_CONST enum CBLAS_DIAG Diag,
OPENBLAS_CONST blasint N, OPENBLAS_CONST void *Ap, void *X, OPENBLAS_CONST blasint incX);
void cblas_stpsv(OPENBLAS_CONST enum CBLAS_ORDER order, OPENBLAS_CONST enum CBLAS_UPLO Uplo, OPENBLAS_CONST enum CBLAS_TRANSPOSE TransA, OPENBLAS_CONST enum CBLAS_DIAG Diag,
OPENBLAS_EXPORT void cblas_stpsv(OPENBLAS_CONST enum CBLAS_ORDER order, OPENBLAS_CONST enum CBLAS_UPLO Uplo, OPENBLAS_CONST enum CBLAS_TRANSPOSE TransA, OPENBLAS_CONST enum CBLAS_DIAG Diag,
OPENBLAS_CONST blasint N, OPENBLAS_CONST float *Ap, float *X, OPENBLAS_CONST blasint incX);
void cblas_dtpsv(OPENBLAS_CONST enum CBLAS_ORDER order, OPENBLAS_CONST enum CBLAS_UPLO Uplo, OPENBLAS_CONST enum CBLAS_TRANSPOSE TransA, OPENBLAS_CONST enum CBLAS_DIAG Diag,
OPENBLAS_EXPORT void cblas_dtpsv(OPENBLAS_CONST enum CBLAS_ORDER order, OPENBLAS_CONST enum CBLAS_UPLO Uplo, OPENBLAS_CONST enum CBLAS_TRANSPOSE TransA, OPENBLAS_CONST enum CBLAS_DIAG Diag,
OPENBLAS_CONST blasint N, OPENBLAS_CONST double *Ap, double *X, OPENBLAS_CONST blasint incX);
void cblas_ctpsv(OPENBLAS_CONST enum CBLAS_ORDER order, OPENBLAS_CONST enum CBLAS_UPLO Uplo, OPENBLAS_CONST enum CBLAS_TRANSPOSE TransA, OPENBLAS_CONST enum CBLAS_DIAG Diag,
OPENBLAS_EXPORT void cblas_ctpsv(OPENBLAS_CONST enum CBLAS_ORDER order, OPENBLAS_CONST enum CBLAS_UPLO Uplo, OPENBLAS_CONST enum CBLAS_TRANSPOSE TransA, OPENBLAS_CONST enum CBLAS_DIAG Diag,
OPENBLAS_CONST blasint N, OPENBLAS_CONST void *Ap, void *X, OPENBLAS_CONST blasint incX);
void cblas_ztpsv(OPENBLAS_CONST enum CBLAS_ORDER order, OPENBLAS_CONST enum CBLAS_UPLO Uplo, OPENBLAS_CONST enum CBLAS_TRANSPOSE TransA, OPENBLAS_CONST enum CBLAS_DIAG Diag,
OPENBLAS_EXPORT void cblas_ztpsv(OPENBLAS_CONST enum CBLAS_ORDER order, OPENBLAS_CONST enum CBLAS_UPLO Uplo, OPENBLAS_CONST enum CBLAS_TRANSPOSE TransA, OPENBLAS_CONST enum CBLAS_DIAG Diag,
OPENBLAS_CONST blasint N, OPENBLAS_CONST void *Ap, void *X, OPENBLAS_CONST blasint incX);
void cblas_ssymv(OPENBLAS_CONST enum CBLAS_ORDER order, OPENBLAS_CONST enum CBLAS_UPLO Uplo, OPENBLAS_CONST blasint N, OPENBLAS_CONST float alpha, OPENBLAS_CONST float *A,
OPENBLAS_EXPORT void cblas_ssymv(OPENBLAS_CONST enum CBLAS_ORDER order, OPENBLAS_CONST enum CBLAS_UPLO Uplo, OPENBLAS_CONST blasint N, OPENBLAS_CONST float alpha, OPENBLAS_CONST float *A,
OPENBLAS_CONST blasint lda, OPENBLAS_CONST float *X, OPENBLAS_CONST blasint incX, OPENBLAS_CONST float beta, float *Y, OPENBLAS_CONST blasint incY);
void cblas_dsymv(OPENBLAS_CONST enum CBLAS_ORDER order, OPENBLAS_CONST enum CBLAS_UPLO Uplo, OPENBLAS_CONST blasint N, OPENBLAS_CONST double alpha, OPENBLAS_CONST double *A,
OPENBLAS_EXPORT void cblas_dsymv(OPENBLAS_CONST enum CBLAS_ORDER order, OPENBLAS_CONST enum CBLAS_UPLO Uplo, OPENBLAS_CONST blasint N, OPENBLAS_CONST double alpha, OPENBLAS_CONST double *A,
OPENBLAS_CONST blasint lda, OPENBLAS_CONST double *X, OPENBLAS_CONST blasint incX, OPENBLAS_CONST double beta, double *Y, OPENBLAS_CONST blasint incY);
void cblas_chemv(OPENBLAS_CONST enum CBLAS_ORDER order, OPENBLAS_CONST enum CBLAS_UPLO Uplo, OPENBLAS_CONST blasint N, OPENBLAS_CONST void *alpha, OPENBLAS_CONST void *A,
OPENBLAS_EXPORT void cblas_chemv(OPENBLAS_CONST enum CBLAS_ORDER order, OPENBLAS_CONST enum CBLAS_UPLO Uplo, OPENBLAS_CONST blasint N, OPENBLAS_CONST void *alpha, OPENBLAS_CONST void *A,
OPENBLAS_CONST blasint lda, OPENBLAS_CONST void *X, OPENBLAS_CONST blasint incX, OPENBLAS_CONST void *beta, void *Y, OPENBLAS_CONST blasint incY);
void cblas_zhemv(OPENBLAS_CONST enum CBLAS_ORDER order, OPENBLAS_CONST enum CBLAS_UPLO Uplo, OPENBLAS_CONST blasint N, OPENBLAS_CONST void *alpha, OPENBLAS_CONST void *A,
OPENBLAS_EXPORT void cblas_zhemv(OPENBLAS_CONST enum CBLAS_ORDER order, OPENBLAS_CONST enum CBLAS_UPLO Uplo, OPENBLAS_CONST blasint N, OPENBLAS_CONST void *alpha, OPENBLAS_CONST void *A,
OPENBLAS_CONST blasint lda, OPENBLAS_CONST void *X, OPENBLAS_CONST blasint incX, OPENBLAS_CONST void *beta, void *Y, OPENBLAS_CONST blasint incY);
void cblas_sspmv(OPENBLAS_CONST enum CBLAS_ORDER order, OPENBLAS_CONST enum CBLAS_UPLO Uplo, OPENBLAS_CONST blasint N, OPENBLAS_CONST float alpha, OPENBLAS_CONST float *Ap,
OPENBLAS_EXPORT void cblas_sspmv(OPENBLAS_CONST enum CBLAS_ORDER order, OPENBLAS_CONST enum CBLAS_UPLO Uplo, OPENBLAS_CONST blasint N, OPENBLAS_CONST float alpha, OPENBLAS_CONST float *Ap,
OPENBLAS_CONST float *X, OPENBLAS_CONST blasint incX, OPENBLAS_CONST float beta, float *Y, OPENBLAS_CONST blasint incY);
void cblas_dspmv(OPENBLAS_CONST enum CBLAS_ORDER order, OPENBLAS_CONST enum CBLAS_UPLO Uplo, OPENBLAS_CONST blasint N, OPENBLAS_CONST double alpha, OPENBLAS_CONST double *Ap,
OPENBLAS_EXPORT void cblas_dspmv(OPENBLAS_CONST enum CBLAS_ORDER order, OPENBLAS_CONST enum CBLAS_UPLO Uplo, OPENBLAS_CONST blasint N, OPENBLAS_CONST double alpha, OPENBLAS_CONST double *Ap,
OPENBLAS_CONST double *X, OPENBLAS_CONST blasint incX, OPENBLAS_CONST double beta, double *Y, OPENBLAS_CONST blasint incY);
void cblas_sspr(OPENBLAS_CONST enum CBLAS_ORDER order, OPENBLAS_CONST enum CBLAS_UPLO Uplo, OPENBLAS_CONST blasint N, OPENBLAS_CONST float alpha, OPENBLAS_CONST float *X, OPENBLAS_CONST blasint incX, float *Ap);
void cblas_dspr(OPENBLAS_CONST enum CBLAS_ORDER order, OPENBLAS_CONST enum CBLAS_UPLO Uplo, OPENBLAS_CONST blasint N, OPENBLAS_CONST double alpha, OPENBLAS_CONST double *X, OPENBLAS_CONST blasint incX, double *Ap);
OPENBLAS_EXPORT void cblas_sspr(OPENBLAS_CONST enum CBLAS_ORDER order, OPENBLAS_CONST enum CBLAS_UPLO Uplo, OPENBLAS_CONST blasint N, OPENBLAS_CONST float alpha, OPENBLAS_CONST float *X, OPENBLAS_CONST blasint incX, float *Ap);
OPENBLAS_EXPORT void cblas_dspr(OPENBLAS_CONST enum CBLAS_ORDER order, OPENBLAS_CONST enum CBLAS_UPLO Uplo, OPENBLAS_CONST blasint N, OPENBLAS_CONST double alpha, OPENBLAS_CONST double *X, OPENBLAS_CONST blasint incX, double *Ap);
void cblas_chpr(OPENBLAS_CONST enum CBLAS_ORDER order, OPENBLAS_CONST enum CBLAS_UPLO Uplo, OPENBLAS_CONST blasint N, OPENBLAS_CONST float alpha, OPENBLAS_CONST void *X, OPENBLAS_CONST blasint incX, void *A);
void cblas_zhpr(OPENBLAS_CONST enum CBLAS_ORDER order, OPENBLAS_CONST enum CBLAS_UPLO Uplo, OPENBLAS_CONST blasint N, OPENBLAS_CONST double alpha, OPENBLAS_CONST void *X,OPENBLAS_CONST blasint incX, void *A);
OPENBLAS_EXPORT void cblas_chpr(OPENBLAS_CONST enum CBLAS_ORDER order, OPENBLAS_CONST enum CBLAS_UPLO Uplo, OPENBLAS_CONST blasint N, OPENBLAS_CONST float alpha, OPENBLAS_CONST void *X, OPENBLAS_CONST blasint incX, void *A);
OPENBLAS_EXPORT void cblas_zhpr(OPENBLAS_CONST enum CBLAS_ORDER order, OPENBLAS_CONST enum CBLAS_UPLO Uplo, OPENBLAS_CONST blasint N, OPENBLAS_CONST double alpha, OPENBLAS_CONST void *X,OPENBLAS_CONST blasint incX, void *A);
void cblas_sspr2(OPENBLAS_CONST enum CBLAS_ORDER order, OPENBLAS_CONST enum CBLAS_UPLO Uplo, OPENBLAS_CONST blasint N, OPENBLAS_CONST float alpha, OPENBLAS_CONST float *X, OPENBLAS_CONST blasint incX, OPENBLAS_CONST float *Y, OPENBLAS_CONST blasint incY, float *A);
void cblas_dspr2(OPENBLAS_CONST enum CBLAS_ORDER order, OPENBLAS_CONST enum CBLAS_UPLO Uplo, OPENBLAS_CONST blasint N, OPENBLAS_CONST double alpha, OPENBLAS_CONST double *X, OPENBLAS_CONST blasint incX, OPENBLAS_CONST double *Y, OPENBLAS_CONST blasint incY, double *A);
void cblas_chpr2(OPENBLAS_CONST enum CBLAS_ORDER order, OPENBLAS_CONST enum CBLAS_UPLO Uplo, OPENBLAS_CONST blasint N, OPENBLAS_CONST void *alpha, OPENBLAS_CONST void *X, OPENBLAS_CONST blasint incX, OPENBLAS_CONST void *Y, OPENBLAS_CONST blasint incY, void *Ap);
void cblas_zhpr2(OPENBLAS_CONST enum CBLAS_ORDER order, OPENBLAS_CONST enum CBLAS_UPLO Uplo, OPENBLAS_CONST blasint N, OPENBLAS_CONST void *alpha, OPENBLAS_CONST void *X, OPENBLAS_CONST blasint incX, OPENBLAS_CONST void *Y, OPENBLAS_CONST blasint incY, void *Ap);
OPENBLAS_EXPORT void cblas_sspr2(OPENBLAS_CONST enum CBLAS_ORDER order, OPENBLAS_CONST enum CBLAS_UPLO Uplo, OPENBLAS_CONST blasint N, OPENBLAS_CONST float alpha, OPENBLAS_CONST float *X, OPENBLAS_CONST blasint incX, OPENBLAS_CONST float *Y, OPENBLAS_CONST blasint incY, float *A);
OPENBLAS_EXPORT void cblas_dspr2(OPENBLAS_CONST enum CBLAS_ORDER order, OPENBLAS_CONST enum CBLAS_UPLO Uplo, OPENBLAS_CONST blasint N, OPENBLAS_CONST double alpha, OPENBLAS_CONST double *X, OPENBLAS_CONST blasint incX, OPENBLAS_CONST double *Y, OPENBLAS_CONST blasint incY, double *A);
OPENBLAS_EXPORT void cblas_chpr2(OPENBLAS_CONST enum CBLAS_ORDER order, OPENBLAS_CONST enum CBLAS_UPLO Uplo, OPENBLAS_CONST blasint N, OPENBLAS_CONST void *alpha, OPENBLAS_CONST void *X, OPENBLAS_CONST blasint incX, OPENBLAS_CONST void *Y, OPENBLAS_CONST blasint incY, void *Ap);
OPENBLAS_EXPORT void cblas_zhpr2(OPENBLAS_CONST enum CBLAS_ORDER order, OPENBLAS_CONST enum CBLAS_UPLO Uplo, OPENBLAS_CONST blasint N, OPENBLAS_CONST void *alpha, OPENBLAS_CONST void *X, OPENBLAS_CONST blasint incX, OPENBLAS_CONST void *Y, OPENBLAS_CONST blasint incY, void *Ap);
void cblas_chbmv(OPENBLAS_CONST enum CBLAS_ORDER order, OPENBLAS_CONST enum CBLAS_UPLO Uplo, OPENBLAS_CONST blasint N, OPENBLAS_CONST blasint K,
OPENBLAS_EXPORT void cblas_chbmv(OPENBLAS_CONST enum CBLAS_ORDER order, OPENBLAS_CONST enum CBLAS_UPLO Uplo, OPENBLAS_CONST blasint N, OPENBLAS_CONST blasint K,
OPENBLAS_CONST void *alpha, OPENBLAS_CONST void *A, OPENBLAS_CONST blasint lda, OPENBLAS_CONST void *X, OPENBLAS_CONST blasint incX, OPENBLAS_CONST void *beta, void *Y, OPENBLAS_CONST blasint incY);
void cblas_zhbmv(OPENBLAS_CONST enum CBLAS_ORDER order, OPENBLAS_CONST enum CBLAS_UPLO Uplo, OPENBLAS_CONST blasint N, OPENBLAS_CONST blasint K,
OPENBLAS_EXPORT void cblas_zhbmv(OPENBLAS_CONST enum CBLAS_ORDER order, OPENBLAS_CONST enum CBLAS_UPLO Uplo, OPENBLAS_CONST blasint N, OPENBLAS_CONST blasint K,
OPENBLAS_CONST void *alpha, OPENBLAS_CONST void *A, OPENBLAS_CONST blasint lda, OPENBLAS_CONST void *X, OPENBLAS_CONST blasint incX, OPENBLAS_CONST void *beta, void *Y, OPENBLAS_CONST blasint incY);
void cblas_chpmv(OPENBLAS_CONST enum CBLAS_ORDER order, OPENBLAS_CONST enum CBLAS_UPLO Uplo, OPENBLAS_CONST blasint N,
OPENBLAS_EXPORT void cblas_chpmv(OPENBLAS_CONST enum CBLAS_ORDER order, OPENBLAS_CONST enum CBLAS_UPLO Uplo, OPENBLAS_CONST blasint N,
OPENBLAS_CONST void *alpha, OPENBLAS_CONST void *Ap, OPENBLAS_CONST void *X, OPENBLAS_CONST blasint incX, OPENBLAS_CONST void *beta, void *Y, OPENBLAS_CONST blasint incY);
void cblas_zhpmv(OPENBLAS_CONST enum CBLAS_ORDER order, OPENBLAS_CONST enum CBLAS_UPLO Uplo, OPENBLAS_CONST blasint N,
OPENBLAS_EXPORT void cblas_zhpmv(OPENBLAS_CONST enum CBLAS_ORDER order, OPENBLAS_CONST enum CBLAS_UPLO Uplo, OPENBLAS_CONST blasint N,
OPENBLAS_CONST void *alpha, OPENBLAS_CONST void *Ap, OPENBLAS_CONST void *X, OPENBLAS_CONST blasint incX, OPENBLAS_CONST void *beta, void *Y, OPENBLAS_CONST blasint incY);
void cblas_sgemm(OPENBLAS_CONST enum CBLAS_ORDER Order, OPENBLAS_CONST enum CBLAS_TRANSPOSE TransA, OPENBLAS_CONST enum CBLAS_TRANSPOSE TransB, OPENBLAS_CONST blasint M, OPENBLAS_CONST blasint N, OPENBLAS_CONST blasint K,
OPENBLAS_EXPORT void cblas_sgemm(OPENBLAS_CONST enum CBLAS_ORDER Order, OPENBLAS_CONST enum CBLAS_TRANSPOSE TransA, OPENBLAS_CONST enum CBLAS_TRANSPOSE TransB, OPENBLAS_CONST blasint M, OPENBLAS_CONST blasint N, OPENBLAS_CONST blasint K,
OPENBLAS_CONST float alpha, OPENBLAS_CONST float *A, OPENBLAS_CONST blasint lda, OPENBLAS_CONST float *B, OPENBLAS_CONST blasint ldb, OPENBLAS_CONST float beta, float *C, OPENBLAS_CONST blasint ldc);
void cblas_dgemm(OPENBLAS_CONST enum CBLAS_ORDER Order, OPENBLAS_CONST enum CBLAS_TRANSPOSE TransA, OPENBLAS_CONST enum CBLAS_TRANSPOSE TransB, OPENBLAS_CONST blasint M, OPENBLAS_CONST blasint N, OPENBLAS_CONST blasint K,
OPENBLAS_EXPORT void cblas_dgemm(OPENBLAS_CONST enum CBLAS_ORDER Order, OPENBLAS_CONST enum CBLAS_TRANSPOSE TransA, OPENBLAS_CONST enum CBLAS_TRANSPOSE TransB, OPENBLAS_CONST blasint M, OPENBLAS_CONST blasint N, OPENBLAS_CONST blasint K,
OPENBLAS_CONST double alpha, OPENBLAS_CONST double *A, OPENBLAS_CONST blasint lda, OPENBLAS_CONST double *B, OPENBLAS_CONST blasint ldb, OPENBLAS_CONST double beta, double *C, OPENBLAS_CONST blasint ldc);
void cblas_cgemm(OPENBLAS_CONST enum CBLAS_ORDER Order, OPENBLAS_CONST enum CBLAS_TRANSPOSE TransA, OPENBLAS_CONST enum CBLAS_TRANSPOSE TransB, OPENBLAS_CONST blasint M, OPENBLAS_CONST blasint N, OPENBLAS_CONST blasint K,
OPENBLAS_EXPORT void cblas_cgemm(OPENBLAS_CONST enum CBLAS_ORDER Order, OPENBLAS_CONST enum CBLAS_TRANSPOSE TransA, OPENBLAS_CONST enum CBLAS_TRANSPOSE TransB, OPENBLAS_CONST blasint M, OPENBLAS_CONST blasint N, OPENBLAS_CONST blasint K,
OPENBLAS_CONST void *alpha, OPENBLAS_CONST void *A, OPENBLAS_CONST blasint lda, OPENBLAS_CONST void *B, OPENBLAS_CONST blasint ldb, OPENBLAS_CONST void *beta, void *C, OPENBLAS_CONST blasint ldc);
void cblas_cgemm3m(OPENBLAS_CONST enum CBLAS_ORDER Order, OPENBLAS_CONST enum CBLAS_TRANSPOSE TransA, OPENBLAS_CONST enum CBLAS_TRANSPOSE TransB, OPENBLAS_CONST blasint M, OPENBLAS_CONST blasint N, OPENBLAS_CONST blasint K,
OPENBLAS_EXPORT void cblas_cgemm3m(OPENBLAS_CONST enum CBLAS_ORDER Order, OPENBLAS_CONST enum CBLAS_TRANSPOSE TransA, OPENBLAS_CONST enum CBLAS_TRANSPOSE TransB, OPENBLAS_CONST blasint M, OPENBLAS_CONST blasint N, OPENBLAS_CONST blasint K,
OPENBLAS_CONST void *alpha, OPENBLAS_CONST void *A, OPENBLAS_CONST blasint lda, OPENBLAS_CONST void *B, OPENBLAS_CONST blasint ldb, OPENBLAS_CONST void *beta, void *C, OPENBLAS_CONST blasint ldc);
void cblas_zgemm(OPENBLAS_CONST enum CBLAS_ORDER Order, OPENBLAS_CONST enum CBLAS_TRANSPOSE TransA, OPENBLAS_CONST enum CBLAS_TRANSPOSE TransB, OPENBLAS_CONST blasint M, OPENBLAS_CONST blasint N, OPENBLAS_CONST blasint K,
OPENBLAS_EXPORT void cblas_zgemm(OPENBLAS_CONST enum CBLAS_ORDER Order, OPENBLAS_CONST enum CBLAS_TRANSPOSE TransA, OPENBLAS_CONST enum CBLAS_TRANSPOSE TransB, OPENBLAS_CONST blasint M, OPENBLAS_CONST blasint N, OPENBLAS_CONST blasint K,
OPENBLAS_CONST void *alpha, OPENBLAS_CONST void *A, OPENBLAS_CONST blasint lda, OPENBLAS_CONST void *B, OPENBLAS_CONST blasint ldb, OPENBLAS_CONST void *beta, void *C, OPENBLAS_CONST blasint ldc);
void cblas_zgemm3m(OPENBLAS_CONST enum CBLAS_ORDER Order, OPENBLAS_CONST enum CBLAS_TRANSPOSE TransA, OPENBLAS_CONST enum CBLAS_TRANSPOSE TransB, OPENBLAS_CONST blasint M, OPENBLAS_CONST blasint N, OPENBLAS_CONST blasint K,
OPENBLAS_EXPORT void cblas_zgemm3m(OPENBLAS_CONST enum CBLAS_ORDER Order, OPENBLAS_CONST enum CBLAS_TRANSPOSE TransA, OPENBLAS_CONST enum CBLAS_TRANSPOSE TransB, OPENBLAS_CONST blasint M, OPENBLAS_CONST blasint N, OPENBLAS_CONST blasint K,
OPENBLAS_CONST void *alpha, OPENBLAS_CONST void *A, OPENBLAS_CONST blasint lda, OPENBLAS_CONST void *B, OPENBLAS_CONST blasint ldb, OPENBLAS_CONST void *beta, void *C, OPENBLAS_CONST blasint ldc);
void cblas_sgemmt(OPENBLAS_CONST enum CBLAS_ORDER Order, OPENBLAS_CONST enum CBLAS_UPLO Uplo, OPENBLAS_CONST enum CBLAS_TRANSPOSE TransA, OPENBLAS_CONST enum CBLAS_TRANSPOSE TransB, OPENBLAS_CONST blasint M, OPENBLAS_CONST blasint K,
OPENBLAS_EXPORT void cblas_sgemmt(OPENBLAS_CONST enum CBLAS_ORDER Order, OPENBLAS_CONST enum CBLAS_UPLO Uplo, OPENBLAS_CONST enum CBLAS_TRANSPOSE TransA, OPENBLAS_CONST enum CBLAS_TRANSPOSE TransB, OPENBLAS_CONST blasint M, OPENBLAS_CONST blasint K,
OPENBLAS_CONST float alpha, OPENBLAS_CONST float *A, OPENBLAS_CONST blasint lda, OPENBLAS_CONST float *B, OPENBLAS_CONST blasint ldb, OPENBLAS_CONST float beta, float *C, OPENBLAS_CONST blasint ldc);
void cblas_dgemmt(OPENBLAS_CONST enum CBLAS_ORDER Order, OPENBLAS_CONST enum CBLAS_UPLO Uplo, OPENBLAS_CONST enum CBLAS_TRANSPOSE TransA, OPENBLAS_CONST enum CBLAS_TRANSPOSE TransB, OPENBLAS_CONST blasint M, OPENBLAS_CONST blasint K,
OPENBLAS_EXPORT void cblas_dgemmt(OPENBLAS_CONST enum CBLAS_ORDER Order, OPENBLAS_CONST enum CBLAS_UPLO Uplo, OPENBLAS_CONST enum CBLAS_TRANSPOSE TransA, OPENBLAS_CONST enum CBLAS_TRANSPOSE TransB, OPENBLAS_CONST blasint M, OPENBLAS_CONST blasint K,
OPENBLAS_CONST double alpha, OPENBLAS_CONST double *A, OPENBLAS_CONST blasint lda, OPENBLAS_CONST double *B, OPENBLAS_CONST blasint ldb, OPENBLAS_CONST double beta, double *C, OPENBLAS_CONST blasint ldc);
void cblas_cgemmt(OPENBLAS_CONST enum CBLAS_ORDER Order, OPENBLAS_CONST enum CBLAS_UPLO Uplo, OPENBLAS_CONST enum CBLAS_TRANSPOSE TransA, OPENBLAS_CONST enum CBLAS_TRANSPOSE TransB, OPENBLAS_CONST blasint M, OPENBLAS_CONST blasint K,
OPENBLAS_EXPORT void cblas_cgemmt(OPENBLAS_CONST enum CBLAS_ORDER Order, OPENBLAS_CONST enum CBLAS_UPLO Uplo, OPENBLAS_CONST enum CBLAS_TRANSPOSE TransA, OPENBLAS_CONST enum CBLAS_TRANSPOSE TransB, OPENBLAS_CONST blasint M, OPENBLAS_CONST blasint K,
OPENBLAS_CONST void *alpha, OPENBLAS_CONST void *A, OPENBLAS_CONST blasint lda, OPENBLAS_CONST void *B, OPENBLAS_CONST blasint ldb, OPENBLAS_CONST void *beta, void *C, OPENBLAS_CONST blasint ldc);
void cblas_zgemmt(OPENBLAS_CONST enum CBLAS_ORDER Order, OPENBLAS_CONST enum CBLAS_UPLO Uplo, OPENBLAS_CONST enum CBLAS_TRANSPOSE TransA, OPENBLAS_CONST enum CBLAS_TRANSPOSE TransB, OPENBLAS_CONST blasint M, OPENBLAS_CONST blasint K,
OPENBLAS_EXPORT void cblas_zgemmt(OPENBLAS_CONST enum CBLAS_ORDER Order, OPENBLAS_CONST enum CBLAS_UPLO Uplo, OPENBLAS_CONST enum CBLAS_TRANSPOSE TransA, OPENBLAS_CONST enum CBLAS_TRANSPOSE TransB, OPENBLAS_CONST blasint M, OPENBLAS_CONST blasint K,
OPENBLAS_CONST void *alpha, OPENBLAS_CONST void *A, OPENBLAS_CONST blasint lda, OPENBLAS_CONST void *B, OPENBLAS_CONST blasint ldb, OPENBLAS_CONST void *beta, void *C, OPENBLAS_CONST blasint ldc);
void cblas_ssymm(OPENBLAS_CONST enum CBLAS_ORDER Order, OPENBLAS_CONST enum CBLAS_SIDE Side, OPENBLAS_CONST enum CBLAS_UPLO Uplo, OPENBLAS_CONST blasint M, OPENBLAS_CONST blasint N,
OPENBLAS_EXPORT void cblas_ssymm(OPENBLAS_CONST enum CBLAS_ORDER Order, OPENBLAS_CONST enum CBLAS_SIDE Side, OPENBLAS_CONST enum CBLAS_UPLO Uplo, OPENBLAS_CONST blasint M, OPENBLAS_CONST blasint N,
OPENBLAS_CONST float alpha, OPENBLAS_CONST float *A, OPENBLAS_CONST blasint lda, OPENBLAS_CONST float *B, OPENBLAS_CONST blasint ldb, OPENBLAS_CONST float beta, float *C, OPENBLAS_CONST blasint ldc);
void cblas_dsymm(OPENBLAS_CONST enum CBLAS_ORDER Order, OPENBLAS_CONST enum CBLAS_SIDE Side, OPENBLAS_CONST enum CBLAS_UPLO Uplo, OPENBLAS_CONST blasint M, OPENBLAS_CONST blasint N,
OPENBLAS_EXPORT void cblas_dsymm(OPENBLAS_CONST enum CBLAS_ORDER Order, OPENBLAS_CONST enum CBLAS_SIDE Side, OPENBLAS_CONST enum CBLAS_UPLO Uplo, OPENBLAS_CONST blasint M, OPENBLAS_CONST blasint N,
OPENBLAS_CONST double alpha, OPENBLAS_CONST double *A, OPENBLAS_CONST blasint lda, OPENBLAS_CONST double *B, OPENBLAS_CONST blasint ldb, OPENBLAS_CONST double beta, double *C, OPENBLAS_CONST blasint ldc);
void cblas_csymm(OPENBLAS_CONST enum CBLAS_ORDER Order, OPENBLAS_CONST enum CBLAS_SIDE Side, OPENBLAS_CONST enum CBLAS_UPLO Uplo, OPENBLAS_CONST blasint M, OPENBLAS_CONST blasint N,
OPENBLAS_EXPORT void cblas_csymm(OPENBLAS_CONST enum CBLAS_ORDER Order, OPENBLAS_CONST enum CBLAS_SIDE Side, OPENBLAS_CONST enum CBLAS_UPLO Uplo, OPENBLAS_CONST blasint M, OPENBLAS_CONST blasint N,
OPENBLAS_CONST void *alpha, OPENBLAS_CONST void *A, OPENBLAS_CONST blasint lda, OPENBLAS_CONST void *B, OPENBLAS_CONST blasint ldb, OPENBLAS_CONST void *beta, void *C, OPENBLAS_CONST blasint ldc);
void cblas_zsymm(OPENBLAS_CONST enum CBLAS_ORDER Order, OPENBLAS_CONST enum CBLAS_SIDE Side, OPENBLAS_CONST enum CBLAS_UPLO Uplo, OPENBLAS_CONST blasint M, OPENBLAS_CONST blasint N,
OPENBLAS_EXPORT void cblas_zsymm(OPENBLAS_CONST enum CBLAS_ORDER Order, OPENBLAS_CONST enum CBLAS_SIDE Side, OPENBLAS_CONST enum CBLAS_UPLO Uplo, OPENBLAS_CONST blasint M, OPENBLAS_CONST blasint N,
OPENBLAS_CONST void *alpha, OPENBLAS_CONST void *A, OPENBLAS_CONST blasint lda, OPENBLAS_CONST void *B, OPENBLAS_CONST blasint ldb, OPENBLAS_CONST void *beta, void *C, OPENBLAS_CONST blasint ldc);
void cblas_ssyrk(OPENBLAS_CONST enum CBLAS_ORDER Order, OPENBLAS_CONST enum CBLAS_UPLO Uplo, OPENBLAS_CONST enum CBLAS_TRANSPOSE Trans,
OPENBLAS_EXPORT void cblas_ssyrk(OPENBLAS_CONST enum CBLAS_ORDER Order, OPENBLAS_CONST enum CBLAS_UPLO Uplo, OPENBLAS_CONST enum CBLAS_TRANSPOSE Trans,
OPENBLAS_CONST blasint N, OPENBLAS_CONST blasint K, OPENBLAS_CONST float alpha, OPENBLAS_CONST float *A, OPENBLAS_CONST blasint lda, OPENBLAS_CONST float beta, float *C, OPENBLAS_CONST blasint ldc);
void cblas_dsyrk(OPENBLAS_CONST enum CBLAS_ORDER Order, OPENBLAS_CONST enum CBLAS_UPLO Uplo, OPENBLAS_CONST enum CBLAS_TRANSPOSE Trans,
OPENBLAS_EXPORT void cblas_dsyrk(OPENBLAS_CONST enum CBLAS_ORDER Order, OPENBLAS_CONST enum CBLAS_UPLO Uplo, OPENBLAS_CONST enum CBLAS_TRANSPOSE Trans,
OPENBLAS_CONST blasint N, OPENBLAS_CONST blasint K, OPENBLAS_CONST double alpha, OPENBLAS_CONST double *A, OPENBLAS_CONST blasint lda, OPENBLAS_CONST double beta, double *C, OPENBLAS_CONST blasint ldc);
void cblas_csyrk(OPENBLAS_CONST enum CBLAS_ORDER Order, OPENBLAS_CONST enum CBLAS_UPLO Uplo, OPENBLAS_CONST enum CBLAS_TRANSPOSE Trans,
OPENBLAS_EXPORT void cblas_csyrk(OPENBLAS_CONST enum CBLAS_ORDER Order, OPENBLAS_CONST enum CBLAS_UPLO Uplo, OPENBLAS_CONST enum CBLAS_TRANSPOSE Trans,
OPENBLAS_CONST blasint N, OPENBLAS_CONST blasint K, OPENBLAS_CONST void *alpha, OPENBLAS_CONST void *A, OPENBLAS_CONST blasint lda, OPENBLAS_CONST void *beta, void *C, OPENBLAS_CONST blasint ldc);
void cblas_zsyrk(OPENBLAS_CONST enum CBLAS_ORDER Order, OPENBLAS_CONST enum CBLAS_UPLO Uplo, OPENBLAS_CONST enum CBLAS_TRANSPOSE Trans,
OPENBLAS_EXPORT void cblas_zsyrk(OPENBLAS_CONST enum CBLAS_ORDER Order, OPENBLAS_CONST enum CBLAS_UPLO Uplo, OPENBLAS_CONST enum CBLAS_TRANSPOSE Trans,
OPENBLAS_CONST blasint N, OPENBLAS_CONST blasint K, OPENBLAS_CONST void *alpha, OPENBLAS_CONST void *A, OPENBLAS_CONST blasint lda, OPENBLAS_CONST void *beta, void *C, OPENBLAS_CONST blasint ldc);
void cblas_ssyr2k(OPENBLAS_CONST enum CBLAS_ORDER Order, OPENBLAS_CONST enum CBLAS_UPLO Uplo, OPENBLAS_CONST enum CBLAS_TRANSPOSE Trans,
OPENBLAS_EXPORT void cblas_ssyr2k(OPENBLAS_CONST enum CBLAS_ORDER Order, OPENBLAS_CONST enum CBLAS_UPLO Uplo, OPENBLAS_CONST enum CBLAS_TRANSPOSE Trans,
OPENBLAS_CONST blasint N, OPENBLAS_CONST blasint K, OPENBLAS_CONST float alpha, OPENBLAS_CONST float *A, OPENBLAS_CONST blasint lda, OPENBLAS_CONST float *B, OPENBLAS_CONST blasint ldb, OPENBLAS_CONST float beta, float *C, OPENBLAS_CONST blasint ldc);
void cblas_dsyr2k(OPENBLAS_CONST enum CBLAS_ORDER Order, OPENBLAS_CONST enum CBLAS_UPLO Uplo, OPENBLAS_CONST enum CBLAS_TRANSPOSE Trans,
OPENBLAS_EXPORT void cblas_dsyr2k(OPENBLAS_CONST enum CBLAS_ORDER Order, OPENBLAS_CONST enum CBLAS_UPLO Uplo, OPENBLAS_CONST enum CBLAS_TRANSPOSE Trans,
OPENBLAS_CONST blasint N, OPENBLAS_CONST blasint K, OPENBLAS_CONST double alpha, OPENBLAS_CONST double *A, OPENBLAS_CONST blasint lda, OPENBLAS_CONST double *B, OPENBLAS_CONST blasint ldb, OPENBLAS_CONST double beta, double *C, OPENBLAS_CONST blasint ldc);
void cblas_csyr2k(OPENBLAS_CONST enum CBLAS_ORDER Order, OPENBLAS_CONST enum CBLAS_UPLO Uplo, OPENBLAS_CONST enum CBLAS_TRANSPOSE Trans,
OPENBLAS_EXPORT void cblas_csyr2k(OPENBLAS_CONST enum CBLAS_ORDER Order, OPENBLAS_CONST enum CBLAS_UPLO Uplo, OPENBLAS_CONST enum CBLAS_TRANSPOSE Trans,
OPENBLAS_CONST blasint N, OPENBLAS_CONST blasint K, OPENBLAS_CONST void *alpha, OPENBLAS_CONST void *A, OPENBLAS_CONST blasint lda, OPENBLAS_CONST void *B, OPENBLAS_CONST blasint ldb, OPENBLAS_CONST void *beta, void *C, OPENBLAS_CONST blasint ldc);
void cblas_zsyr2k(OPENBLAS_CONST enum CBLAS_ORDER Order, OPENBLAS_CONST enum CBLAS_UPLO Uplo, OPENBLAS_CONST enum CBLAS_TRANSPOSE Trans,
OPENBLAS_EXPORT void cblas_zsyr2k(OPENBLAS_CONST enum CBLAS_ORDER Order, OPENBLAS_CONST enum CBLAS_UPLO Uplo, OPENBLAS_CONST enum CBLAS_TRANSPOSE Trans,
OPENBLAS_CONST blasint N, OPENBLAS_CONST blasint K, OPENBLAS_CONST void *alpha, OPENBLAS_CONST void *A, OPENBLAS_CONST blasint lda, OPENBLAS_CONST void *B, OPENBLAS_CONST blasint ldb, OPENBLAS_CONST void *beta, void *C, OPENBLAS_CONST blasint ldc);
void cblas_strmm(OPENBLAS_CONST enum CBLAS_ORDER Order, OPENBLAS_CONST enum CBLAS_SIDE Side, OPENBLAS_CONST enum CBLAS_UPLO Uplo, OPENBLAS_CONST enum CBLAS_TRANSPOSE TransA,
OPENBLAS_EXPORT void cblas_strmm(OPENBLAS_CONST enum CBLAS_ORDER Order, OPENBLAS_CONST enum CBLAS_SIDE Side, OPENBLAS_CONST enum CBLAS_UPLO Uplo, OPENBLAS_CONST enum CBLAS_TRANSPOSE TransA,
OPENBLAS_CONST enum CBLAS_DIAG Diag, OPENBLAS_CONST blasint M, OPENBLAS_CONST blasint N, OPENBLAS_CONST float alpha, OPENBLAS_CONST float *A, OPENBLAS_CONST blasint lda, float *B, OPENBLAS_CONST blasint ldb);
void cblas_dtrmm(OPENBLAS_CONST enum CBLAS_ORDER Order, OPENBLAS_CONST enum CBLAS_SIDE Side, OPENBLAS_CONST enum CBLAS_UPLO Uplo, OPENBLAS_CONST enum CBLAS_TRANSPOSE TransA,
OPENBLAS_EXPORT void cblas_dtrmm(OPENBLAS_CONST enum CBLAS_ORDER Order, OPENBLAS_CONST enum CBLAS_SIDE Side, OPENBLAS_CONST enum CBLAS_UPLO Uplo, OPENBLAS_CONST enum CBLAS_TRANSPOSE TransA,
OPENBLAS_CONST enum CBLAS_DIAG Diag, OPENBLAS_CONST blasint M, OPENBLAS_CONST blasint N, OPENBLAS_CONST double alpha, OPENBLAS_CONST double *A, OPENBLAS_CONST blasint lda, double *B, OPENBLAS_CONST blasint ldb);
void cblas_ctrmm(OPENBLAS_CONST enum CBLAS_ORDER Order, OPENBLAS_CONST enum CBLAS_SIDE Side, OPENBLAS_CONST enum CBLAS_UPLO Uplo, OPENBLAS_CONST enum CBLAS_TRANSPOSE TransA,
OPENBLAS_EXPORT void cblas_ctrmm(OPENBLAS_CONST enum CBLAS_ORDER Order, OPENBLAS_CONST enum CBLAS_SIDE Side, OPENBLAS_CONST enum CBLAS_UPLO Uplo, OPENBLAS_CONST enum CBLAS_TRANSPOSE TransA,
OPENBLAS_CONST enum CBLAS_DIAG Diag, OPENBLAS_CONST blasint M, OPENBLAS_CONST blasint N, OPENBLAS_CONST void *alpha, OPENBLAS_CONST void *A, OPENBLAS_CONST blasint lda, void *B, OPENBLAS_CONST blasint ldb);
void cblas_ztrmm(OPENBLAS_CONST enum CBLAS_ORDER Order, OPENBLAS_CONST enum CBLAS_SIDE Side, OPENBLAS_CONST enum CBLAS_UPLO Uplo, OPENBLAS_CONST enum CBLAS_TRANSPOSE TransA,
OPENBLAS_EXPORT void cblas_ztrmm(OPENBLAS_CONST enum CBLAS_ORDER Order, OPENBLAS_CONST enum CBLAS_SIDE Side, OPENBLAS_CONST enum CBLAS_UPLO Uplo, OPENBLAS_CONST enum CBLAS_TRANSPOSE TransA,
OPENBLAS_CONST enum CBLAS_DIAG Diag, OPENBLAS_CONST blasint M, OPENBLAS_CONST blasint N, OPENBLAS_CONST void *alpha, OPENBLAS_CONST void *A, OPENBLAS_CONST blasint lda, void *B, OPENBLAS_CONST blasint ldb);
void cblas_strsm(OPENBLAS_CONST enum CBLAS_ORDER Order, OPENBLAS_CONST enum CBLAS_SIDE Side, OPENBLAS_CONST enum CBLAS_UPLO Uplo, OPENBLAS_CONST enum CBLAS_TRANSPOSE TransA,
OPENBLAS_EXPORT void cblas_strsm(OPENBLAS_CONST enum CBLAS_ORDER Order, OPENBLAS_CONST enum CBLAS_SIDE Side, OPENBLAS_CONST enum CBLAS_UPLO Uplo, OPENBLAS_CONST enum CBLAS_TRANSPOSE TransA,
OPENBLAS_CONST enum CBLAS_DIAG Diag, OPENBLAS_CONST blasint M, OPENBLAS_CONST blasint N, OPENBLAS_CONST float alpha, OPENBLAS_CONST float *A, OPENBLAS_CONST blasint lda, float *B, OPENBLAS_CONST blasint ldb);
void cblas_dtrsm(OPENBLAS_CONST enum CBLAS_ORDER Order, OPENBLAS_CONST enum CBLAS_SIDE Side, OPENBLAS_CONST enum CBLAS_UPLO Uplo, OPENBLAS_CONST enum CBLAS_TRANSPOSE TransA,
OPENBLAS_EXPORT void cblas_dtrsm(OPENBLAS_CONST enum CBLAS_ORDER Order, OPENBLAS_CONST enum CBLAS_SIDE Side, OPENBLAS_CONST enum CBLAS_UPLO Uplo, OPENBLAS_CONST enum CBLAS_TRANSPOSE TransA,
OPENBLAS_CONST enum CBLAS_DIAG Diag, OPENBLAS_CONST blasint M, OPENBLAS_CONST blasint N, OPENBLAS_CONST double alpha, OPENBLAS_CONST double *A, OPENBLAS_CONST blasint lda, double *B, OPENBLAS_CONST blasint ldb);
void cblas_ctrsm(OPENBLAS_CONST enum CBLAS_ORDER Order, OPENBLAS_CONST enum CBLAS_SIDE Side, OPENBLAS_CONST enum CBLAS_UPLO Uplo, OPENBLAS_CONST enum CBLAS_TRANSPOSE TransA,
OPENBLAS_EXPORT void cblas_ctrsm(OPENBLAS_CONST enum CBLAS_ORDER Order, OPENBLAS_CONST enum CBLAS_SIDE Side, OPENBLAS_CONST enum CBLAS_UPLO Uplo, OPENBLAS_CONST enum CBLAS_TRANSPOSE TransA,
OPENBLAS_CONST enum CBLAS_DIAG Diag, OPENBLAS_CONST blasint M, OPENBLAS_CONST blasint N, OPENBLAS_CONST void *alpha, OPENBLAS_CONST void *A, OPENBLAS_CONST blasint lda, void *B, OPENBLAS_CONST blasint ldb);
void cblas_ztrsm(OPENBLAS_CONST enum CBLAS_ORDER Order, OPENBLAS_CONST enum CBLAS_SIDE Side, OPENBLAS_CONST enum CBLAS_UPLO Uplo, OPENBLAS_CONST enum CBLAS_TRANSPOSE TransA,
OPENBLAS_EXPORT void cblas_ztrsm(OPENBLAS_CONST enum CBLAS_ORDER Order, OPENBLAS_CONST enum CBLAS_SIDE Side, OPENBLAS_CONST enum CBLAS_UPLO Uplo, OPENBLAS_CONST enum CBLAS_TRANSPOSE TransA,
OPENBLAS_CONST enum CBLAS_DIAG Diag, OPENBLAS_CONST blasint M, OPENBLAS_CONST blasint N, OPENBLAS_CONST void *alpha, OPENBLAS_CONST void *A, OPENBLAS_CONST blasint lda, void *B, OPENBLAS_CONST blasint ldb);
void cblas_chemm(OPENBLAS_CONST enum CBLAS_ORDER Order, OPENBLAS_CONST enum CBLAS_SIDE Side, OPENBLAS_CONST enum CBLAS_UPLO Uplo, OPENBLAS_CONST blasint M, OPENBLAS_CONST blasint N,
OPENBLAS_EXPORT void cblas_chemm(OPENBLAS_CONST enum CBLAS_ORDER Order, OPENBLAS_CONST enum CBLAS_SIDE Side, OPENBLAS_CONST enum CBLAS_UPLO Uplo, OPENBLAS_CONST blasint M, OPENBLAS_CONST blasint N,
OPENBLAS_CONST void *alpha, OPENBLAS_CONST void *A, OPENBLAS_CONST blasint lda, OPENBLAS_CONST void *B, OPENBLAS_CONST blasint ldb, OPENBLAS_CONST void *beta, void *C, OPENBLAS_CONST blasint ldc);
void cblas_zhemm(OPENBLAS_CONST enum CBLAS_ORDER Order, OPENBLAS_CONST enum CBLAS_SIDE Side, OPENBLAS_CONST enum CBLAS_UPLO Uplo, OPENBLAS_CONST blasint M, OPENBLAS_CONST blasint N,
OPENBLAS_EXPORT void cblas_zhemm(OPENBLAS_CONST enum CBLAS_ORDER Order, OPENBLAS_CONST enum CBLAS_SIDE Side, OPENBLAS_CONST enum CBLAS_UPLO Uplo, OPENBLAS_CONST blasint M, OPENBLAS_CONST blasint N,
OPENBLAS_CONST void *alpha, OPENBLAS_CONST void *A, OPENBLAS_CONST blasint lda, OPENBLAS_CONST void *B, OPENBLAS_CONST blasint ldb, OPENBLAS_CONST void *beta, void *C, OPENBLAS_CONST blasint ldc);
void cblas_cherk(OPENBLAS_CONST enum CBLAS_ORDER Order, OPENBLAS_CONST enum CBLAS_UPLO Uplo, OPENBLAS_CONST enum CBLAS_TRANSPOSE Trans, OPENBLAS_CONST blasint N, OPENBLAS_CONST blasint K,
OPENBLAS_EXPORT void cblas_cherk(OPENBLAS_CONST enum CBLAS_ORDER Order, OPENBLAS_CONST enum CBLAS_UPLO Uplo, OPENBLAS_CONST enum CBLAS_TRANSPOSE Trans, OPENBLAS_CONST blasint N, OPENBLAS_CONST blasint K,
OPENBLAS_CONST float alpha, OPENBLAS_CONST void *A, OPENBLAS_CONST blasint lda, OPENBLAS_CONST float beta, void *C, OPENBLAS_CONST blasint ldc);
void cblas_zherk(OPENBLAS_CONST enum CBLAS_ORDER Order, OPENBLAS_CONST enum CBLAS_UPLO Uplo, OPENBLAS_CONST enum CBLAS_TRANSPOSE Trans, OPENBLAS_CONST blasint N, OPENBLAS_CONST blasint K,
OPENBLAS_EXPORT void cblas_zherk(OPENBLAS_CONST enum CBLAS_ORDER Order, OPENBLAS_CONST enum CBLAS_UPLO Uplo, OPENBLAS_CONST enum CBLAS_TRANSPOSE Trans, OPENBLAS_CONST blasint N, OPENBLAS_CONST blasint K,
OPENBLAS_CONST double alpha, OPENBLAS_CONST void *A, OPENBLAS_CONST blasint lda, OPENBLAS_CONST double beta, void *C, OPENBLAS_CONST blasint ldc);
void cblas_cher2k(OPENBLAS_CONST enum CBLAS_ORDER Order, OPENBLAS_CONST enum CBLAS_UPLO Uplo, OPENBLAS_CONST enum CBLAS_TRANSPOSE Trans, OPENBLAS_CONST blasint N, OPENBLAS_CONST blasint K,
OPENBLAS_EXPORT void cblas_cher2k(OPENBLAS_CONST enum CBLAS_ORDER Order, OPENBLAS_CONST enum CBLAS_UPLO Uplo, OPENBLAS_CONST enum CBLAS_TRANSPOSE Trans, OPENBLAS_CONST blasint N, OPENBLAS_CONST blasint K,
OPENBLAS_CONST void *alpha, OPENBLAS_CONST void *A, OPENBLAS_CONST blasint lda, OPENBLAS_CONST void *B, OPENBLAS_CONST blasint ldb, OPENBLAS_CONST float beta, void *C, OPENBLAS_CONST blasint ldc);
void cblas_zher2k(OPENBLAS_CONST enum CBLAS_ORDER Order, OPENBLAS_CONST enum CBLAS_UPLO Uplo, OPENBLAS_CONST enum CBLAS_TRANSPOSE Trans, OPENBLAS_CONST blasint N, OPENBLAS_CONST blasint K,
OPENBLAS_EXPORT void cblas_zher2k(OPENBLAS_CONST enum CBLAS_ORDER Order, OPENBLAS_CONST enum CBLAS_UPLO Uplo, OPENBLAS_CONST enum CBLAS_TRANSPOSE Trans, OPENBLAS_CONST blasint N, OPENBLAS_CONST blasint K,
OPENBLAS_CONST void *alpha, OPENBLAS_CONST void *A, OPENBLAS_CONST blasint lda, OPENBLAS_CONST void *B, OPENBLAS_CONST blasint ldb, OPENBLAS_CONST double beta, void *C, OPENBLAS_CONST blasint ldc);
void cblas_xerbla(blasint p, OPENBLAS_CONST char *rout, OPENBLAS_CONST char *form, ...);
OPENBLAS_EXPORT void cblas_xerbla(blasint p, OPENBLAS_CONST char *rout, OPENBLAS_CONST char *form, ...);
/*** BLAS extensions ***/
void cblas_saxpby(OPENBLAS_CONST blasint n, OPENBLAS_CONST float alpha, OPENBLAS_CONST float *x, OPENBLAS_CONST blasint incx,OPENBLAS_CONST float beta, float *y, OPENBLAS_CONST blasint incy);
OPENBLAS_EXPORT void cblas_saxpby(OPENBLAS_CONST blasint n, OPENBLAS_CONST float alpha, OPENBLAS_CONST float *x, OPENBLAS_CONST blasint incx,OPENBLAS_CONST float beta, float *y, OPENBLAS_CONST blasint incy);
void cblas_daxpby(OPENBLAS_CONST blasint n, OPENBLAS_CONST double alpha, OPENBLAS_CONST double *x, OPENBLAS_CONST blasint incx,OPENBLAS_CONST double beta, double *y, OPENBLAS_CONST blasint incy);
OPENBLAS_EXPORT void cblas_daxpby(OPENBLAS_CONST blasint n, OPENBLAS_CONST double alpha, OPENBLAS_CONST double *x, OPENBLAS_CONST blasint incx,OPENBLAS_CONST double beta, double *y, OPENBLAS_CONST blasint incy);
void cblas_caxpby(OPENBLAS_CONST blasint n, OPENBLAS_CONST void *alpha, OPENBLAS_CONST void *x, OPENBLAS_CONST blasint incx,OPENBLAS_CONST void *beta, void *y, OPENBLAS_CONST blasint incy);
OPENBLAS_EXPORT void cblas_caxpby(OPENBLAS_CONST blasint n, OPENBLAS_CONST void *alpha, OPENBLAS_CONST void *x, OPENBLAS_CONST blasint incx,OPENBLAS_CONST void *beta, void *y, OPENBLAS_CONST blasint incy);
void cblas_zaxpby(OPENBLAS_CONST blasint n, OPENBLAS_CONST void *alpha, OPENBLAS_CONST void *x, OPENBLAS_CONST blasint incx,OPENBLAS_CONST void *beta, void *y, OPENBLAS_CONST blasint incy);
OPENBLAS_EXPORT void cblas_zaxpby(OPENBLAS_CONST blasint n, OPENBLAS_CONST void *alpha, OPENBLAS_CONST void *x, OPENBLAS_CONST blasint incx,OPENBLAS_CONST void *beta, void *y, OPENBLAS_CONST blasint incy);
void cblas_somatcopy(OPENBLAS_CONST enum CBLAS_ORDER CORDER, OPENBLAS_CONST enum CBLAS_TRANSPOSE CTRANS, OPENBLAS_CONST blasint crows, OPENBLAS_CONST blasint ccols, OPENBLAS_CONST float calpha, OPENBLAS_CONST float *a,
OPENBLAS_EXPORT void cblas_somatcopy(OPENBLAS_CONST enum CBLAS_ORDER CORDER, OPENBLAS_CONST enum CBLAS_TRANSPOSE CTRANS, OPENBLAS_CONST blasint crows, OPENBLAS_CONST blasint ccols, OPENBLAS_CONST float calpha, OPENBLAS_CONST float *a,
OPENBLAS_CONST blasint clda, float *b, OPENBLAS_CONST blasint cldb);
void cblas_domatcopy(OPENBLAS_CONST enum CBLAS_ORDER CORDER, OPENBLAS_CONST enum CBLAS_TRANSPOSE CTRANS, OPENBLAS_CONST blasint crows, OPENBLAS_CONST blasint ccols, OPENBLAS_CONST double calpha, OPENBLAS_CONST double *a,
OPENBLAS_EXPORT void cblas_domatcopy(OPENBLAS_CONST enum CBLAS_ORDER CORDER, OPENBLAS_CONST enum CBLAS_TRANSPOSE CTRANS, OPENBLAS_CONST blasint crows, OPENBLAS_CONST blasint ccols, OPENBLAS_CONST double calpha, OPENBLAS_CONST double *a,
OPENBLAS_CONST blasint clda, double *b, OPENBLAS_CONST blasint cldb);
void cblas_comatcopy(OPENBLAS_CONST enum CBLAS_ORDER CORDER, OPENBLAS_CONST enum CBLAS_TRANSPOSE CTRANS, OPENBLAS_CONST blasint crows, OPENBLAS_CONST blasint ccols, OPENBLAS_CONST float* calpha, OPENBLAS_CONST float* a,
OPENBLAS_EXPORT void cblas_comatcopy(OPENBLAS_CONST enum CBLAS_ORDER CORDER, OPENBLAS_CONST enum CBLAS_TRANSPOSE CTRANS, OPENBLAS_CONST blasint crows, OPENBLAS_CONST blasint ccols, OPENBLAS_CONST float* calpha, OPENBLAS_CONST float* a,
OPENBLAS_CONST blasint clda, float*b, OPENBLAS_CONST blasint cldb);
void cblas_zomatcopy(OPENBLAS_CONST enum CBLAS_ORDER CORDER, OPENBLAS_CONST enum CBLAS_TRANSPOSE CTRANS, OPENBLAS_CONST blasint crows, OPENBLAS_CONST blasint ccols, OPENBLAS_CONST double* calpha, OPENBLAS_CONST double* a,
OPENBLAS_EXPORT void cblas_zomatcopy(OPENBLAS_CONST enum CBLAS_ORDER CORDER, OPENBLAS_CONST enum CBLAS_TRANSPOSE CTRANS, OPENBLAS_CONST blasint crows, OPENBLAS_CONST blasint ccols, OPENBLAS_CONST double* calpha, OPENBLAS_CONST double* a,
OPENBLAS_CONST blasint clda, double *b, OPENBLAS_CONST blasint cldb);
void cblas_simatcopy(OPENBLAS_CONST enum CBLAS_ORDER CORDER, OPENBLAS_CONST enum CBLAS_TRANSPOSE CTRANS, OPENBLAS_CONST blasint crows, OPENBLAS_CONST blasint ccols, OPENBLAS_CONST float calpha, float *a,
OPENBLAS_EXPORT void cblas_simatcopy(OPENBLAS_CONST enum CBLAS_ORDER CORDER, OPENBLAS_CONST enum CBLAS_TRANSPOSE CTRANS, OPENBLAS_CONST blasint crows, OPENBLAS_CONST blasint ccols, OPENBLAS_CONST float calpha, float *a,
OPENBLAS_CONST blasint clda, OPENBLAS_CONST blasint cldb);
void cblas_dimatcopy(OPENBLAS_CONST enum CBLAS_ORDER CORDER, OPENBLAS_CONST enum CBLAS_TRANSPOSE CTRANS, OPENBLAS_CONST blasint crows, OPENBLAS_CONST blasint ccols, OPENBLAS_CONST double calpha, double *a,
OPENBLAS_EXPORT void cblas_dimatcopy(OPENBLAS_CONST enum CBLAS_ORDER CORDER, OPENBLAS_CONST enum CBLAS_TRANSPOSE CTRANS, OPENBLAS_CONST blasint crows, OPENBLAS_CONST blasint ccols, OPENBLAS_CONST double calpha, double *a,
OPENBLAS_CONST blasint clda, OPENBLAS_CONST blasint cldb);
void cblas_cimatcopy(OPENBLAS_CONST enum CBLAS_ORDER CORDER, OPENBLAS_CONST enum CBLAS_TRANSPOSE CTRANS, OPENBLAS_CONST blasint crows, OPENBLAS_CONST blasint ccols, OPENBLAS_CONST float* calpha, float* a,
OPENBLAS_EXPORT void cblas_cimatcopy(OPENBLAS_CONST enum CBLAS_ORDER CORDER, OPENBLAS_CONST enum CBLAS_TRANSPOSE CTRANS, OPENBLAS_CONST blasint crows, OPENBLAS_CONST blasint ccols, OPENBLAS_CONST float* calpha, float* a,
OPENBLAS_CONST blasint clda, OPENBLAS_CONST blasint cldb);
void cblas_zimatcopy(OPENBLAS_CONST enum CBLAS_ORDER CORDER, OPENBLAS_CONST enum CBLAS_TRANSPOSE CTRANS, OPENBLAS_CONST blasint crows, OPENBLAS_CONST blasint ccols, OPENBLAS_CONST double* calpha, double* a,
OPENBLAS_EXPORT void cblas_zimatcopy(OPENBLAS_CONST enum CBLAS_ORDER CORDER, OPENBLAS_CONST enum CBLAS_TRANSPOSE CTRANS, OPENBLAS_CONST blasint crows, OPENBLAS_CONST blasint ccols, OPENBLAS_CONST double* calpha, double* a,
OPENBLAS_CONST blasint clda, OPENBLAS_CONST blasint cldb);
void cblas_sgeadd(OPENBLAS_CONST enum CBLAS_ORDER CORDER,OPENBLAS_CONST enum CBLAS_TRANSPOSE CTRANS_A,OPENBLAS_CONST enum CBLAS_TRANSPOSE CTRANS_C,OPENBLAS_CONST blasint crows, OPENBLAS_CONST blasint ccols, OPENBLAS_CONST float calpha, OPENBLAS_CONST float *a, OPENBLAS_CONST blasint clda,OPENBLAS_CONST float cbeta, float *c,
OPENBLAS_EXPORT void cblas_sgeadd(OPENBLAS_CONST enum CBLAS_ORDER CORDER,OPENBLAS_CONST enum CBLAS_TRANSPOSE CTRANS_A,OPENBLAS_CONST enum CBLAS_TRANSPOSE CTRANS_C,OPENBLAS_CONST blasint crows, OPENBLAS_CONST blasint ccols, OPENBLAS_CONST float calpha, OPENBLAS_CONST float *a, OPENBLAS_CONST blasint clda,OPENBLAS_CONST float cbeta, float *c,
OPENBLAS_CONST blasint cldc);
void cblas_dgeadd(OPENBLAS_CONST enum CBLAS_ORDER CORDER,OPENBLAS_CONST enum CBLAS_TRANSPOSE CTRANS_A,OPENBLAS_CONST enum CBLAS_TRANSPOSE CTRANS_C,OPENBLAS_CONST blasint crows, OPENBLAS_CONST blasint ccols, OPENBLAS_CONST double calpha, OPENBLAS_CONST double *a, OPENBLAS_CONST blasint clda, OPENBLAS_CONST double cbeta,
OPENBLAS_EXPORT void cblas_dgeadd(OPENBLAS_CONST enum CBLAS_ORDER CORDER,OPENBLAS_CONST enum CBLAS_TRANSPOSE CTRANS_A,OPENBLAS_CONST enum CBLAS_TRANSPOSE CTRANS_C,OPENBLAS_CONST blasint crows, OPENBLAS_CONST blasint ccols, OPENBLAS_CONST double calpha, OPENBLAS_CONST double *a, OPENBLAS_CONST blasint clda, OPENBLAS_CONST double cbeta,
double *c, OPENBLAS_CONST blasint cldc);
void cblas_cgeadd(OPENBLAS_CONST enum CBLAS_ORDER CORDER,OPENBLAS_CONST enum CBLAS_TRANSPOSE CTRANS_A,OPENBLAS_CONST enum CBLAS_TRANSPOSE CTRANS_C,OPENBLAS_CONST blasint crows, OPENBLAS_CONST blasint ccols, OPENBLAS_CONST float *calpha, OPENBLAS_CONST float *a, OPENBLAS_CONST blasint clda, OPENBLAS_CONST float *cbeta,
OPENBLAS_EXPORT void cblas_cgeadd(OPENBLAS_CONST enum CBLAS_ORDER CORDER,OPENBLAS_CONST enum CBLAS_TRANSPOSE CTRANS_A,OPENBLAS_CONST enum CBLAS_TRANSPOSE CTRANS_C,OPENBLAS_CONST blasint crows, OPENBLAS_CONST blasint ccols, OPENBLAS_CONST float *calpha, OPENBLAS_CONST float *a, OPENBLAS_CONST blasint clda, OPENBLAS_CONST float *cbeta,
float *c, OPENBLAS_CONST blasint cldc);
void cblas_zgeadd(OPENBLAS_CONST enum CBLAS_ORDER CORDER,OPENBLAS_CONST enum CBLAS_TRANSPOSE CTRANS_A,OPENBLAS_CONST enum CBLAS_TRANSPOSE CTRANS_C,OPENBLAS_CONST blasint crows, OPENBLAS_CONST blasint ccols, OPENBLAS_CONST double *calpha, OPENBLAS_CONST double *a, OPENBLAS_CONST blasint clda, OPENBLAS_CONST double *cbeta,
OPENBLAS_EXPORT void cblas_zgeadd(OPENBLAS_CONST enum CBLAS_ORDER CORDER,OPENBLAS_CONST enum CBLAS_TRANSPOSE CTRANS_A,OPENBLAS_CONST enum CBLAS_TRANSPOSE CTRANS_C,OPENBLAS_CONST blasint crows, OPENBLAS_CONST blasint ccols, OPENBLAS_CONST double *calpha, OPENBLAS_CONST double *a, OPENBLAS_CONST blasint clda, OPENBLAS_CONST double *cbeta,
double *c, OPENBLAS_CONST blasint cldc);
void cblas_sgemm_batch(OPENBLAS_CONST enum CBLAS_ORDER Order, OPENBLAS_CONST enum CBLAS_TRANSPOSE * TransA_array, OPENBLAS_CONST enum CBLAS_TRANSPOSE * TransB_array, OPENBLAS_CONST blasint * M_array, OPENBLAS_CONST blasint * N_array, OPENBLAS_CONST blasint * K_array,
OPENBLAS_EXPORT void cblas_sgemm_batch(OPENBLAS_CONST enum CBLAS_ORDER Order, OPENBLAS_CONST enum CBLAS_TRANSPOSE * TransA_array, OPENBLAS_CONST enum CBLAS_TRANSPOSE * TransB_array, OPENBLAS_CONST blasint * M_array, OPENBLAS_CONST blasint * N_array, OPENBLAS_CONST blasint * K_array,
OPENBLAS_CONST float * alpha_array, OPENBLAS_CONST float ** A_array, OPENBLAS_CONST blasint * lda_array, OPENBLAS_CONST float ** B_array, OPENBLAS_CONST blasint * ldb_array, OPENBLAS_CONST float * beta_array, float ** C_array, OPENBLAS_CONST blasint * ldc_array, OPENBLAS_CONST blasint group_count, OPENBLAS_CONST blasint * group_size);
void cblas_dgemm_batch(OPENBLAS_CONST enum CBLAS_ORDER Order, OPENBLAS_CONST enum CBLAS_TRANSPOSE * TransA_array, OPENBLAS_CONST enum CBLAS_TRANSPOSE * TransB_array, OPENBLAS_CONST blasint * M_array, OPENBLAS_CONST blasint * N_array, OPENBLAS_CONST blasint * K_array,
OPENBLAS_EXPORT void cblas_dgemm_batch(OPENBLAS_CONST enum CBLAS_ORDER Order, OPENBLAS_CONST enum CBLAS_TRANSPOSE * TransA_array, OPENBLAS_CONST enum CBLAS_TRANSPOSE * TransB_array, OPENBLAS_CONST blasint * M_array, OPENBLAS_CONST blasint * N_array, OPENBLAS_CONST blasint * K_array,
OPENBLAS_CONST double * alpha_array, OPENBLAS_CONST double ** A_array, OPENBLAS_CONST blasint * lda_array, OPENBLAS_CONST double ** B_array, OPENBLAS_CONST blasint * ldb_array, OPENBLAS_CONST double * beta_array, double ** C_array, OPENBLAS_CONST blasint * ldc_array, OPENBLAS_CONST blasint group_count, OPENBLAS_CONST blasint * group_size);
void cblas_cgemm_batch(OPENBLAS_CONST enum CBLAS_ORDER Order, OPENBLAS_CONST enum CBLAS_TRANSPOSE * TransA_array, OPENBLAS_CONST enum CBLAS_TRANSPOSE * TransB_array, OPENBLAS_CONST blasint * M_array, OPENBLAS_CONST blasint * N_array, OPENBLAS_CONST blasint * K_array,
OPENBLAS_EXPORT void cblas_cgemm_batch(OPENBLAS_CONST enum CBLAS_ORDER Order, OPENBLAS_CONST enum CBLAS_TRANSPOSE * TransA_array, OPENBLAS_CONST enum CBLAS_TRANSPOSE * TransB_array, OPENBLAS_CONST blasint * M_array, OPENBLAS_CONST blasint * N_array, OPENBLAS_CONST blasint * K_array,
OPENBLAS_CONST void * alpha_array, OPENBLAS_CONST void ** A_array, OPENBLAS_CONST blasint * lda_array, OPENBLAS_CONST void ** B_array, OPENBLAS_CONST blasint * ldb_array, OPENBLAS_CONST void * beta_array, void ** C_array, OPENBLAS_CONST blasint * ldc_array, OPENBLAS_CONST blasint group_count, OPENBLAS_CONST blasint * group_size);
void cblas_zgemm_batch(OPENBLAS_CONST enum CBLAS_ORDER Order, OPENBLAS_CONST enum CBLAS_TRANSPOSE * TransA_array, OPENBLAS_CONST enum CBLAS_TRANSPOSE * TransB_array, OPENBLAS_CONST blasint * M_array, OPENBLAS_CONST blasint * N_array, OPENBLAS_CONST blasint * K_array,
OPENBLAS_EXPORT void cblas_zgemm_batch(OPENBLAS_CONST enum CBLAS_ORDER Order, OPENBLAS_CONST enum CBLAS_TRANSPOSE * TransA_array, OPENBLAS_CONST enum CBLAS_TRANSPOSE * TransB_array, OPENBLAS_CONST blasint * M_array, OPENBLAS_CONST blasint * N_array, OPENBLAS_CONST blasint * K_array,
OPENBLAS_CONST void * alpha_array, OPENBLAS_CONST void ** A_array, OPENBLAS_CONST blasint * lda_array, OPENBLAS_CONST void ** B_array, OPENBLAS_CONST blasint * ldb_array, OPENBLAS_CONST void * beta_array, void ** C_array, OPENBLAS_CONST blasint * ldc_array, OPENBLAS_CONST blasint group_count, OPENBLAS_CONST blasint * group_size);
void cblas_sgemm_batch_strided(OPENBLAS_CONST enum CBLAS_ORDER Order, OPENBLAS_CONST enum CBLAS_TRANSPOSE TransA, OPENBLAS_CONST enum CBLAS_TRANSPOSE TransB, OPENBLAS_CONST blasint M, OPENBLAS_CONST blasint N, OPENBLAS_CONST blasint K, OPENBLAS_CONST float alpha, OPENBLAS_CONST float * A, OPENBLAS_CONST blasint lda, OPENBLAS_CONST blasint stridea, OPENBLAS_CONST float * B, OPENBLAS_CONST blasint ldb, OPENBLAS_CONST blasint strideb, OPENBLAS_CONST float beta, float * C, OPENBLAS_CONST blasint ldc, OPENBLAS_CONST blasint stridec, OPENBLAS_CONST blasint group_size);
OPENBLAS_EXPORT void cblas_sgemm_batch_strided(OPENBLAS_CONST enum CBLAS_ORDER Order, OPENBLAS_CONST enum CBLAS_TRANSPOSE TransA, OPENBLAS_CONST enum CBLAS_TRANSPOSE TransB, OPENBLAS_CONST blasint M, OPENBLAS_CONST blasint N, OPENBLAS_CONST blasint K, OPENBLAS_CONST float alpha, OPENBLAS_CONST float * A, OPENBLAS_CONST blasint lda, OPENBLAS_CONST blasint stridea, OPENBLAS_CONST float * B, OPENBLAS_CONST blasint ldb, OPENBLAS_CONST blasint strideb, OPENBLAS_CONST float beta, float * C, OPENBLAS_CONST blasint ldc, OPENBLAS_CONST blasint stridec, OPENBLAS_CONST blasint group_size);
void cblas_dgemm_batch_strided(OPENBLAS_CONST enum CBLAS_ORDER Order, OPENBLAS_CONST enum CBLAS_TRANSPOSE TransA, OPENBLAS_CONST enum CBLAS_TRANSPOSE TransB, OPENBLAS_CONST blasint M, OPENBLAS_CONST blasint N, OPENBLAS_CONST blasint K, OPENBLAS_CONST double alpha, OPENBLAS_CONST double * A, OPENBLAS_CONST blasint lda, OPENBLAS_CONST blasint stridea, OPENBLAS_CONST double * B, OPENBLAS_CONST blasint ldb, OPENBLAS_CONST blasint strideb, OPENBLAS_CONST double beta, double * C, OPENBLAS_CONST blasint ldc, OPENBLAS_CONST blasint stridec, OPENBLAS_CONST blasint group_size);
OPENBLAS_EXPORT void cblas_dgemm_batch_strided(OPENBLAS_CONST enum CBLAS_ORDER Order, OPENBLAS_CONST enum CBLAS_TRANSPOSE TransA, OPENBLAS_CONST enum CBLAS_TRANSPOSE TransB, OPENBLAS_CONST blasint M, OPENBLAS_CONST blasint N, OPENBLAS_CONST blasint K, OPENBLAS_CONST double alpha, OPENBLAS_CONST double * A, OPENBLAS_CONST blasint lda, OPENBLAS_CONST blasint stridea, OPENBLAS_CONST double * B, OPENBLAS_CONST blasint ldb, OPENBLAS_CONST blasint strideb, OPENBLAS_CONST double beta, double * C, OPENBLAS_CONST blasint ldc, OPENBLAS_CONST blasint stridec, OPENBLAS_CONST blasint group_size);
void cblas_cgemm_batch_strided(OPENBLAS_CONST enum CBLAS_ORDER Order, OPENBLAS_CONST enum CBLAS_TRANSPOSE TransA, OPENBLAS_CONST enum CBLAS_TRANSPOSE TransB, OPENBLAS_CONST blasint M, OPENBLAS_CONST blasint N, OPENBLAS_CONST blasint K, OPENBLAS_CONST void * alpha, OPENBLAS_CONST void * A, OPENBLAS_CONST blasint lda, OPENBLAS_CONST blasint stridea, OPENBLAS_CONST void * B, OPENBLAS_CONST blasint ldb, OPENBLAS_CONST blasint strideb, OPENBLAS_CONST void * beta, void * C, OPENBLAS_CONST blasint ldc, OPENBLAS_CONST blasint stridec, OPENBLAS_CONST blasint group_size);
OPENBLAS_EXPORT void cblas_cgemm_batch_strided(OPENBLAS_CONST enum CBLAS_ORDER Order, OPENBLAS_CONST enum CBLAS_TRANSPOSE TransA, OPENBLAS_CONST enum CBLAS_TRANSPOSE TransB, OPENBLAS_CONST blasint M, OPENBLAS_CONST blasint N, OPENBLAS_CONST blasint K, OPENBLAS_CONST void * alpha, OPENBLAS_CONST void * A, OPENBLAS_CONST blasint lda, OPENBLAS_CONST blasint stridea, OPENBLAS_CONST void * B, OPENBLAS_CONST blasint ldb, OPENBLAS_CONST blasint strideb, OPENBLAS_CONST void * beta, void * C, OPENBLAS_CONST blasint ldc, OPENBLAS_CONST blasint stridec, OPENBLAS_CONST blasint group_size);
void cblas_zgemm_batch_strided(OPENBLAS_CONST enum CBLAS_ORDER Order, OPENBLAS_CONST enum CBLAS_TRANSPOSE TransA, OPENBLAS_CONST enum CBLAS_TRANSPOSE TransB, OPENBLAS_CONST blasint M, OPENBLAS_CONST blasint N, OPENBLAS_CONST blasint K, OPENBLAS_CONST void * alpha, OPENBLAS_CONST void * A, OPENBLAS_CONST blasint lda, OPENBLAS_CONST blasint stridea, OPENBLAS_CONST void * B, OPENBLAS_CONST blasint ldb, OPENBLAS_CONST blasint strideb, OPENBLAS_CONST void * beta, void * C, OPENBLAS_CONST blasint ldc, OPENBLAS_CONST blasint stridec, OPENBLAS_CONST blasint group_size);
OPENBLAS_EXPORT void cblas_zgemm_batch_strided(OPENBLAS_CONST enum CBLAS_ORDER Order, OPENBLAS_CONST enum CBLAS_TRANSPOSE TransA, OPENBLAS_CONST enum CBLAS_TRANSPOSE TransB, OPENBLAS_CONST blasint M, OPENBLAS_CONST blasint N, OPENBLAS_CONST blasint K, OPENBLAS_CONST void * alpha, OPENBLAS_CONST void * A, OPENBLAS_CONST blasint lda, OPENBLAS_CONST blasint stridea, OPENBLAS_CONST void * B, OPENBLAS_CONST blasint ldb, OPENBLAS_CONST blasint strideb, OPENBLAS_CONST void * beta, void * C, OPENBLAS_CONST blasint ldc, OPENBLAS_CONST blasint stridec, OPENBLAS_CONST blasint group_size);
/*** BFLOAT16 and INT8 extensions ***/
/* convert float array to BFLOAT16 array by rounding */
void cblas_sbstobf16(OPENBLAS_CONST blasint n, OPENBLAS_CONST float *in, OPENBLAS_CONST blasint incin, bfloat16 *out, OPENBLAS_CONST blasint incout);
OPENBLAS_EXPORT void cblas_sbstobf16(OPENBLAS_CONST blasint n, OPENBLAS_CONST float *in, OPENBLAS_CONST blasint incin, bfloat16 *out, OPENBLAS_CONST blasint incout);
/* convert double array to BFLOAT16 array by rounding */
void cblas_sbdtobf16(OPENBLAS_CONST blasint n, OPENBLAS_CONST double *in, OPENBLAS_CONST blasint incin, bfloat16 *out, OPENBLAS_CONST blasint incout);
OPENBLAS_EXPORT void cblas_sbdtobf16(OPENBLAS_CONST blasint n, OPENBLAS_CONST double *in, OPENBLAS_CONST blasint incin, bfloat16 *out, OPENBLAS_CONST blasint incout);
/* convert BFLOAT16 array to float array */
void cblas_sbf16tos(OPENBLAS_CONST blasint n, OPENBLAS_CONST bfloat16 *in, OPENBLAS_CONST blasint incin, float *out, OPENBLAS_CONST blasint incout);
OPENBLAS_EXPORT void cblas_sbf16tos(OPENBLAS_CONST blasint n, OPENBLAS_CONST bfloat16 *in, OPENBLAS_CONST blasint incin, float *out, OPENBLAS_CONST blasint incout);
/* convert BFLOAT16 array to double array */
void cblas_dbf16tod(OPENBLAS_CONST blasint n, OPENBLAS_CONST bfloat16 *in, OPENBLAS_CONST blasint incin, double *out, OPENBLAS_CONST blasint incout);
void cblas_bgemv(OPENBLAS_CONST enum CBLAS_ORDER order, OPENBLAS_CONST enum CBLAS_TRANSPOSE trans, OPENBLAS_CONST blasint m, OPENBLAS_CONST blasint n, OPENBLAS_CONST bfloat16 alpha, OPENBLAS_CONST bfloat16 *a, OPENBLAS_CONST blasint lda, OPENBLAS_CONST bfloat16 *x, OPENBLAS_CONST blasint incx, OPENBLAS_CONST bfloat16 beta, bfloat16 *y, OPENBLAS_CONST blasint incy);
OPENBLAS_EXPORT void cblas_dbf16tod(OPENBLAS_CONST blasint n, OPENBLAS_CONST bfloat16 *in, OPENBLAS_CONST blasint incin, double *out, OPENBLAS_CONST blasint incout);
OPENBLAS_EXPORT void cblas_bgemv(OPENBLAS_CONST enum CBLAS_ORDER order, OPENBLAS_CONST enum CBLAS_TRANSPOSE trans, OPENBLAS_CONST blasint m, OPENBLAS_CONST blasint n, OPENBLAS_CONST bfloat16 alpha, OPENBLAS_CONST bfloat16 *a, OPENBLAS_CONST blasint lda, OPENBLAS_CONST bfloat16 *x, OPENBLAS_CONST blasint incx, OPENBLAS_CONST bfloat16 beta, bfloat16 *y, OPENBLAS_CONST blasint incy);
/* dot production of BFLOAT16 input arrays, and output as float */
float cblas_sbdot(OPENBLAS_CONST blasint n, OPENBLAS_CONST bfloat16 *x, OPENBLAS_CONST blasint incx, OPENBLAS_CONST bfloat16 *y, OPENBLAS_CONST blasint incy);
void cblas_sbgemv(OPENBLAS_CONST enum CBLAS_ORDER order, OPENBLAS_CONST enum CBLAS_TRANSPOSE trans, OPENBLAS_CONST blasint m, OPENBLAS_CONST blasint n, OPENBLAS_CONST float alpha, OPENBLAS_CONST bfloat16 *a, OPENBLAS_CONST blasint lda, OPENBLAS_CONST bfloat16 *x, OPENBLAS_CONST blasint incx, OPENBLAS_CONST float beta, float *y, OPENBLAS_CONST blasint incy);
OPENBLAS_EXPORT float cblas_sbdot(OPENBLAS_CONST blasint n, OPENBLAS_CONST bfloat16 *x, OPENBLAS_CONST blasint incx, OPENBLAS_CONST bfloat16 *y, OPENBLAS_CONST blasint incy);
OPENBLAS_EXPORT void cblas_sbgemv(OPENBLAS_CONST enum CBLAS_ORDER order, OPENBLAS_CONST enum CBLAS_TRANSPOSE trans, OPENBLAS_CONST blasint m, OPENBLAS_CONST blasint n, OPENBLAS_CONST float alpha, OPENBLAS_CONST bfloat16 *a, OPENBLAS_CONST blasint lda, OPENBLAS_CONST bfloat16 *x, OPENBLAS_CONST blasint incx, OPENBLAS_CONST float beta, float *y, OPENBLAS_CONST blasint incy);
void cblas_bgemm(OPENBLAS_CONST enum CBLAS_ORDER Order, OPENBLAS_CONST enum CBLAS_TRANSPOSE TransA, OPENBLAS_CONST enum CBLAS_TRANSPOSE TransB, OPENBLAS_CONST blasint M, OPENBLAS_CONST blasint N, OPENBLAS_CONST blasint K,
OPENBLAS_EXPORT void cblas_bgemm(OPENBLAS_CONST enum CBLAS_ORDER Order, OPENBLAS_CONST enum CBLAS_TRANSPOSE TransA, OPENBLAS_CONST enum CBLAS_TRANSPOSE TransB, OPENBLAS_CONST blasint M, OPENBLAS_CONST blasint N, OPENBLAS_CONST blasint K,
OPENBLAS_CONST bfloat16 alpha, OPENBLAS_CONST bfloat16 *A, OPENBLAS_CONST blasint lda, OPENBLAS_CONST bfloat16 *B, OPENBLAS_CONST blasint ldb, OPENBLAS_CONST bfloat16 beta, bfloat16 *C, OPENBLAS_CONST blasint ldc);
void cblas_sbgemm(OPENBLAS_CONST enum CBLAS_ORDER Order, OPENBLAS_CONST enum CBLAS_TRANSPOSE TransA, OPENBLAS_CONST enum CBLAS_TRANSPOSE TransB, OPENBLAS_CONST blasint M, OPENBLAS_CONST blasint N, OPENBLAS_CONST blasint K,
OPENBLAS_EXPORT void cblas_sbgemm(OPENBLAS_CONST enum CBLAS_ORDER Order, OPENBLAS_CONST enum CBLAS_TRANSPOSE TransA, OPENBLAS_CONST enum CBLAS_TRANSPOSE TransB, OPENBLAS_CONST blasint M, OPENBLAS_CONST blasint N, OPENBLAS_CONST blasint K,
OPENBLAS_CONST float alpha, OPENBLAS_CONST bfloat16 *A, OPENBLAS_CONST blasint lda, OPENBLAS_CONST bfloat16 *B, OPENBLAS_CONST blasint ldb, OPENBLAS_CONST float beta, float *C, OPENBLAS_CONST blasint ldc);
void cblas_sbgemm_batch(OPENBLAS_CONST enum CBLAS_ORDER Order, OPENBLAS_CONST enum CBLAS_TRANSPOSE * TransA_array, OPENBLAS_CONST enum CBLAS_TRANSPOSE * TransB_array, OPENBLAS_CONST blasint * M_array, OPENBLAS_CONST blasint * N_array, OPENBLAS_CONST blasint * K_array,
OPENBLAS_EXPORT void cblas_sbgemm_batch(OPENBLAS_CONST enum CBLAS_ORDER Order, OPENBLAS_CONST enum CBLAS_TRANSPOSE * TransA_array, OPENBLAS_CONST enum CBLAS_TRANSPOSE * TransB_array, OPENBLAS_CONST blasint * M_array, OPENBLAS_CONST blasint * N_array, OPENBLAS_CONST blasint * K_array,
OPENBLAS_CONST float * alpha_array, OPENBLAS_CONST bfloat16 ** A_array, OPENBLAS_CONST blasint * lda_array, OPENBLAS_CONST bfloat16 ** B_array, OPENBLAS_CONST blasint * ldb_array, OPENBLAS_CONST float * beta_array, float ** C_array, OPENBLAS_CONST blasint * ldc_array, OPENBLAS_CONST blasint group_count, OPENBLAS_CONST blasint * group_size);
void cblas_sbgemm_batch_strided(OPENBLAS_CONST enum CBLAS_ORDER Order, OPENBLAS_CONST enum CBLAS_TRANSPOSE TransA, OPENBLAS_CONST enum CBLAS_TRANSPOSE TransB, OPENBLAS_CONST blasint M, OPENBLAS_CONST blasint N, OPENBLAS_CONST blasint K, OPENBLAS_CONST float alpha, OPENBLAS_CONST bfloat16 * A, OPENBLAS_CONST blasint lda, OPENBLAS_CONST blasint stridea, OPENBLAS_CONST bfloat16 * B, OPENBLAS_CONST blasint ldb, OPENBLAS_CONST blasint strideb, OPENBLAS_CONST float beta, float * C, OPENBLAS_CONST blasint ldc, OPENBLAS_CONST blasint stridec, OPENBLAS_CONST blasint group_size);
OPENBLAS_EXPORT void cblas_sbgemm_batch_strided(OPENBLAS_CONST enum CBLAS_ORDER Order, OPENBLAS_CONST enum CBLAS_TRANSPOSE TransA, OPENBLAS_CONST enum CBLAS_TRANSPOSE TransB, OPENBLAS_CONST blasint M, OPENBLAS_CONST blasint N, OPENBLAS_CONST blasint K, OPENBLAS_CONST float alpha, OPENBLAS_CONST bfloat16 * A, OPENBLAS_CONST blasint lda, OPENBLAS_CONST blasint stridea, OPENBLAS_CONST bfloat16 * B, OPENBLAS_CONST blasint ldb, OPENBLAS_CONST blasint strideb, OPENBLAS_CONST float beta, float * C, OPENBLAS_CONST blasint ldc, OPENBLAS_CONST blasint stridec, OPENBLAS_CONST blasint group_size);
/*** FLOAT16 extensions ***/
void cblas_shgemm(OPENBLAS_CONST enum CBLAS_ORDER Order, OPENBLAS_CONST enum CBLAS_TRANSPOSE TransA, OPENBLAS_CONST enum CBLAS_TRANSPOSE TransB, OPENBLAS_CONST blasint M, OPENBLAS_CONST blasint N, OPENBLAS_CONST blasint K,
OPENBLAS_EXPORT void cblas_shgemm(OPENBLAS_CONST enum CBLAS_ORDER Order, OPENBLAS_CONST enum CBLAS_TRANSPOSE TransA, OPENBLAS_CONST enum CBLAS_TRANSPOSE TransB, OPENBLAS_CONST blasint M, OPENBLAS_CONST blasint N, OPENBLAS_CONST blasint K,
OPENBLAS_CONST float alpha, OPENBLAS_CONST hfloat16 *A, OPENBLAS_CONST blasint lda, OPENBLAS_CONST hfloat16 *B, OPENBLAS_CONST blasint ldb, OPENBLAS_CONST float beta, float *C, OPENBLAS_CONST blasint ldc);
#ifdef __cplusplus
+3 -3
View File
@@ -315,9 +315,9 @@ if (${CORE} STREQUAL ARMV9SME)
if (${CMAKE_C_COMPILER_ID} STREQUAL "NVHPC" AND NOT NO_SVE)
set (CCOMMON_OPT "${CCOMMON_OPT} -tp=host")
else ()
set (CCOMMON_OPT "${CCOMMON_OPT} -march=armv9-a+sme")
set (CCOMMON_OPT "${CCOMMON_OPT} -march=armv9-a+sme+sme-f64f64")
if (CMAKE_SYSTEM_NAME STREQUAL "Windows" AND CMAKE_C_COMPILER_ID MATCHES "Clang")
set (CCOMMON_OPT "${CCOMMON_OPT} --aarch64-stack-hazard-size=0")
set (CCOMMON_OPT "${CCOMMON_OPT} -mllvm --aarch64-stack-hazard-size=0")
endif ()
endif ()
endif ()
@@ -329,7 +329,7 @@ if (${CORE} STREQUAL VORTEXM4)
set (CCOMMON_OPT "${CCOMMON_OPT} -tp=host")
else ()
if (${CMAKE_C_COMPILER_ID} STREQUAL "AppleClang")
set (CCOMMON_OPT "${CCOMMON_OPT} -march=armv8.4-a+sme -mcpu=apple-m4")
set (CCOMMON_OPT "${CCOMMON_OPT} -march=armv8.4-a+sme+sme-f64f64 -mcpu=apple-m4")
else ()
set (CCOMMON_OPT "${CCOMMON_OPT} -march=armv8.4-a -mcpu=apple-m4")
endif ()
+8 -8
View File
@@ -124,7 +124,7 @@ set(SLASRC
ssbev_2stage.f ssbevx_2stage.f ssbevd_2stage.f ssygv_2stage.f
sgesvdq.f slaorhr_col_getrfnp.f
slaorhr_col_getrfnp2.f sorgtsqr.f sorgtsqr_row.f sorhr_col.f
slatrs3.f strsyl3.f sgelst.f sgedmd.f90 sgedmdq.f90)
slatrs3.f strsyl3.f sgelst.f sgedmd.f90 sgedmdq.f90 sgecxx.f)
set(SXLASRC sgesvxx.f sgerfsx.f sla_gerfsx_extended.f sla_geamv.f
sla_gercond.f sla_gerpvgrw.f ssysvxx.f ssyrfsx.f
@@ -224,7 +224,7 @@ set(CLASRC
chbev_2stage.f chbevx_2stage.f chbevd_2stage.f chegv_2stage.f
cgesvdq.f claunhr_col_getrfnp.f claunhr_col_getrfnp2.f
cungtsqr.f cungtsqr_row.f cunhr_col.f
clatrs3.f ctrsyl3.f cgelst.f cgedmd.f90 cgedmdq.f90)
clatrs3.f ctrsyl3.f cgelst.f cgedmd.f90 cgedmdq.f90 cgecxx.f)
set(CXLASRC cgesvxx.f cgerfsx.f cla_gerfsx_extended.f cla_geamv.f
cla_gercond_c.f cla_gercond_x.f cla_gerpvgrw.f
@@ -317,7 +317,7 @@ set(DLASRC
dsbev_2stage.f dsbevx_2stage.f dsbevd_2stage.f dsygv_2stage.f
dcombssq.f dgesvdq.f dlaorhr_col_getrfnp.f
dlaorhr_col_getrfnp2.f dorgtsqr.f dorgtsqr_row.f dorhr_col.f
dlatrs3.f dtrsyl3.f dgelst.f dgedmd.f90 dgedmdq.f90)
dlatrs3.f dtrsyl3.f dgelst.f dgedmd.f90 dgedmdq.f90 dgecxx.f)
set(DXLASRC dgesvxx.f dgerfsx.f dla_gerfsx_extended.f dla_geamv.f
dla_gercond.f dla_gerpvgrw.f dsysvxx.f dsyrfsx.f
@@ -420,7 +420,7 @@ set(ZLASRC
zhbev_2stage.f zhbevx_2stage.f zhbevd_2stage.f zhegv_2stage.f
zgesvdq.f zlaunhr_col_getrfnp.f zlaunhr_col_getrfnp2.f
zungtsqr.f zungtsqr_row.f zunhr_col.f
zlatrs3.f ztrsyl3.f zgelst.f zgedmd.f90 zgedmdq.f90)
zlatrs3.f ztrsyl3.f zgelst.f zgedmd.f90 zgedmdq.f90 zgecxx.f)
set(ZXLASRC zgesvxx.f zgerfsx.f zla_gerfsx_extended.f zla_geamv.f
zla_gercond_c.f zla_gercond_x.f zla_gerpvgrw.f zsysvxx.f zsyrfsx.f
@@ -629,7 +629,7 @@ set(SLASRC
ssbev_2stage.c ssbevx_2stage.c ssbevd_2stage.c ssygv_2stage.c
sgesvdq.c slaorhr_col_getrfnp.c
slaorhr_col_getrfnp2.c sorgtsqr.c sorgtsqr_row.c sorhr_col.c
slatrs3.c strsyl3.c sgelst.c sgedmd.c sgedmdq.c)
slatrs3.c strsyl3.c sgelst.c sgedmd.c sgedmdq.c sgecxx.c)
set(SXLASRC sgesvxx.c sgerfsx.c sla_gerfsx_extended.c sla_geamv.c
sla_gercond.c sla_gerpvgrw.c ssysvxx.c ssyrfsx.c
@@ -728,7 +728,7 @@ set(CLASRC
chbev_2stage.c chbevx_2stage.c chbevd_2stage.c chegv_2stage.c
cgesvdq.c claunhr_col_getrfnp.c claunhr_col_getrfnp2.c
cungtsqr.c cungtsqr_row.c cunhr_col.c
clatrs3.c ctrsyl3.c cgelst.c cgedmd.c cgedmdq.c)
clatrs3.c ctrsyl3.c cgelst.c cgedmd.c cgedmdq.c cgecxx.c)
set(CXLASRC cgesvxx.c cgerfsx.c cla_gerfsx_extended.c cla_geamv.c
cla_gercond_c.c cla_gercond_x.c cla_gerpvgrw.c
@@ -820,7 +820,7 @@ set(DLASRC
dsbev_2stage.c dsbevx_2stage.c dsbevd_2stage.c dsygv_2stage.c
dcombssq.c dgesvdq.c dlaorhr_col_getrfnp.c
dlaorhr_col_getrfnp2.c dorgtsqr.c dorgtsqr_row.c dorhr_col.c
dlatrs3.c dtrsyl3.c dgelst.c dgedmd.c dgedmdq.c)
dlatrs3.c dtrsyl3.c dgelst.c dgedmd.c dgedmdq.c dgecxx.c)
set(DXLASRC dgesvxx.c dgerfsx.c dla_gerfsx_extended.c dla_geamv.c
dla_gercond.c dla_gerpvgrw.c dsysvxx.c dsyrfsx.c
@@ -922,7 +922,7 @@ set(ZLASRC
zhbev_2stage.c zhbevx_2stage.c zhbevd_2stage.c zhegv_2stage.c
zgesvdq.c zlaunhr_col_getrfnp.c zlaunhr_col_getrfnp2.c
zungtsqr.c zungtsqr_row.c zunhr_col.c zlatrs3.c ztrsyl3.c zgelst.c
zgedmd.c zgedmdq.c)
zgedmd.c zgedmdq.c zgecxx.c)
set(ZXLASRC zgesvxx.c zgerfsx.c zla_gerfsx_extended.c zla_geamv.c
zla_gercond_c.c zla_gercond_x.c zla_gerpvgrw.c zsysvxx.c zsyrfsx.c
+9 -1
View File
@@ -30,6 +30,8 @@ set(CSRC
lapacke_cgebrd_work.c
lapacke_cgecon.c
lapacke_cgecon_work.c
lapacke_cgecxx.c
lapacke_cgecxx_work.c
lapacke_cgeequ.c
lapacke_cgeequ_work.c
lapacke_cgeequb.c
@@ -659,6 +661,8 @@ set(DSRC
lapacke_dgebrd_work.c
lapacke_dgecon.c
lapacke_dgecon_work.c
lapacke_dgecxx.c
lapacke_dgecxx_work.c
lapacke_dgeequ.c
lapacke_dgeequ_work.c
lapacke_dgeequb.c
@@ -1241,6 +1245,8 @@ set(SSRC
lapacke_sgebrd_work.c
lapacke_sgecon.c
lapacke_sgecon_work.c
lapacke_sgecxx.c
lapacke_sgecxx_work.c
lapacke_sgeequ.c
lapacke_sgeequ_work.c
lapacke_sgeequb.c
@@ -1817,6 +1823,8 @@ set(ZSRC
lapacke_zgebrd_work.c
lapacke_zgecon.c
lapacke_zgecon_work.c
lapacke_zgecxx.c
lapacke_zgecxx_work.c
lapacke_zgeequ.c
lapacke_zgeequ_work.c
lapacke_zgeequb.c
@@ -2542,4 +2550,4 @@ endforeach ()
set(lapacke_include_dir "${NETLIB_LAPACK_DIR}/LAPACKE/include")
include_directories(${lapacke_include_dir})
set_source_files_properties(${LAPACKE_SOURCES} PROPERTIES COMPILE_FLAGS "${LAPACK_CFLAGS}")
set_source_files_properties(${LAPACKE_SOURCES} PROPERTIES COMPILE_FLAGS "${LAPACK_CFLAGS} -fvisibility=default")
+1 -1
View File
@@ -1313,7 +1313,7 @@ endif ()
set(ZGEMM_UNROLL_M 2)
set(ZGEMM_UNROLL_N 4)
set(SYMV_P 16)
elseif ("${TCORE}" STREQUAL "ARMV8SVE" OR "${TCORE}" STREQUAL "CORTEXA510" OR "${TCORE}" STREQUAL "CORTEXX2" OR "${TCORE}" STREQUAL "ARMV9")
elseif ("${TCORE}" STREQUAL "ARMV8SVE" OR "${TCORE}" STREQUAL "CORTEXA510" OR "${TCORE}" STREQUAL "CORTEXX2" OR "${TCORE}" STREQUAL "ARMV9SME")
file(APPEND ${TARGET_CONF_TEMP}
"#define L1_DATA_SIZE\t32768\n"
"#define L1_DATA_LINESIZE\t64\n"
+10 -7
View File
@@ -147,6 +147,9 @@ if (POWER)
set(HAVE_GAS 0)
elseif (CMAKE_ASM_COMPILER_ID STREQUAL "Clang")
set(CCOMMON_OPT "${CCOMMON_OPT} -fno-integrated-as")
if (${CMAKE_SYSTEM_NAME} STREQUAL "FreeBSD")
set(CCOMMON_OPT "${CCOMMON_OPT} -Wa,-mpwr10")
endif ()
set(HAVE_GAS 0)
endif ()
set(GETARCH_FLAGS "${GETARCH_FLAGS} -DHAVE_GAS=${HAVE_GAS}")
@@ -366,24 +369,22 @@ if (${TARGET} STREQUAL NEOVERSEV1)
endif()
endif()
if (${TARGET} STREQUAL ARMV9SME)
set (KERNEL_DEFINITIONS "${KERNEL_DEFINITIONS} -march=armv9-a+sme -O3")
set (KERNEL_DEFINITIONS "${KERNEL_DEFINITIONS} -march=armv9-a+sme+sme-f64f64 -O3")
if (${CMAKE_SYSTEM_NAME} STREQUAL Windows AND ${CMAKE_C_COMPILER_ID} MATCHES "Clang")
set (KERNEL_DEFINITIONS "${KERNEL_DEFINITIONS} --aarch64-stack-hazard-size=0")
set (KERNEL_DEFINITIONS "${KERNEL_DEFINITIONS} -mllvm --aarch64-stack-hazard-size=0")
endif()
endif()
if (${TARGET} STREQUAL VORTEXM4)
set (KERNEL_DEFINITIONS "${KERNEL_DEFINITIONS} -march=armv8.4-a+sme -O3")
set (KERNEL_DEFINITIONS "${KERNEL_DEFINITIONS} -march=armv8.4-a+sme+sme-f64f64 -O3")
if (${CMAKE_SYSTEM_NAME} STREQUAL Windows AND ${CMAKE_C_COMPILER_ID} MATCHES "Clang")
set (KERNEL_DEFINITIONS "${KERNEL_DEFINITIONS} --aarch64-stack-hazard-size=0")
set (KERNEL_DEFINITIONS "${KERNEL_DEFINITIONS} -mllvm --aarch64-stack-hazard-size=0")
endif()
endif()
if (${TARGET} STREQUAL A64FX)
if (${CMAKE_C_COMPILER_ID} STREQUAL "PGI" AND NOT NO_SVE)
set (KERNEL_DEFINITIONS "${KERNEL_DEFINITIONS} -Msve-intrinsics -march=armv8.2-a+sve -mtune=a64fx")
else ()
set (GCC_VERSION 0.0)
execute_process(COMMAND ${CMAKE_C_COMPILER} -dumpversion OUTPUT_VARIABLE GCC_VERSION)
if (${GCC_VERSION} VERSION_GREATER 10.4 OR ${GCC_VERSION} VERSION_EQUAL 10.4)
if (CMAKE_C_COMPILER_VERSION VERSION_GREATER 10.4 OR CMAKE_C_COMPILER_VERSION VERSION_EQUAL 10.4)
set (KERNEL_DEFINITIONS "${KERNEL_DEFINITIONS} -march=armv8.2-a+sve -mtune=a64fx")
else ()
message(FATAL_ERROR "Compiler $${CMAKE_C_COMPILER} {GCC_VERSION} does not support A64FX.")
@@ -745,6 +746,7 @@ if (BUILD_HFLOAT16)
endif()
if(NOT MSVC)
set(CMAKE_ASM_FLAGS "${CMAKE_ASM_FLAGS} ${CCOMMON_OPT}")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fvisibility=hidden")
endif()
# TODO: not sure what PFLAGS is -hpa
set(PFLAGS "${PFLAGS} ${CCOMMON_OPT} -I${TOPDIR} -DPROFILE ${COMMON_PROF}")
@@ -807,6 +809,7 @@ if (${CMAKE_C_COMPILER_ID} MATCHES "IntelLLVM" AND ${CMAKE_SYSTEM_NAME} STREQUAL
set(LAPACK_CFLAGS "${LAPACK_CFLAGS} -DNOCHANGE")
endif ()
string(REPLACE "-fvisibility=hidden" "" LAPACK_CFLAGS ${LAPACK_CFLAGS})
if (NOT DEFINED SUFFIX)
set(SUFFIX o)
+1 -1
View File
@@ -28,7 +28,7 @@ if(MINGW)
execute_process(COMMAND ${CMAKE_C_COMPILER} -dumpmachine
OUTPUT_VARIABLE OPENBLAS_MINGW_TARGET_MACHINE
OUTPUT_STRIP_TRAILING_WHITESPACE)
if(OPENBLAS_MINGW_TARGET_MACHINE MATCHES "amd64|x86_64|AMD64")
if(OPENBLAS_MINGW_TARGET_MACHINE MATCHES "amd64|x86_64|AMD64|aarch64")
set(MINGW64 1)
endif()
endif()
+20 -6
View File
@@ -57,6 +57,7 @@ extern "C" {
#define __USE_SVID
#endif
#include "exports.h"
#ifdef BUILD_KERNEL
#include "config_kernel.h"
#else
@@ -80,7 +81,7 @@ extern "C" {
#endif
#ifndef ASSEMBLER
#ifdef HAVE_C11
#if defined(HAVE_C11) && !defined(__cplusplus)
#if defined(C_GCC) && ( __GNUC__ < 7)
// workaround for GCC bug 65467
#ifndef _Atomic
@@ -209,8 +210,10 @@ extern "C" {
#ifdef NEEDBUNDERSCORE
#define BLASFUNC(FUNC) FUNC##_
#define OPENBLAS_API(FUNC) OPENBLAS_EXPORT FUNC##_
#else
#define BLASFUNC(FUNC) FUNC
#define OPENBLAS_API(FUNC) OPENBLAS_EXPORT FUNC
#endif
#undef USE_PTHREAD_LOCK
@@ -447,7 +450,7 @@ please https://github.com/xianyi/OpenBLAS/issues/246
#endif
#ifndef ASSEMBLER
#ifdef HAVE_C11
#if defined(HAVE_C11) && !defined(__cplusplus)
#define BLAS_LOCK_DEFINED
#endif
#endif
@@ -579,7 +582,7 @@ static __inline void blas_lock(volatile BLASULONG *address){
#define BLAS_LOCK_DEFINED
#endif
#ifdef HAVE_C11
#if defined(HAVE_C11) && !defined(__cplusplus)
static __inline void blas_lock(volatile BLASULONG *address) {
BLASULONG expected = 0;
while (!atomic_compare_exchange_strong((volatile _Atomic BLASULONG *)address,
@@ -591,7 +594,7 @@ static __inline void blas_lock(volatile BLASULONG *address) {
#endif
static __inline void blas_unlock(volatile BLASULONG *address){
#ifdef HAVE_C11
#if defined(HAVE_C11) && !defined(__cplusplus)
atomic_store((volatile _Atomic BLASULONG *)address, (BLASULONG)0);
#else
MB;
@@ -761,7 +764,18 @@ int get_num_proc (int);
int get_node_equal (void);
#endif
void goto_set_num_threads(int);
OPENBLAS_EXPORT void goto_set_num_threads(int);
/* Cooperative cancellation of in-flight operations
* (implemented in driver/others/openblas_cancel.c). These symbols are
* exported without SYMBOLPREFIX/SYMBOLSUFFIX decoration. */
size_t *openblas_cancel_token(void);
OPENBLAS_EXPORT void openblas_cancel(size_t *token, size_t loaded_token);
/* Internal helpers for the instrumented compute drivers. */
size_t openblas_cancel_begin(void);
size_t *openblas_cancel_self(void);
int openblas_cancel_poll(size_t *slot, size_t gen);
void gotoblas_affinity_init(void);
void gotoblas_affinity_quit(void);
@@ -894,7 +908,7 @@ typedef void (*openblas_xerbla_handler)(const char *name,
const blasint *info,
size_t name_length);
#endif
openblas_xerbla_handler openblas_set_xerbla(openblas_xerbla_handler handler);
OPENBLAS_EXPORT openblas_xerbla_handler openblas_set_xerbla(openblas_xerbla_handler handler);
#ifdef __cplusplus
}
#endif
+10
View File
@@ -145,6 +145,16 @@ static __inline int blas_quickdivide(unsigned int x, unsigned int y){
.ent REALNAME; \
REALNAME:
#define PROLOGUE_EXPORT \
.arch ev6; \
.set noat; \
.set noreorder; \
.text; \
.align 5; \
.globl REALNAME; \
.ent REALNAME; \
REALNAME:
#ifdef PROFILE
#define PROFCODE \
ldgp $gp, 0($27); \
+2
View File
@@ -119,6 +119,7 @@
#endif
#define CGEMM_BETA cgemm_beta
#define SME_CGEMM_KERNEL sme_cgemm_kernel
#define CGEMM_KERNEL_N cgemm_kernel_n
#define CGEMM_KERNEL_L cgemm_kernel_l
@@ -326,6 +327,7 @@
#define CTRSM_ILTNCOPY gotoblas -> ctrsm_iltncopy
#define CGEMM_BETA gotoblas -> cgemm_beta
#define SME_CGEMM_KERNEL gotoblas -> sme_cgemm_kernel
#define CGEMM_KERNEL_N gotoblas -> cgemm_kernel_n
#define CGEMM_KERNEL_L gotoblas -> cgemm_kernel_l
#define CGEMM_KERNEL_R gotoblas -> cgemm_kernel_r
+2
View File
@@ -114,6 +114,7 @@
#define DGEMM_BETA dgemm_beta
#define DGEMM_KERNEL dgemm_kernel
#define SME_DGEMM_KERNEL sme_dgemm_kernel
#define DTRMM_KERNEL_LN dtrmm_kernel_LN
#define DTRMM_KERNEL_LT dtrmm_kernel_LT
@@ -246,6 +247,7 @@
#define DGEMM_BETA gotoblas -> dgemm_beta
#define DGEMM_KERNEL gotoblas -> dgemm_kernel
#define SME_DGEMM_KERNEL gotoblas -> sme_dgemm_kernel
#define DTRMM_KERNEL_LN gotoblas -> dtrmm_kernel_LN
#define DTRMM_KERNEL_LT gotoblas -> dtrmm_kernel_LT
+7
View File
@@ -371,6 +371,13 @@ static __inline int blas_quickdivide(unsigned int x, unsigned int y){
.proc REALNAME; \
REALNAME:
#define PROLOGUE_EXPORT \
.explicit; \
.text; \
.align 128; \
.global REALNAME; \
.proc REALNAME; \
REALNAME:
#ifdef PROFILE
#define PROFCODE \
+456 -456
View File
File diff suppressed because it is too large Load Diff
+25
View File
@@ -135,6 +135,31 @@ void ssyr2k_direct_alpha_betaLT(BLASLONG N, BLASLONG K,
float beta,
float * R, BLASLONG strideR);
void sme_sgemm_kernel(char*, char*, BLASLONG M, BLASLONG N, BLASLONG K,
float * alpha,
float * A, BLASLONG ldA,
float * B, BLASLONG ldB,
float * beta,
float * C, BLASLONG ldC);
void sme_dgemm_kernel(const char*, const char*, const BLASLONG M, const BLASLONG N, const BLASLONG K,
const double * alpha,
const double * A, const BLASLONG ldA,
const double * B, const BLASLONG ldB,
const double * beta,
double * C, const BLASLONG ldC);
void sme_cgemm_kernel(const char*, const char*, const BLASLONG M, const BLASLONG N, const BLASLONG K,
const float alpha_r, const float alpha_i,
const float * A, const BLASLONG ldA,
const float * B, const BLASLONG ldB,
const float beta_r, const float beta_i,
float * C, const BLASLONG ldC);
void sme_zgemm_kernel(const char*, const char*, const BLASLONG M, const BLASLONG N, const BLASLONG K,
const double alpha_r, const double alpha_i,
const double * A, const BLASLONG ldA,
const double * B, const BLASLONG ldB,
const double beta_r, const double beta_i,
double * C, const BLASLONG ldC);
int sgemm_direct_performant(BLASLONG M, BLASLONG N, BLASLONG K);
int shgemm_beta(BLASLONG, BLASLONG, BLASLONG, float,
+13 -1
View File
@@ -266,13 +266,25 @@ static inline int get_cpu_model(char *model_name) {
#if defined(ASSEMBLER) && !defined(NEEDPARAM)
#define PROLOGUE \
#define PROLOGUE_EXPORT \
.text ;\
.align 5 ;\
.globl REALNAME ;\
.type REALNAME, @function ;\
REALNAME: ;\
#ifdef __ELF__
#define PROLOGUE \
.text ;\
.align 5 ;\
.globl REALNAME ;\
.hidden REALNAME ;\
.type REALNAME, @function ;\
REALNAME: ;\
#else
#define PROLOGUE PROLOGUE_EXPORT
#endif
#if defined(__linux__) && defined(__ELF__)
#define GNUSTACK .section .note.GNU-stack,"",@progbits
#else
+7
View File
@@ -2763,6 +2763,13 @@ typedef struct {
void * routine;
int routine_mode;
/* Generation slot of the thread that issued this operation and the
generation it runs as (see driver/others/openblas_cancel.c), or
NULL/0. Consulted only by the level-3 thread drivers; must be set
explicitly wherever it is to be observed. */
size_t * cancel_slot;
size_t cancel_gen;
} blas_arg_t;
#endif
+11 -1
View File
@@ -73,11 +73,21 @@ static inline int blas_quickdivide(blasint x, blasint y){
#if defined(ASSEMBLER) && !defined(NEEDPARAM)
#define PROLOGUE \
#define PROLOGUE_EXPORT \
.arm ;\
.global REALNAME ;\
REALNAME:
#ifdef __ELF__
#define PROLOGUE \
.arm ;\
.global REALNAME ;\
.hidden REALNAME ;\
REALNAME:
#else
#define PROLOGUE PROLOGUE_EXPORT
#endif
#define EPILOGUE
#define PROFCODE
+17 -1
View File
@@ -205,7 +205,7 @@ static inline int blas_quickdivide(blasint x, blasint y){
#define ASSEMBLER_ARCH mips64
#endif
#define PROLOGUE \
#define PROLOGUE_EXPORT \
.text ;\
.set ASSEMBLER_ARCH ;\
.align 5 ;\
@@ -216,6 +216,22 @@ REALNAME: ;\
.set noreorder ;\
.set nomacro
#ifdef __ELF__
#define PROLOGUE \
.text ;\
.set ASSEMBLER_ARCH ;\
.align 5 ;\
.globl REALNAME ;\
.hidden REALNAME ;\
.ent REALNAME ;\
.type REALNAME, @function ;\
REALNAME: ;\
.set noreorder ;\
.set nomacro
#else
#define PROLOGUE PROLOGUE_EXPORT
#endif
#if defined(__linux__) && defined(__ELF__)
#define GNUSTACK .section .note.GNU-stack,"",@progbits
#else
+11
View File
@@ -276,6 +276,7 @@ int (*shgemv_t) (BLASLONG, BLASLONG, float, hfloat16 *, BLASLONG, hfloat16 *, BL
void (*ssyr2k_direct_alpha_betaUT) (BLASLONG, BLASLONG, float, float *, BLASLONG, float *, BLASLONG, float, float *, BLASLONG);
void (*ssyr2k_direct_alpha_betaLN) (BLASLONG, BLASLONG, float, float *, BLASLONG, float *, BLASLONG, float, float *, BLASLONG);
void (*ssyr2k_direct_alpha_betaLT) (BLASLONG, BLASLONG, float, float *, BLASLONG, float *, BLASLONG, float, float *, BLASLONG);
void (*sme_sgemm_kernel) (char*, char*, BLASLONG, BLASLONG, BLASLONG, float*, float *, BLASLONG , float *, BLASLONG ,float*, float *, BLASLONG);
#endif
@@ -401,6 +402,9 @@ int (*shgemv_t) (BLASLONG, BLASLONG, float, hfloat16 *, BLASLONG, hfloat16 *, BL
int (*dsymv_U) (BLASLONG, BLASLONG, double, double *, BLASLONG, double *, BLASLONG, double *, BLASLONG, double *);
#endif
#if (BUILD_DOUBLE==1) || (BUILD_COMPLEX16==1)
#ifdef ARCH_ARM64
void (*sme_dgemm_kernel) (const char*, const char*, const BLASLONG, const BLASLONG, const BLASLONG, const double*, const double *, const BLASLONG , const double *, const BLASLONG ,const double*, double *, const BLASLONG);
#endif
int (*dgemm_kernel )(BLASLONG, BLASLONG, BLASLONG, double, double *, double *, double *, BLASLONG);
int (*dgemm_beta )(BLASLONG, BLASLONG, BLASLONG, double, double *, BLASLONG, double *, BLASLONG, double *, BLASLONG);
@@ -616,6 +620,9 @@ int (*shgemv_t) (BLASLONG, BLASLONG, float, hfloat16 *, BLASLONG, hfloat16 *, BL
int (*chemv_M) (BLASLONG, BLASLONG, float, float, float *, BLASLONG, float *, BLASLONG, float *, BLASLONG, float *);
int (*chemv_V) (BLASLONG, BLASLONG, float, float, float *, BLASLONG, float *, BLASLONG, float *, BLASLONG, float *);
#ifdef ARCH_ARM64
void (*sme_cgemm_kernel) (const char*, const char*, const BLASLONG, const BLASLONG, const BLASLONG, const float, const float, const float *, const BLASLONG , const float *, const BLASLONG, const float, const float, float *, const BLASLONG);
#endif
int (*cgemm_kernel_n )(BLASLONG, BLASLONG, BLASLONG, float, float, float *, float *, float *, BLASLONG);
int (*cgemm_kernel_l )(BLASLONG, BLASLONG, BLASLONG, float, float, float *, float *, float *, BLASLONG);
int (*cgemm_kernel_r )(BLASLONG, BLASLONG, BLASLONG, float, float, float *, float *, float *, BLASLONG);
@@ -826,6 +833,10 @@ int (*shgemv_t) (BLASLONG, BLASLONG, float, hfloat16 *, BLASLONG, hfloat16 *, BL
int (*zhemv_M) (BLASLONG, BLASLONG, double, double, double *, BLASLONG, double *, BLASLONG, double *, BLASLONG, double *);
int (*zhemv_V) (BLASLONG, BLASLONG, double, double, double *, BLASLONG, double *, BLASLONG, double *, BLASLONG, double *);
#ifdef ARCH_ARM64
void (*sme_zgemm_kernel) (const char*, const char*, const BLASLONG, const BLASLONG, const BLASLONG, const double, const double, const double *, const BLASLONG , const double *, const BLASLONG, const double, const double, double *, const BLASLONG);
#endif
int (*zgemm_kernel_n )(BLASLONG, BLASLONG, BLASLONG, double, double, double *, double *, double *, BLASLONG);
int (*zgemm_kernel_l )(BLASLONG, BLASLONG, BLASLONG, double, double, double *, double *, double *, BLASLONG);
int (*zgemm_kernel_r )(BLASLONG, BLASLONG, BLASLONG, double, double, double *, double *, double *, BLASLONG);
+71
View File
@@ -534,6 +534,13 @@ static inline int blas_quickdivide(blasint x, blasint y){
#if defined(OS_LINUX) || defined(OS_FREEBSD)
#ifndef __64BIT__
#define PROLOGUE \
.section .text;\
.align 6;\
.globl REALNAME;\
.hidden REALNAME ;\
.type REALNAME, @function;\
REALNAME:
#define PROLOGUE_EXPORT \
.section .text;\
.align 6;\
.globl REALNAME;\
@@ -543,6 +550,13 @@ REALNAME:
#else
#if _CALL_ELF == 2
#define PROLOGUE \
.section .text;\
.align 6;\
.globl REALNAME;\
.hidden REALNAME ;\
.type REALNAME, @function;\
REALNAME:
#define PROLOGUE_EXPORT \
.section .text;\
.align 6;\
.globl REALNAME;\
@@ -551,6 +565,21 @@ REALNAME:
#define EPILOGUE .size REALNAME, .-REALNAME
#else
#define PROLOGUE \
.section .text;\
.align 5;\
.globl REALNAME;\
.hidden REALNAME ;\
.section ".opd","aw";\
.align 3;\
REALNAME:;\
.quad .REALNAME, .TOC.@tocbase, 0;\
.previous;\
.size REALNAME, 24;\
.type .REALNAME, @function;\
.globl .REALNAME;\
.hidden .REALNAME ;\
.REALNAME:
#define PROLOGUE_EXPORT \
.section .text;\
.align 5;\
.globl REALNAME;\
@@ -639,6 +668,17 @@ REALNAME:;\
.csect .text[PR],5;\
.REALNAME:
#define PROLOGUE_EXPORT \
.machine "any";\
.toc;\
.globl .REALNAME;\
.globl REALNAME;\
.csect REALNAME[DS],3;\
REALNAME:;\
.long .REALNAME, TOC[tc0], 0;\
.csect .text[PR],5;\
.REALNAME:
#define EPILOGUE \
_section_.text:;\
.csect .data[RW],4;\
@@ -657,6 +697,17 @@ REALNAME:;\
.csect .text[PR], 5;\
.REALNAME:
#define PROLOGUE_EXPORT \
.machine "any";\
.toc;\
.globl .REALNAME;\
.globl REALNAME;\
.csect REALNAME[DS],3;\
REALNAME:;\
.llong .REALNAME, TOC[tc0], 0;\
.csect .text[PR], 5;\
.REALNAME:
#define EPILOGUE \
_section_.text:;\
.csect .data[RW],4;\
@@ -676,6 +727,16 @@ _section_.text:;\
.text
.align 4
.globl REALNAME
REALNAME:
.endmacro
.macro PROLOGUE_EXPORT
.section __TEXT,__text,regular,pure_instructions
.section __TEXT,__picsymbolstub1,symbol_stubs,pure_instructions,32
.machine ppc
.text
.align 4
.globl REALNAME
REALNAME:
.endmacro
#else
@@ -686,6 +747,16 @@ REALNAME:
.text
.align 4
.globl REALNAME
REALNAME:
.endmacro
.macro PROLOGUE_EXPORT
.section __TEXT,__text,regular,pure_instructions
.section __TEXT,__picsymbolstub1,symbol_stubs,pure_instructions,32
.machine ppc64
.text
.align 4
.globl REALNAME
REALNAME:
.endmacro
#endif
+2
View File
@@ -76,6 +76,7 @@
#define SGEMM_ITCOPY sgemm_itcopy
#endif
#define SME_SGEMM_KERNEL sme_sgemm_kernel
#define STRMM_OUNUCOPY strmm_ounucopy
#define STRMM_OUNNCOPY strmm_ounncopy
#define STRMM_OUTUCOPY strmm_outucopy
@@ -248,6 +249,7 @@
#define SSYR2K_DIRECT_ALPHA_BETA_UT gotoblas -> ssyr2k_direct_alpha_betaUT
#define SSYR2K_DIRECT_ALPHA_BETA_LN gotoblas -> ssyr2k_direct_alpha_betaLN
#define SSYR2K_DIRECT_ALPHA_BETA_LT gotoblas -> ssyr2k_direct_alpha_betaLT
#define SME_SGEMM_KERNEL gotoblas -> sme_sgemm_kernel
#endif
#define SGEMM_ONCOPY gotoblas -> sgemm_oncopy
+8
View File
@@ -211,6 +211,14 @@ static __inline int blas_quickdivide(blasint x, blasint y){
.proc 07; \
REALNAME:;
#define PROLOGUE_EXPORT \
.section ".text"; \
.align 32; \
.global REALNAME;\
.type REALNAME, #function; \
.proc 07; \
REALNAME:;
#if defined(__linux__) && defined(__ELF__)
#define GNUSTACK .section .note.GNU-stack,"",@progbits
#else
+10
View File
@@ -106,7 +106,15 @@ typedef struct blas_queue {
blas_arg_t *args;
void *range_m;
void *range_n;
/*
* sa and sb are caller-owned inputs. worker_sb reports the sb workspace
* used by the threading backend for the most recent invocation.
* Keeping these roles separate prevents a reused queue from treating a
* released workspace as input to its next invocation.
*/
void *sa, *sb;
void *worker_sb;
struct blas_queue *next;
@@ -148,6 +156,7 @@ static __inline int num_cpu_avail(int level) {
`omp_get_max_threads()` below (which is to get a default
in case the user hasn't made an explicit choice). */
if (blas_is_num_threads_set_explicitly) {
if (omp_in_parallel()) return 1;
return blas_cpu_number;
}
@@ -183,6 +192,7 @@ static __inline void blas_queue_init(blas_queue_t *queue){
queue -> sa = NULL;
queue -> sb = NULL;
queue -> worker_sb = NULL;
queue-> next = NULL;
}
+24 -2
View File
@@ -300,6 +300,7 @@ static __inline int blas_quickdivide(unsigned int x, unsigned int y){
#ifdef OS_DARWIN
#define PROLOGUE .text;.align 5; .globl REALNAME; REALNAME:
#define PROLOGUE_EXPORT PROLOGUE
#define EPILOGUE .subsections_via_symbols
#define PROFCODE
#endif
@@ -320,13 +321,25 @@ static __inline int blas_quickdivide(unsigned int x, unsigned int y){
#endif
#if defined(OS_WINNT) || defined(OS_CYGWIN_NT) || defined(OS_INTERIX)
#define PROLOGUE \
#define PROLOGUE_EXPORT \
.text; \
.align 16; \
.globl REALNAME ;\
.def REALNAME;.scl 2;.type 32;.endef; \
REALNAME:
#ifdef __ELF__
#define PROLOGUE \
.text; \
.align 16; \
.globl REALNAME ;\
.hidden REALNAME ;\
.def REALNAME;.scl 2;.type 32;.endef; \
REALNAME:
#else
#define PROLOGUE PROLOGUE_EXPORT
#endif
#define PROFCODE
#ifdef __clang__
@@ -341,7 +354,16 @@ REALNAME:
.text; \
.align 16; \
.globl REALNAME ;\
.type REALNAME, @function; \
.hidden REALNAME ;\
.type REALNAME, @function; \
REALNAME: \
_CET_ENDBR
#define PROLOGUE_EXPORT \
.text; \
.align 16; \
.globl REALNAME ;\
.type REALNAME, @function; \
REALNAME: \
_CET_ENDBR
+23 -2
View File
@@ -407,6 +407,7 @@ static __inline unsigned int blas_quickdivide(unsigned int x, unsigned int y){
#ifdef OS_DARWIN
#define PROLOGUE .text;.align 5; .globl REALNAME; REALNAME:
#define PROLOGUE_EXPORT .text;.align 5; .globl REALNAME; REALNAME:
#define EPILOGUE .subsections_via_symbols
#define PROFCODE
#endif
@@ -443,12 +444,23 @@ static __inline unsigned int blas_quickdivide(unsigned int x, unsigned int y){
#endif
#if defined(OS_WINDOWS) && !defined(C_PGI)
#define PROLOGUE \
#define PROLOGUE_EXPORT \
.text; \
.align 16; \
.globl REALNAME ;\
.def REALNAME;.scl 2;.type 32;.endef; \
REALNAME:
#ifdef __ELF__
#define PROLOGUE \
.text; \
.align 16; \
.globl REALNAME ;\
.hidden REALNAME ; \
.def REALNAME;.scl 2;.type 32;.endef; \
REALNAME:
#else
#define PROLOGUE PROLOGUE_EXPORT
#endif
#define PROFCODE
@@ -460,7 +472,16 @@ REALNAME:
.text; \
.align 512; \
.globl REALNAME ;\
.type REALNAME, @function; \
.hidden REALNAME ;\
.type REALNAME, @function; \
REALNAME: \
_CET_ENDBR
#define PROLOGUE_EXPORT \
.text; \
.align 512; \
.globl REALNAME ;\
.type REALNAME, @function; \
REALNAME: \
_CET_ENDBR
+2
View File
@@ -119,6 +119,7 @@
#endif
#define ZGEMM_BETA zgemm_beta
#define SME_ZGEMM_KERNEL sme_zgemm_kernel
#define ZGEMM_KERNEL_N zgemm_kernel_n
#define ZGEMM_KERNEL_L zgemm_kernel_l
@@ -326,6 +327,7 @@
#define ZTRSM_ILTNCOPY gotoblas -> ztrsm_iltncopy
#define ZGEMM_BETA gotoblas -> zgemm_beta
#define SME_ZGEMM_KERNEL gotoblas -> sme_zgemm_kernel
#define ZGEMM_KERNEL_N gotoblas -> zgemm_kernel_n
#define ZGEMM_KERNEL_L gotoblas -> zgemm_kernel_l
#define ZGEMM_KERNEL_R gotoblas -> zgemm_kernel_r
+11
View File
@@ -19,6 +19,7 @@ endif()
set(CPP_THREAD_SAFETY_DGEMM_ARGS "" CACHE STRING "Arguments passed to the DGEMM thread safety test")
set(CPP_THREAD_SAFETY_DGEMM_MIXED_ARGS "" CACHE STRING "Arguments passed to the mixed DGEMM thread safety test")
set(CPP_THREAD_SAFETY_DGEMV_ARGS "" CACHE STRING "Arguments passed to the DGEMV thread safety test")
set(CPP_THREAD_SAFETY_SHUTDOWN_ARGS "" CACHE STRING "Arguments passed to the DGEMM shutdown safety test")
if (CPP_THREAD_SAFETY_TEST)
message(STATUS "building thread safety test")
@@ -29,6 +30,16 @@ if (CPP_THREAD_SAFETY_TEST)
add_executable(dgemm_thread_safety_mixed dgemm_thread_safety_mixed.cpp)
target_link_libraries(dgemm_thread_safety_mixed ${CPP_THREAD_SAFETY_LIBS})
add_test(NAME dgemm_thread_safety_mixed COMMAND ${CMAKE_CURRENT_BINARY_DIR}/dgemm_thread_safety_mixed ${CPP_THREAD_SAFETY_DGEMM_MIXED_ARGS})
if (WIN32)
add_executable(dgemm_thread_safety_shutdown dgemm_thread_safety_shutdown.cpp)
target_link_libraries(dgemm_thread_safety_shutdown ${CPP_THREAD_SAFETY_LIBS})
add_test(NAME dgemm_thread_safety_shutdown COMMAND ${CMAKE_CURRENT_BINARY_DIR}/dgemm_thread_safety_shutdown ${CPP_THREAD_SAFETY_SHUTDOWN_ARGS})
set_tests_properties(dgemm_thread_safety_shutdown PROPERTIES TIMEOUT 900)
endif()
if (USE_THREAD AND (USE_OPENMP OR (NOT WIN32 AND NOT CYGWIN)))
add_test(NAME dgemm_thread_safety_mixed_callback COMMAND ${CMAKE_CURRENT_BINARY_DIR}/dgemm_thread_safety_mixed ${CPP_THREAD_SAFETY_DGEMM_MIXED_ARGS} --callback)
endif()
endif()
+30 -1
View File
@@ -3,6 +3,26 @@ include $(TOPDIR)/Makefile.system
all :: dgemv_tester dgemm_tester dgemm_mixed_tester
ifeq ($(OSNAME), WINNT)
all :: dgemm_shutdown_tester
endif
CALLBACK_THREAD_TEST =
ifeq ($(SMP),1)
ifeq ($(USE_OPENMP),1)
CALLBACK_THREAD_TEST = 1
else
ifneq ($(OSNAME),$(filter $(OSNAME),WINNT CYGWIN_NT))
CALLBACK_THREAD_TEST = 1
endif
endif
endif
ifeq ($(CALLBACK_THREAD_TEST),1)
.PHONY : dgemm_mixed_callback_tester
all :: dgemm_mixed_callback_tester
endif
dgemv_tester :
$(CXX) $(COMMON_OPT) -Wall -Wextra -Wshadow -std=c++11 dgemv_thread_safety.cpp ../$(LIBNAME) $(EXTRALIB) $(FEXTRALIB) -o dgemv_tester
./dgemv_tester
@@ -15,5 +35,14 @@ dgemm_mixed_tester : dgemm_tester
$(CXX) $(COMMON_OPT) -Wall -Wextra -Wshadow -std=c++11 dgemm_thread_safety_mixed.cpp ../$(LIBNAME) $(EXTRALIB) $(FEXTRALIB) -o dgemm_mixed_tester
./dgemm_mixed_tester
dgemm_shutdown_tester : dgemm_mixed_tester
$(CXX) $(COMMON_OPT) -Wall -Wextra -Wshadow -std=c++11 dgemm_thread_safety_shutdown.cpp ../$(LIBNAME) $(EXTRALIB) $(FEXTRALIB) -o dgemm_shutdown_tester
./dgemm_shutdown_tester
ifeq ($(CALLBACK_THREAD_TEST),1)
dgemm_mixed_callback_tester : dgemm_mixed_tester
./dgemm_mixed_tester --callback
endif
clean ::
rm -f dgemv_tester dgemm_tester dgemm_mixed_tester
rm -f dgemv_tester dgemm_tester dgemm_mixed_tester dgemm_shutdown_tester
+47 -13
View File
@@ -14,6 +14,21 @@
#endif
#include "cpp_thread_safety_common.h"
std::atomic<uint32_t> callbackInvocations(0);
void thread_callback(int sync, openblas_dojob_callback doJob, int numJobs,
size_t jobDataElementSize, void* jobData, int doJobData){
(void)sync;
callbackInvocations.fetch_add(1, std::memory_order_relaxed);
std::vector<std::thread> workers;
workers.reserve(numJobs);
char* jobs = static_cast<char*>(jobData);
for(int i=0; i<numJobs; i++)
workers.emplace_back(doJob, i, jobs + i * jobDataElementSize, doJobData);
for(auto& worker : workers)
worker.join();
}
void compute_dgemm_pair(std::vector<double>& transA, std::vector<double>& noTransA, std::vector<double>& B, double* firstOutput, double* secondOutput, const blasint randomMatSize, const bool sameVariant){
cblas_dgemm(CblasRowMajor, CblasTrans, CblasNoTrans, randomMatSize, 2, 2, 1.0, &transA[0], randomMatSize, &B[0], 2, 0.0, firstOutput, 2);
if (sameVariant)
@@ -48,26 +63,31 @@ int main(int argc, char* argv[]){
uint32_t numTestRounds = 200;
uint32_t maxHwThreads = GetMaxHwThreads();
bool sameVariant = false;
bool useCallback = false;
if (maxHwThreads < numConcurrentThreads)
numConcurrentThreads = maxHwThreads;
if (argc != 1 && argc != 4 && argc != 5){
std::cout<<"ERROR: expected zero arguments, or: <M> <threads> <rounds> [sameVariant]"<<std::endl;
std::vector<std::string> positionalArgs;
for (int i = 1; i < argc; i++){
std::cout<<argv[i]<<std::endl;
if (std::string(argv[i]) == "--callback")
useCallback = true;
else
positionalArgs.push_back(argv[i]);
}
if (!positionalArgs.empty() && positionalArgs.size() != 3 && positionalArgs.size() != 4){
std::cout<<"ERROR: expected: [<M> <threads> <rounds> [sameVariant]] [--callback]"<<std::endl;
return 1;
}
if(argc == 4 || argc == 5){
std::vector<std::string> cliArgs;
for (int i = 1; i < argc; i++){
cliArgs.push_back(argv[i]);
std::cout<<argv[i]<<std::endl;
}
randomMatSize = std::stoul(cliArgs[0]);
numConcurrentThreads = std::stoul(cliArgs[1]);
numTestRounds = std::stoul(cliArgs[2]);
if (argc == 5)
sameVariant = std::stoul(cliArgs[3]) != 0;
if(!positionalArgs.empty()){
randomMatSize = std::stoul(positionalArgs[0]);
numConcurrentThreads = std::stoul(positionalArgs[1]);
numTestRounds = std::stoul(positionalArgs[2]);
if (positionalArgs.size() == 4)
sameVariant = std::stoul(positionalArgs[3]) != 0;
}
FailIfThreadsAreZero(numConcurrentThreads);
@@ -92,6 +112,8 @@ int main(int argc, char* argv[]){
std::cout<<"Number of testing rounds : "<<numTestRounds<<'\n';
std::cout<<"Second DGEMM uses "<<(sameVariant ? "the same transpose variant" : "a different transpose variant")<<'\n';
std::cout<<"OpenBLAS internal threads : "<<openblas_get_num_threads()<<'\n';
if (useCallback)
std::cout<<"Thread execution backend : caller callback\n";
std::cout<<"This test will need "<<(static_cast<uint64_t>(matrixElements) * 2 * 8 + static_cast<uint64_t>(outputElements) * (2 + 2 * numConcurrentThreads) * 8)/static_cast<double>(1024*1024)<<" MiB of RAM\n"<<std::endl;
std::cout<<"Filling matrices with deterministic values..."<<std::flush;
@@ -110,6 +132,9 @@ int main(int argc, char* argv[]){
compute_dgemm_pair(transA, noTransA, B, &referenceFirst[0], &referenceSecond[0], randomMatSize, sameVariant);
std::cout<<"done\n";
if (useCallback)
openblas_set_threads_callback_function(thread_callback);
std::cout<<"Testing mixed CBLAS DGEMM thread safety\n";
std::cout<<"Launching "<<numConcurrentThreads<<" worker threads..."<<std::flush;
for(uint32_t i=0; i<numConcurrentThreads; i++){
@@ -128,6 +153,15 @@ int main(int argc, char* argv[]){
}
std::cout<<"done\n";
if (useCallback) {
const uint32_t invocations = callbackInvocations.load();
std::cout<<"Thread callback invocations: "<<invocations<<std::endl;
if (invocations == 0) {
std::cout<<"Thread callback was not invoked!"<<std::endl;
return 1;
}
}
std::cout<<"Mixed DGEMM mismatches: "<<mismatches<<std::endl;
if (mismatches != 0) {
std::cout<<"Mixed CBLAS DGEMM thread safety test FAILED!"<<std::endl;
@@ -0,0 +1,165 @@
/* Stress test for library shutdown racing with in-flight BLAS calls
* (https://github.com/OpenMathLib/OpenBLAS/issues/5954).
*
* Windows only. On POSIX, exit() runs the library destructor while worker
* threads are still computing into OpenBLAS-owned buffers, which no amount of
* locking inside blas_shutdown can make safe, so there is nothing to assert
* there; CMakeLists.txt only registers this test on WIN32.
*
* The parent re-executes itself as short-lived children and checks that each
* one terminates cleanly, turning shutdown-path crashes and deadlocks into
* ordinary test failures. Each child (--child-storm N) starts N callers that
* allocate their matrices and park on a gate, releases them so they all enter
* their first dgemm at once, and exits a millisecond later while that
* allocation storm is still in flight.
*
* N must exceed NUM_BUFFERS = MAX(50, NUM_THREADS * 2 * NUM_PARALLEL) for the
* build under test; below that every slot is already mapped and the race is
* unreachable.
*/
#include <atomic>
#include <chrono>
#include <cstdint>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <string>
#include <thread>
#include <vector>
#ifdef OPENBLAS_USE_GENERATED_CBLAS_H
#include "generated/cblas.h"
#else
#include "../cblas.h"
#endif
#include <windows.h>
namespace {
const blasint stormM = 200, stormK = 120, stormN = 90; /* the gh-5954 shape */
const blasint poolDim = 320; /* above the multithreading threshold, so the pool spins up */
const uint32_t defaultStormCallers = 128;
const uint32_t stormDelayMs = 3; /* gate to sweep; at 0 the sweep beats the allocations */
const int stormBlasThreads = 4;
const int stormTimeoutSec = 15;
const int numStormChildren = 40;
std::atomic<uint32_t> parked(0); /* callers built and waiting on the gate */
std::atomic<bool> gate(false);
void fillOperands(std::vector<double>& A, std::vector<double>& B) {
for (size_t i = 0; i < A.size(); i++) A[i] = (i % 1000) / 1000.0;
for (size_t i = 0; i < B.size(); i++) B[i] = (i % 997) / 997.0;
}
void dgemmOnce(blasint m, blasint k, blasint n) {
std::vector<double> A(m * k), B(k * n), C(m * n);
fillOperands(A, B);
cblas_dgemm(CblasColMajor, CblasNoTrans, CblasNoTrans, m, n, k,
1.0, A.data(), m, B.data(), k, 0.1, C.data(), m);
}
/* Allocate before parking, so that when the gate opens nothing stands between
the thread and its first dgemm. */
void gatedWorker(blasint m, blasint k, blasint n) {
std::vector<double> A(m * k), B(k * n), C(m * n);
fillOperands(A, B);
parked.fetch_add(1, std::memory_order_release);
while (!gate.load(std::memory_order_acquire)) std::this_thread::yield();
for (;;)
cblas_dgemm(CblasColMajor, CblasNoTrans, CblasNoTrans, m, n, k,
1.0, A.data(), m, B.data(), k, 0.1, C.data(), m);
}
int ChildStorm(uint32_t nCallers) {
SetErrorMode(SEM_FAILCRITICALERRORS | SEM_NOGPFAULTERRORBOX);
openblas_set_num_threads(stormBlasThreads);
/* Build the OpenBLAS worker pool first, so the storm is buffer allocation
and not pool startup. */
dgemmOnce(poolDim, poolDim, poolDim);
for (uint32_t i = 0; i < nCallers; i++)
std::thread(gatedWorker, stormM, stormK, stormN).detach();
for (int ms = 0; parked.load(std::memory_order_acquire) < nCallers && ms < 10000; ms++)
std::this_thread::sleep_for(std::chrono::milliseconds(1));
gate.store(true, std::memory_order_release);
std::this_thread::sleep_for(std::chrono::milliseconds(stormDelayMs));
std::exit(0);
}
/* Returns 0 if the child exited cleanly, nonzero otherwise; fills outcome. */
int RunChild(const std::string& args, int timeoutSec, std::string& outcome) {
char exe[MAX_PATH];
if (GetModuleFileNameA(NULL, exe, MAX_PATH) == 0) {
outcome = "GetModuleFileName failed";
return 1;
}
std::string cmd = "\"" + std::string(exe) + "\" " + args;
STARTUPINFOA si;
PROCESS_INFORMATION pi;
ZeroMemory(&si, sizeof(si));
si.cb = sizeof(si);
ZeroMemory(&pi, sizeof(pi));
if (!CreateProcessA(NULL, &cmd[0], NULL, NULL, FALSE, 0, NULL, NULL, &si, &pi)) {
outcome = "CreateProcess failed";
return 1;
}
int ret = 1;
char buf[64];
if (WaitForSingleObject(pi.hProcess, timeoutSec * 1000) != WAIT_OBJECT_0) {
TerminateProcess(pi.hProcess, 1);
WaitForSingleObject(pi.hProcess, 5000);
snprintf(buf, sizeof(buf), "HANG (killed after %ds)", timeoutSec);
} else {
DWORD code = 1;
GetExitCodeProcess(pi.hProcess, &code);
if (code == 0) {
snprintf(buf, sizeof(buf), "clean exit");
ret = 0;
} else {
snprintf(buf, sizeof(buf), "CRASH (exit code 0x%08lX)", (unsigned long)code);
}
}
outcome = buf;
CloseHandle(pi.hThread);
CloseHandle(pi.hProcess);
return ret;
}
} // namespace
int main(int argc, char* argv[]) {
if (argc >= 3 && std::strcmp(argv[1], "--child-storm") == 0)
return ChildStorm(uint32_t(std::atoi(argv[2])));
SetErrorMode(SEM_FAILCRITICALERRORS | SEM_NOGPFAULTERRORBOX);
uint32_t callers = defaultStormCallers;
if (argc >= 2) {
int n = std::atoi(argv[1]);
if (n > 0) callers = uint32_t(n);
}
int failures = 0;
std::cout << "Testing process exit during an allocation storm (" << callers << " callers)"
<< std::endl;
for (int i = 0; i < numStormChildren; i++) {
std::string outcome;
failures += RunChild("--child-storm " + std::to_string(callers), stormTimeoutSec, outcome);
std::cout << " storm child " << i << ": " << outcome << std::endl;
}
if (failures) {
std::cout << "CBLAS DGEMM shutdown safety test FAILED! (" << failures
<< " child processes)" << std::endl;
return 1;
}
std::cout << "CBLAS DGEMM shutdown safety test PASSED!" << std::endl;
return 0;
}
+4 -4
View File
@@ -426,13 +426,13 @@ int detect(void)
if (errcode != ERROR_SUCCESS) wprintf(L"Error reading cpuname from registry:%x\n",errcode);
//wprintf(stderr,L"%s\n",(PWSTR)valstring);
RegCloseKey(reghandle);
if (strstr(valstring, "Snapdragon(R) X Elite")) {
if (strstr(pvalstring, "Snapdragon(R) X Elite")) {
aliased = 1;
return CPU_NEOVERSEN1;
}
if (strstr(valstring, "Ampere(R) Altra")) return CPU_NEOVERSEN1;
if (strstr(valstring, "Snapdragon (TM) 8cx Gen 3")) return CPU_CORTEXX1;
if (strstr(valstring, "Snapdragon Compute Platform")) return CPU_CORTEXX1;
if (strstr(pvalstring, "Ampere(R) Altra")) return CPU_NEOVERSEN1;
if (strstr(pvalstring, "Snapdragon (TM) 8cx Gen 3")) return CPU_CORTEXX1;
if (strstr(pvalstring, "Snapdragon Compute Platform")) return CPU_CORTEXX1;
#endif
#endif
return CPU_ARMV8;
+1 -1
View File
@@ -349,7 +349,7 @@ int CNAME(BLASLONG n, BLASLONG k, FLOAT *alpha, FLOAT *a, BLASLONG lda, FLOAT *x
#else
ONE, ZERO,
#endif
(FLOAT*)(queue[i].sb), 1, buffer, 1, NULL, 0);
(FLOAT*)(queue[i].worker_sb), 1, buffer, 1, NULL, 0);
}
AXPYU_K(n, 0, 0,
+1 -1
View File
@@ -71,7 +71,7 @@
static int tpmv_kernel(blas_arg_t *args, BLASLONG *range_m, BLASLONG *range_n, FLOAT *dummy1, FLOAT *buffer, BLASLONG pos){
volatile FLOAT *a, *x, *y;
FLOAT *a, *x, *y;
BLASLONG incx;
BLASLONG m_from, m_to;
+31
View File
@@ -79,10 +79,32 @@ static int inner_small_matrix_thread(blas_arg_t *args, BLASLONG *range_m, BLASLO
int CNAME(blas_arg_t * args_array, BLASLONG nums){
XFLOAT *buffer;
XFLOAT *sa, *sb;
blasint info;
int nthreads=1;
int (*routine)(blas_arg_t *, void *, void *, XFLOAT *, XFLOAT *, BLASLONG);
int i=0, /*j,*/ current_nums;
#ifndef COMPLEX
#ifdef XDOUBLE
#define ERROR_NAME "QGEMM_BATCH "
#elif defined(DOUBLE)
#define ERROR_NAME "DGEMM_BATCH "
#elif defined(BFLOAT16)
#define ERROR_NAME "SBGEMM_BATCH "
#else
#define ERROR_NAME "SGEMM_BATCH "
#endif
#else
#ifdef XDOUBLE
#define ERROR_NAME "XGEMM_BATCH "
#elif defined(DOUBLE)
#define ERROR_NAME "ZGEMM_BATCH "
#else
#define ERROR_NAME "CGEMM_BATCH "
#endif
#endif
#ifdef SMP
blas_queue_t * queue=NULL;
#endif
@@ -90,6 +112,12 @@ int CNAME(blas_arg_t * args_array, BLASLONG nums){
if(nums <=0 ) return 0;
buffer = (XFLOAT *)blas_memory_alloc(0);
if (!buffer) {
info = -999;
BLASFUNC(xerbla)(ERROR_NAME, &info, sizeof(ERROR_NAME));
return(1);
}
sa = (XFLOAT *)((BLASLONG)buffer +GEMM_OFFSET_A);
sb = (XFLOAT *)(((BLASLONG)sa + ((GEMM_P * GEMM_Q * COMPSIZE * SIZE + GEMM_ALIGN) & ~GEMM_ALIGN)) + GEMM_OFFSET_B);
@@ -119,6 +147,9 @@ int CNAME(blas_arg_t * args_array, BLASLONG nums){
queue=(blas_queue_t *)malloc((nums+1) * sizeof(blas_queue_t));
if(queue == NULL){
openblas_warning(0, "memory alloc failed!\n");
if (buffer) blas_memory_free(buffer);
info = -999;
BLASFUNC(xerbla)(ERROR_NAME, &info, sizeof(ERROR_NAME));
return(1);
}
for(i=0; i<nums; i++){
+17
View File
@@ -214,6 +214,15 @@ int CNAME(blas_arg_t *args, BLASLONG *range_m, BLASLONG *range_n,
double total;
#endif
/* Begin a cancellable generation on the calling thread and poll it at
* block granularity; openblas_cancel() against this thread's slot makes
* the operation return early, leaving C partially updated. (When this
* driver runs on a BLAS worker thread on behalf of another operation,
* the generation is the worker's own, which nobody cancels; the outer
* operation's cancellation is handled by the threading driver.) */
size_t cancel_gen = openblas_cancel_begin();
size_t *cancel_slot = openblas_cancel_self();
k = K;
a = (IFLOAT *)A;
@@ -303,11 +312,15 @@ int CNAME(blas_arg_t *args, BLASLONG *range_m, BLASLONG *range_n,
#endif
for(js = n_from; js < n_to; js += GEMM_R){
if (openblas_cancel_poll(cancel_slot, cancel_gen)) return 0;
min_j = n_to - js;
if (min_j > GEMM_R) min_j = GEMM_R;
for(ls = 0; ls < k; ls += min_l){
if (openblas_cancel_poll(cancel_slot, cancel_gen)) return 0;
min_l = k - ls;
if (min_l >= GEMM_Q * 2) {
@@ -354,6 +367,8 @@ int CNAME(blas_arg_t *args, BLASLONG *range_m, BLASLONG *range_n,
#else
for(jjs = js; jjs < js + min_j; jjs += min_jj){
if (openblas_cancel_poll(cancel_slot, cancel_gen)) return 0;
min_jj = min_j + js - jjs;
#if defined(SKYLAKEX) || defined(COOPERLAKE) || defined(SAPPHIRERAPIDS)
/* the current AVX512 s/d/c/z GEMM kernel requires n>=6*GEMM_UNROLL_N to achieve best performance */
@@ -391,6 +406,8 @@ int CNAME(blas_arg_t *args, BLASLONG *range_m, BLASLONG *range_n,
#endif
for(is = m_from + min_i; is < m_to; is += min_i){
if (openblas_cancel_poll(cancel_slot, cancel_gen)) return 0;
min_i = m_to - is;
if (min_i >= GEMM_P * 2) {
+5
View File
@@ -37,6 +37,11 @@
/* or implied, of The University of Texas at Austin. */
/*********************************************************************/
#if defined(__loongarch__) && defined(LA464) && defined(DOUBLE)
#undef GEMM_P
#define GEMM_P 96
#endif
#ifndef CACHE_LINE_SIZE
#define CACHE_LINE_SIZE 8
#endif
+71 -18
View File
@@ -254,6 +254,17 @@ static int inner_thread(blas_arg_t *args, BLASLONG *range_m, BLASLONG *range_n,
FLOAT *c;
job_t *job = (job_t *)args -> common;
/* Cancellation token forwarded (by gemm_driver) from the thread that
* issued this operation, or NULL. Once cancellation is observed the
* remaining compute (copy/kernel calls) is skipped, but every
* synchronization point - buffer publication and flag clearing - is
* still executed, so sibling threads never deadlock and the operation
* finishes quickly with C left in an unspecified, partially-updated
* state. */
size_t *cancel_slot = args -> cancel_slot;
size_t cancel_gen = args -> cancel_gen;
int cancelled = 0;
BLASLONG nthreads_m;
BLASLONG mypos_m, mypos_n;
BLASLONG divide_rate = DIVIDE_RATE;
@@ -318,8 +329,10 @@ static int inner_thread(blas_arg_t *args, BLASLONG *range_m, BLASLONG *range_n,
n_to = range_n[mypos + 1];
}
/* Multiply C by beta if needed */
if (beta) {
cancelled = openblas_cancel_poll(cancel_slot, cancel_gen);
/* Multiply C by beta if needed (skipped when cancelled) */
if (beta && !cancelled) {
#ifndef COMPLEX
if (beta[0] != ONE)
#else
@@ -346,6 +359,9 @@ static int inner_thread(blas_arg_t *args, BLASLONG *range_m, BLASLONG *range_n,
/* Iterate through steps of k */
for(ls = 0; ls < k; ls += min_l){
/* Poll for cancellation at block granularity */
if (!cancelled) cancelled = openblas_cancel_poll(cancel_slot, cancel_gen);
/* Determine step size in k */
min_l = k - ls;
if (min_l >= GEMM_Q * 2) {
@@ -375,10 +391,12 @@ static int inner_thread(blas_arg_t *args, BLASLONG *range_m, BLASLONG *range_n,
}
}
/* Copy local region of A into workspace */
START_RPCC();
ICOPY_OPERATION(min_l, min_i, a, lda, ls, m_from, sa);
STOP_RPCC(copy_A);
/* Copy local region of A into workspace (skipped when cancelled) */
if (!cancelled) {
START_RPCC();
ICOPY_OPERATION(min_l, min_i, a, lda, ls, m_from, sa);
STOP_RPCC(copy_A);
}
/* Copy local region of B into workspace and apply kernel */
div_n = (n_to - n_from + divide_rate - 1) / divide_rate;
@@ -393,9 +411,13 @@ static int inner_thread(blas_arg_t *args, BLASLONG *range_m, BLASLONG *range_n,
#if defined(FUSED_GEMM) && !defined(TIMING)
/* Fused operation to copy region of B into workspace and apply kernel */
FUSED_KERNEL_OPERATION(min_i, MIN(n_to, js + div_n) - js, min_l, alpha,
sa, buffer[bufferside], b, ldb, c, ldc, m_from, js, ls);
/* Fused operation to copy region of B into workspace and apply kernel
* (skipped when cancelled; the buffer is still published below so
* sibling threads do not stall) */
if (!cancelled) cancelled = openblas_cancel_poll(cancel_slot, cancel_gen);
if (!cancelled)
FUSED_KERNEL_OPERATION(min_i, MIN(n_to, js + div_n) - js, min_l, alpha,
sa, buffer[bufferside], b, ldb, c, ldc, m_from, js, ls);
#else
@@ -414,6 +436,12 @@ static int inner_thread(blas_arg_t *args, BLASLONG *range_m, BLASLONG *range_n,
*/
if (min_jj > GEMM_UNROLL_N) min_jj = GEMM_UNROLL_N;
#endif
/* Poll for cancellation between blocks; when cancelled, skip the
* copy and kernel but keep iterating so the buffer is still
* published below and sibling threads do not stall */
if (!cancelled) cancelled = openblas_cancel_poll(cancel_slot, cancel_gen);
if (!cancelled) {
/* Copy part of local region of B into workspace */
START_RPCC();
OCOPY_OPERATION(min_l, min_jj, b, ldb, ls, jjs,
@@ -431,6 +459,8 @@ static int inner_thread(blas_arg_t *args, BLASLONG *range_m, BLASLONG *range_n,
ops += 2 * min_i * min_jj * min_l;
#endif
}
}
#endif
@@ -460,7 +490,10 @@ static int inner_thread(blas_arg_t *args, BLASLONG *range_m, BLASLONG *range_n,
STOP_RPCC(waiting2);
MB;
/* Apply kernel with local region of A and part of other region of B */
/* Apply kernel with local region of A and part of other region of B
* (skipped when cancelled; the flag is still cleared below) */
if (!cancelled) cancelled = openblas_cancel_poll(cancel_slot, cancel_gen);
if (!cancelled) {
START_RPCC();
KERNEL_OPERATION(min_i, MIN(range_n[current + 1] - js, div_n), min_l, alpha,
sa, (IFLOAT *)job[current].working[mypos][CACHE_LINE_SIZE * bufferside],
@@ -470,6 +503,7 @@ static int inner_thread(blas_arg_t *args, BLASLONG *range_m, BLASLONG *range_n,
#ifdef TIMING
ops += 2 * min_i * MIN(range_n[current + 1] - js, div_n) * min_l;
#endif
}
}
/* Clear synchronization flag if this thread is done with other region of B */
@@ -480,9 +514,12 @@ static int inner_thread(blas_arg_t *args, BLASLONG *range_m, BLASLONG *range_n,
}
} while (current != mypos);
/* Iterate through steps of m
/* Iterate through steps of m
* Note: First step has already been finished */
for(is = m_from + min_i; is < m_to; is += min_i){
/* Poll for cancellation between blocks */
if (!cancelled) cancelled = openblas_cancel_poll(cancel_slot, cancel_gen);
min_i = m_to - is;
if (min_i >= GEMM_P * 2) {
min_i = GEMM_P;
@@ -491,10 +528,12 @@ static int inner_thread(blas_arg_t *args, BLASLONG *range_m, BLASLONG *range_n,
min_i = (((min_i + 1) / 2 + GEMM_UNROLL_M - 1)/GEMM_UNROLL_M) * GEMM_UNROLL_M;
}
/* Copy local region of A into workspace */
START_RPCC();
ICOPY_OPERATION(min_l, min_i, a, lda, ls, is, sa);
STOP_RPCC(copy_A);
/* Copy local region of A into workspace (skipped when cancelled) */
if (!cancelled) {
START_RPCC();
ICOPY_OPERATION(min_l, min_i, a, lda, ls, is, sa);
STOP_RPCC(copy_A);
}
/* Get regions of B and apply kernel */
current = mypos;
@@ -504,17 +543,20 @@ static int inner_thread(blas_arg_t *args, BLASLONG *range_m, BLASLONG *range_n,
div_n = (range_n[current + 1] - range_n[current] + divide_rate - 1) / divide_rate;
for (js = range_n[current], bufferside = 0; js < range_n[current + 1]; js += div_n, bufferside ++) {
/* Apply kernel with local region of A and part of region of B */
/* Apply kernel with local region of A and part of region of B
* (skipped when cancelled; the flag is still cleared below) */
if (!cancelled) {
START_RPCC();
KERNEL_OPERATION(min_i, MIN(range_n[current + 1] - js, div_n), min_l, alpha,
sa, (IFLOAT *)job[current].working[mypos][CACHE_LINE_SIZE * bufferside],
c, ldc, is, js);
STOP_RPCC(kernel);
#ifdef TIMING
ops += 2 * min_i * MIN(range_n[current + 1] - js, div_n) * min_l;
#endif
}
/* Clear synchronization flag if this thread is done with region of B */
if (is + min_i >= m_to) {
WMB;
@@ -643,6 +685,12 @@ static int gemm_driver(blas_arg_t *args, BLASLONG *range_m, BLASLONG
newarg.beta = args -> beta;
newarg.nthreads = args -> nthreads;
newarg.common = (void *)job;
/* Begin a cancellable generation on this (the calling, i.e. issuing)
* thread and forward it to the worker threads through the job
* arguments. */
newarg.cancel_gen = openblas_cancel_begin();
newarg.cancel_slot = openblas_cancel_self();
#ifdef PARAMTEST
newarg.gemm_p = args -> gemm_p;
newarg.gemm_q = args -> gemm_q;
@@ -746,6 +794,11 @@ static int gemm_driver(blas_arg_t *args, BLASLONG *range_m, BLASLONG
WMB;
/* Execute parallel computation */
exec_blas(nthreads, queue);
/* Skip the remaining column blocks once this operation has been
* cancelled. Each exec_blas() round is a full barrier, so bailing
* out between rounds leaves the library in a consistent state. */
if (openblas_cancel_poll(newarg.cancel_slot, newarg.cancel_gen)) break;
}
#ifdef USE_ALLOC_HEAP
+1 -1
View File
@@ -47,7 +47,7 @@ int CNAME(BLASLONG m, BLASLONG n, BLASLONG k, FLOAT alpha_r,
BLASLONG i, j;
BLASLONG loop;
volatile FLOAT subbuffer[GEMM_UNROLL_MN * GEMM_UNROLL_MN * COMPSIZE];
FLOAT subbuffer[GEMM_UNROLL_MN * GEMM_UNROLL_MN * COMPSIZE];
if (m + offset < 0) {
#ifndef LOWER
+1
View File
@@ -41,6 +41,7 @@ set(COMMON_SOURCES
openblas_env.c
openblas_get_num_procs.c
openblas_get_num_threads.c
openblas_cancel.c
blas_server_callback.c
)
+4 -1
View File
@@ -1,7 +1,7 @@
TOPDIR = ../..
include ../../Makefile.system
COMMONOBJS = memory.$(SUFFIX) xerbla.$(SUFFIX) c_abs.$(SUFFIX) z_abs.$(SUFFIX) openblas_set_num_threads.$(SUFFIX) openblas_get_num_threads.$(SUFFIX) openblas_get_num_procs.$(SUFFIX) openblas_get_config.$(SUFFIX) openblas_get_parallel.$(SUFFIX) openblas_error_handle.$(SUFFIX) openblas_env.$(SUFFIX) blas_server_callback.$(SUFFIX)
COMMONOBJS = memory.$(SUFFIX) xerbla.$(SUFFIX) c_abs.$(SUFFIX) z_abs.$(SUFFIX) openblas_set_num_threads.$(SUFFIX) openblas_get_num_threads.$(SUFFIX) openblas_get_num_procs.$(SUFFIX) openblas_get_config.$(SUFFIX) openblas_get_parallel.$(SUFFIX) openblas_error_handle.$(SUFFIX) openblas_env.$(SUFFIX) openblas_cancel.$(SUFFIX) blas_server_callback.$(SUFFIX)
#COMMONOBJS += slamch.$(SUFFIX) slamc3.$(SUFFIX) dlamch.$(SUFFIX) dlamc3.$(SUFFIX)
@@ -172,6 +172,9 @@ openblas_error_handle.$(SUFFIX) : openblas_error_handle.c
openblas_env.$(SUFFIX) : openblas_env.c
$(CC) $(CFLAGS) -c $< -o $(@F)
openblas_cancel.$(SUFFIX) : openblas_cancel.c ../../common.h
$(CC) $(CFLAGS) -c $< -o $(@F)
blasL1thread.$(SUFFIX) : blas_l1_thread.c ../../common.h ../../common_thread.h
$(CC) $(CFLAGS) -c $< -o $(@F)
+8 -3
View File
@@ -335,7 +335,7 @@ static void legacy_exec(void *func, int mode, blas_arg_t *args, void *sb){
}
}
#if defined(OS_LINUX) && !defined(NO_AFFINITY)
#if defined(OS_LINUX) && !defined(NO_AFFINITY)
int gotoblas_set_affinity(int);
int gotoblas_set_affinity2(int);
int get_node(void);
@@ -345,7 +345,7 @@ static int increased_threads = 0;
#ifdef OS_LINUX
extern int openblas_get_num_threads(void);
OPENBLAS_EXPORT
int openblas_setaffinity(int thread_idx, size_t cpusetsize, cpu_set_t* cpu_set) {
const int active_threads = openblas_get_num_threads();
@@ -360,6 +360,7 @@ int openblas_setaffinity(int thread_idx, size_t cpusetsize, cpu_set_t* cpu_set)
return pthread_setaffinity_np(thread, cpusetsize, cpu_set);
}
OPENBLAS_EXPORT
int openblas_getaffinity(int thread_idx, size_t cpusetsize, cpu_set_t* cpu_set) {
const int active_threads = openblas_get_num_threads();
@@ -836,6 +837,7 @@ if (openblas_threads_callback_) {
#endif
routine = (int (*)(blas_arg_t *, void *, void *, double *, double *, BLASLONG))queue -> routine;
queue->worker_sb = queue->sb;
if (queue -> mode & BLAS_LEGACY) {
legacy_exec(routine, queue -> mode, queue -> args, queue -> sb);
@@ -867,6 +869,7 @@ if (openblas_threads_callback_) {
return 0;
}
OPENBLAS_EXPORT
void goto_set_num_threads(int num_threads) {
long i;
@@ -939,6 +942,7 @@ void goto_set_num_threads(int num_threads) {
}
OPENBLAS_EXPORT
void openblas_set_num_threads(int num_threads) {
goto_set_num_threads(num_threads);
@@ -1137,9 +1141,10 @@ if (!(queue -> mode & BLAS_COMPLEX)){
/* Other types in future */
}
}
queue->sb=sb;
}
queue->worker_sb = sb;
#ifdef MONITOR
main_status[cpu] = MAIN_RUNNING2;
#endif
+2 -1
View File
@@ -6,7 +6,8 @@ openblas_threads_callback openblas_threads_callback_ = 0;
/* non-threadsafe function should be called before any other
openblas function to change how threads are managed */
OPENBLAS_EXPORT
void openblas_set_threads_callback_function(openblas_threads_callback callback)
{
openblas_threads_callback_ = callback;
}
}
+5 -3
View File
@@ -118,17 +118,19 @@ void goto_set_num_threads(int num_threads) {
#endif
}
OPENBLAS_EXPORT
void openblas_set_num_threads(int num_threads) {
blas_is_num_threads_set_explicitly = 1;
goto_set_num_threads(num_threads);
}
#ifdef OS_LINUX
OPENBLAS_EXPORT
int openblas_setaffinity(int thread_idx, size_t cpusetsize, cpu_set_t* cpu_set) {
fprintf(stderr,"OpenBLAS: use OpenMP environment variables for setting cpu affinity\n");
return -1;
}
OPENBLAS_EXPORT
int openblas_getaffinity(int thread_idx, size_t cpusetsize, cpu_set_t* cpu_set) {
fprintf(stderr,"OpenBLAS: use OpenMP environment variables for querying cpu affinity\n");
return -1;
@@ -327,7 +329,6 @@ static void exec_threads(int thread_num, blas_queue_t *queue, int buf_index){
if (sa == NULL) {
sa = (void *)((BLASLONG)buffer + GEMM_OFFSET_A);
queue->sa=sa;
}
if (sb == NULL) {
@@ -376,10 +377,11 @@ fprintf(stderr,"UNHANDLED COMPLEX\n");
/* Other types in future */
}
}
queue->sb=sb;
}
}
queue->worker_sb = sb;
if (queue -> mode & BLAS_LEGACY) {
legacy_exec(queue -> routine, queue -> mode, queue -> args, sb);
} else
+5 -1
View File
@@ -311,9 +311,10 @@ static DWORD WINAPI blas_thread_server(void *arg){
/* Other types in future */
}
}
queue->sb=sb;
}
queue->worker_sb = sb;
#ifdef MONITOR
main_status[cpu] = MAIN_RUNNING2;
#endif
@@ -483,6 +484,7 @@ int exec_blas(BLASLONG num, blas_queue_t *queue){
if ((num > 1) && queue -> next) exec_blas_async(1, queue -> next);
routine = queue -> routine;
queue->worker_sb = queue->sb;
if (queue -> mode & BLAS_LEGACY) {
legacy_exec(routine, queue -> mode, queue -> args, queue -> sb);
@@ -539,6 +541,7 @@ int BLASFUNC(blas_thread_shutdown)(void){
return 0;
}
OPENBLAS_EXPORT
void goto_set_num_threads(int num_threads)
{
long i;
@@ -583,6 +586,7 @@ void goto_set_num_threads(int num_threads)
blas_cpu_number = num_threads;
}
OPENBLAS_EXPORT
void openblas_set_num_threads(int num)
{
goto_set_num_threads(num);
+2
View File
@@ -171,6 +171,8 @@ extern gotoblas_t gotoblas_CORTEXA53;
#else
extern gotoblas_t gotoblas_CORTEXA57;
#endif
/* Keep A72 out of the default DYNAMIC_CORE set (see #4389); opt in via
* DYNAMIC_LIST=CORTEXA72. Default DYNAMIC_ARCH continues to alias A57. */
#define gotoblas_CORTEXA72 gotoblas_CORTEXA57
#define gotoblas_CORTEXA73 gotoblas_CORTEXA57
#define gotoblas_FALKOR gotoblas_CORTEXA57
+98 -98
View File
@@ -500,6 +500,7 @@ int blas_get_cpu_number(void){
#endif
OPENBLAS_EXPORT
int openblas_get_num_procs(void) {
#ifndef SMP
return 1;
@@ -508,6 +509,7 @@ int openblas_get_num_procs(void) {
#endif
}
OPENBLAS_EXPORT
int openblas_get_num_threads(void) {
#ifndef SMP
return 1;
@@ -2075,6 +2077,7 @@ int blas_get_cpu_number(void){
#endif
OPENBLAS_EXPORT
int openblas_get_num_procs(void) {
#ifndef SMP
return 1;
@@ -2083,6 +2086,7 @@ int openblas_get_num_procs(void) {
#endif
}
OPENBLAS_EXPORT
int openblas_get_num_threads(void) {
#ifndef SMP
return 1;
@@ -2095,7 +2099,7 @@ int openblas_get_num_threads(void) {
struct release_t {
void *address;
void (*func)(struct release_t *);
void (* _Atomic func)(struct release_t *);
long attr;
};
@@ -2119,6 +2123,37 @@ static pthread_spinlock_t alloc_lock = 0;
static BLASULONG alloc_lock = 0UL;
#endif
static void blas_release_register(void *address, void (*func)(struct release_t *), long attr) {
struct release_t *release;
int rpos;
#if (defined(SMP) || defined(USE_LOCKING)) && !defined(USE_OPENMP)
LOCK_COMMAND(&alloc_lock);
#endif
#if defined(HAVE_C11) && !defined(__cplusplus)
rpos = atomic_fetch_add(&release_pos, 1);
#elif defined(__GNUC__)
rpos = __sync_fetch_and_add(&release_pos, 1);
#elif defined(OS_WINDOWS)
rpos = InterlockedIncrement((LONG volatile *)&release_pos) - 1;
#else
rpos = release_pos++;
#endif
if (likely(rpos < NUM_BUFFERS)) {
release = &release_info[rpos];
} else {
release = &new_release_info[rpos - NUM_BUFFERS];
}
release->address = address;
release->attr = attr;
WMB;
release->func = func;
#if (defined(SMP) || defined(USE_LOCKING)) && !defined(USE_OPENMP)
UNLOCK_COMMAND(&alloc_lock);
#endif
}
#ifdef ALLOC_MMAP
static void alloc_mmap_free(struct release_t *release){
@@ -2150,20 +2185,7 @@ static void *alloc_mmap(void *address){
}
if (map_address != (void *)-1) {
#if (defined(SMP) || defined(USE_LOCKING)) && !defined(USE_OPENMP)
LOCK_COMMAND(&alloc_lock);
#endif
int rpos = release_pos++;
if (likely(rpos < NUM_BUFFERS)) {
release_info[rpos].address = map_address;
release_info[rpos].func = alloc_mmap_free;
} else {
new_release_info[rpos-NUM_BUFFERS].address = map_address;
new_release_info[rpos-NUM_BUFFERS].func = alloc_mmap_free;
}
#if (defined(SMP) || defined(USE_LOCKING)) && !defined(USE_OPENMP)
UNLOCK_COMMAND(&alloc_lock);
#endif
blas_release_register(map_address, alloc_mmap_free, 0);
} else {
#ifdef DEBUG
int errsv=errno;
@@ -2319,20 +2341,7 @@ static void *alloc_mmap(void *address){
#endif
if (map_address != (void *)-1) {
#if (defined(SMP) || defined(USE_LOCKING)) && !defined(USE_OPENMP)
LOCK_COMMAND(&alloc_lock);
#endif
int rpos = release_pos++;
if (likely(rpos < NUM_BUFFERS)) {
release_info[rpos].address = map_address;
release_info[rpos].func = alloc_mmap_free;
} else {
new_release_info[rpos-NUM_BUFFERS].address = map_address;
new_release_info[rpos-NUM_BUFFERS].func = alloc_mmap_free;
}
#if (defined(SMP) || defined(USE_LOCKING)) && !defined(USE_OPENMP)
UNLOCK_COMMAND(&alloc_lock);
#endif
blas_release_register(map_address, alloc_mmap_free, 0);
}
return map_address;
@@ -2360,14 +2369,7 @@ static void *alloc_malloc(void *address){
if (map_address == (void *)NULL) map_address = (void *)-1;
if (map_address != (void *)-1) {
int rpos = release_pos++;
if (likely(rpos < NUM_BUFFERS)) {
release_info[rpos].address = map_address;
release_info[rpos].func = alloc_malloc_free;
} else {
new_release_info[rpos-NUM_BUFFERS].address = map_address;
new_release_info[rpos-NUM_BUFFERS].func = alloc_malloc_free;
}
blas_release_register(map_address, alloc_malloc_free, 0);
}
return map_address;
@@ -2399,14 +2401,7 @@ static void *alloc_qalloc(void *address){
if (map_address == (void *)NULL) map_address = (void *)-1;
if (map_address != (void *)-1) {
int rpos = release_pos++;
if (likely(rpos < NUM_BUFFERS)) {
release_info[rpos].address = map_address;
release_info[rpos].func = alloc_qalloc_free;
} else {
new_release_info[rpos-NUM_BUFFERS].address = map_address;
new_release_info[rpos-NUM_BUFFERS].func = alloc_qalloc_free;
}
blas_release_register(map_address, alloc_qalloc_free, 0);
}
return (void *)(((BLASULONG)map_address + FIXED_PAGESIZE - 1) & ~(FIXED_PAGESIZE - 1));
@@ -2433,14 +2428,7 @@ static void *alloc_windows(void *address){
if (map_address == (void *)NULL) map_address = (void *)-1;
if (map_address != (void *)-1) {
int rpos = release_pos++;
if (likely(rpos < NUM_BUFFERS)) {
release_info[rpos].address = map_address;
release_info[rpos].func = alloc_windows_free;
} else {
new_release_info[rpos-NUM_BUFFERS].address = map_address;
new_release_info[rpos-NUM_BUFFERS].func = alloc_windows_free;
}
blas_release_register(map_address, alloc_windows_free, 0);
}
return map_address;
@@ -2482,16 +2470,7 @@ static void *alloc_devicedirver(void *address){
fd, 0);
if (map_address != (void *)-1) {
int rpos = release_pos++;
if (likely(rpos < NUM_BUFFERS)) {
release_info[rpos].address = map_address;
release_info[rpos].attr = fd;
release_info[rpos].func = alloc_devicedirver_free;
} else {
new_release_info[rpos-NUM_BUFFERS].address = map_address;
new_release_info[rpos-NUM_BUFFERS].attr = fd;
new_release_info[rpos-NUM_BUFFERS].func = alloc_devicedirver_free;
}
blas_release_register(map_address, alloc_devicedirver_free, fd);
}
return map_address;
@@ -2526,16 +2505,7 @@ static void *alloc_shm(void *address){
shmctl(shmid, IPC_RMID, 0);
int rpos = release_pos++;
if (likely(rpos < NUM_BUFFERS)) {
release_info[rpos].address = map_address;
release_info[rpos].attr = shmid;
release_info[rpos].func = alloc_shm_free;
} else {
new_release_info[rpos-NUM_BUFFERS].address = map_address;
new_release_info[rpos-NUM_BUFFERS].attr = shmid;
new_release_info[rpos-NUM_BUFFERS].func = alloc_shm_free;
}
blas_release_register(map_address, alloc_shm_free, shmid);
}
return map_address;
@@ -2643,14 +2613,7 @@ fprintf(stderr,"alloc_hugetlb got called\n");
#endif
if (map_address != (void *)-1){
int rpos = release_pos++;
if (likely(rpos < NUM_BUFFERS)) {
release_info[rpos].address = map_address;
release_info[rpos].func = alloc_hugetlb_free;
} else {
new_release_info[rpos-NUM_BUFFERS].address = map_address;
new_release_info[rpos-NUM_BUFFERS].func = alloc_hugetlb_free;
}
blas_release_register(map_address, alloc_hugetlb_free, 0);
}
return map_address;
@@ -2695,16 +2658,7 @@ static void *alloc_hugetlbfile(void *address){
fd, 0);
if (map_address != (void *)-1) {
int rpos = release_pos++;
if (likely(rpos < NUM_BUFFERS)) {
release_info[rpos].address = map_address;
release_info[rpos].attr = fd;
release_info[rpos].func = alloc_hugetlbfile_free;
} else {
new_release_info[rpos-NUM_BUFFERS].address = map_address;
new_release_info[rpos-NUM_BUFFERS].attr = fd;
new_release_info[rpos-NUM_BUFFERS].func = alloc_hugetlbfile_free;
}
blas_release_register(map_address, alloc_hugetlbfile_free, fd);
}
return map_address;
@@ -3052,7 +3006,9 @@ void *blas_memory_alloc(int procpos){
#endif
memory_overflowed=1;
MB;
new_release_info = (struct release_t*) malloc(NEW_BUFFERS * sizeof(struct release_t));
/* zeroed so blas_shutdown sees NULL func in slots that were reserved but
never published */
new_release_info = (struct release_t*) calloc(NEW_BUFFERS, sizeof(struct release_t));
newmemory = (struct newmemstruct*) malloc(NEW_BUFFERS * sizeof(struct newmemstruct));
for (i = 0; i < NEW_BUFFERS; i++) {
newmemory[i].addr = (void *)0;
@@ -3236,9 +3192,41 @@ void blas_memory_free_nolock(void * map_address) {
free(map_address);
}
#if defined(OS_WINDOWS) && !defined(OS_CYGWIN_NT)
/* During process termination Windows has already killed every other thread,
possibly while one held alloc_lock or a blas server lock, so any cleanup
here can only deadlock or crash; the OS reclaims the memory anyway.
Nothing in the SDK reports this from a destructor. DllMain's lpReserved
distinguishes the two cases, but outside MSVC gotoblas_quit runs from the
CRT's fini array via __attribute__((destructor)) and never sees
it. RtlDllShutdownInProgress is documented under Win32 Dev Notes but
deliberately absent from the SDK headers, so callers declare it themselves
If it cannot be resolved we fall back to the previous behaviour. */
typedef BOOLEAN (WINAPI *rtl_dll_shutdown_in_progress_t)(VOID);
static rtl_dll_shutdown_in_progress_t rtl_dll_shutdown_in_progress = NULL;
/* Resolved at init, not on the way out: GetModuleHandle takes LdrpSnapsLock,
which ExitProcess does not release before it kills the other threads. */
static void blas_shutdown_check_init(void) {
HMODULE ntdll = GetModuleHandleA("ntdll.dll");
if (!ntdll) return;
rtl_dll_shutdown_in_progress = (rtl_dll_shutdown_in_progress_t)(void *)
GetProcAddress(ntdll, "RtlDllShutdownInProgress");
}
static int blas_process_is_terminating(void) {
return rtl_dll_shutdown_in_progress && rtl_dll_shutdown_in_progress();
}
#endif
void blas_shutdown(void){
int pos;
int pos, release_count;
#if defined(OS_WINDOWS) && !defined(OS_CYGWIN_NT)
if (blas_process_is_terminating()) return;
#endif
#ifdef SMP
BLASFUNC(blas_thread_shutdown)();
@@ -3246,12 +3234,18 @@ void blas_shutdown(void){
LOCK_COMMAND(&alloc_lock);
for (pos = 0; pos < release_pos; pos ++) {
if (likely(pos < NUM_BUFFERS))
release_info[pos].func(&release_info[pos]);
else
new_release_info[pos-NUM_BUFFERS].func(&new_release_info[pos-NUM_BUFFERS]);
release_count = release_pos;
for (pos = 0; pos < release_count; pos ++) {
struct release_t *release = likely(pos < NUM_BUFFERS) ?
&release_info[pos] : &new_release_info[pos-NUM_BUFFERS];
void (*func)(struct release_t *) = release->func;
RMB;
if (func == NULL) continue; /* reserved but never published: owner died mid-allocation */
func(release);
release->func = NULL;
release->address = NULL;
}
release_pos = 0;
#ifdef SEEK_ADDRESS
base_address = 0UL;
@@ -3278,6 +3272,8 @@ void blas_shutdown(void){
}
free((void*)newmemory);
newmemory = NULL;
free(new_release_info);
new_release_info = NULL;
memory_overflowed = 0;
}
@@ -3402,6 +3398,10 @@ void CONSTRUCTOR gotoblas_init(void) {
if (gotoblas_initialized) return;
#if defined(OS_WINDOWS) && !defined(OS_CYGWIN_NT)
blas_shutdown_check_init();
#endif
#ifdef SMP
openblas_fork_handler();
#endif
+188
View File
@@ -0,0 +1,188 @@
/*****************************************************************************
Copyright (c) 2026, The OpenBLAS Project
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in
the documentation and/or other materials provided with the
distribution.
3. Neither the name of the OpenBLAS project nor the names of
its contributors may be used to endorse or promote products
derived from this software without specific prior written
permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
**********************************************************************************/
#include <stddef.h>
#include "common.h"
/* Cooperative cancellation of in-flight OpenBLAS operations.
*
* Every thread owns a pointer-sized generation slot in thread-local
* storage:
*
* - openblas_cancel_token() returns the address of the calling thread's
* slot. The address is stable for the lifetime of the thread.
* - Instrumented compute drivers advance the slot to a fresh even value
* at operation entry (on the issuing thread) and poll it at block
* granularity: any change - the cancel bit or a later generation -
* makes the operation abandon its remaining work and return early.
* - openblas_cancel(token, loaded_token) requests cancellation of the
* operation that was in flight when the caller loaded *token: it
* atomically sets the cancel bit iff the slot still holds
* loaded_token. A racing or stale request (the operation completed;
* a new one may have started) either fails the compare-exchange or
* dirties an already-dead generation - both harmless. May be called
* from any thread.
*
* A cancelled operation returns quickly but leaves its output buffers in
* an unspecified, partially-updated state; the caller is responsible for
* discarding the result. The library itself remains in a consistent
* state and can service further calls.
*
* These symbols are deliberately exported without any SYMBOLPREFIX /
* SYMBOLSUFFIX decoration, like the other openblas_* utility functions
* that are not per-precision entry points.
*/
/* Storage for the per-thread generation slot. Compiler-emitted TLS is
* used where the target supports it (clang reports per-target support
* via __has_feature(tls); e.g. 32-bit iOS with an old deployment minimum
* lacks it). Where it does not, the slot falls back to a
* pthread_getspecific() lookup of a lazily heap-allocated slot: slightly
* more expensive at operation entry, but the compute drivers cache the
* slot's address, so the polling fast path is identical. */
#if defined(_MSC_VER) && !defined(__clang__)
#define OPENBLAS_CANCEL_TLS __declspec(thread)
#elif defined(__clang__)
#if __has_feature(tls)
#define OPENBLAS_CANCEL_TLS __thread
#endif
#elif defined(__GNUC__) || defined(__SUNPRO_C) || defined(__xlC__)
#define OPENBLAS_CANCEL_TLS __thread
#endif
#ifdef OPENBLAS_CANCEL_TLS
/* This thread's generation slot. Bit 0 is the cancel flag; the remaining
* bits count operations issued by this thread. */
static OPENBLAS_CANCEL_TLS size_t openblas_cancel_slot = 0;
/* Address of the calling thread's generation slot. */
static size_t *openblas_cancel_slot_addr(void) {
return (size_t *)&openblas_cancel_slot;
}
#else
#include <pthread.h>
#include <stdlib.h>
static pthread_key_t openblas_cancel_key;
static pthread_once_t openblas_cancel_key_once = PTHREAD_ONCE_INIT;
static int openblas_cancel_key_ok = 0;
static void openblas_cancel_key_init(void) {
openblas_cancel_key_ok = (pthread_key_create(&openblas_cancel_key, free) == 0);
}
/* Address of the calling thread's generation slot, allocated on first
* use and freed by the key destructor at thread exit. Returns NULL if
* per-thread state cannot be set up; cancellation is then unavailable
* on this thread (all other entry points accept a NULL slot). */
static size_t *openblas_cancel_slot_addr(void) {
size_t *slot;
pthread_once(&openblas_cancel_key_once, openblas_cancel_key_init);
if (!openblas_cancel_key_ok) return NULL;
slot = (size_t *)pthread_getspecific(openblas_cancel_key);
if (slot == NULL) {
slot = (size_t *)calloc(1, sizeof(size_t));
if (slot == NULL) return NULL;
if (pthread_setspecific(openblas_cancel_key, slot) != 0) {
free(slot);
return NULL;
}
}
return slot;
}
#endif
#if defined(__GNUC__) || defined(__clang__)
#define OPENBLAS_CANCEL_LOAD(PTR) __atomic_load_n((PTR), __ATOMIC_RELAXED)
#define OPENBLAS_CANCEL_STORE(PTR, VAL) __atomic_store_n((PTR), (VAL), __ATOMIC_RELEASE)
#define OPENBLAS_CANCEL_CAS(PTR, EXPP, VAL) \
__atomic_compare_exchange_n((PTR), (EXPP), (VAL), 0, __ATOMIC_RELEASE, __ATOMIC_RELAXED)
#else
/* Fallback for compilers without the GNU atomic builtins. The slot is
* only advanced by its owning thread; the cancel request degrades to a
* check-then-store, which can at worst dirty a dead generation. */
#define OPENBLAS_CANCEL_LOAD(PTR) (*(volatile size_t *)(PTR))
#define OPENBLAS_CANCEL_STORE(PTR, VAL) do { WMB; *(volatile size_t *)(PTR) = (VAL); } while (0)
static int openblas_cancel_cas_fallback(size_t *ptr, size_t *expp, size_t val) {
if (*(volatile size_t *)ptr != *expp) return 0;
WMB;
*(volatile size_t *)ptr = val;
return 1;
}
#define OPENBLAS_CANCEL_CAS(PTR, EXPP, VAL) openblas_cancel_cas_fallback((PTR), (EXPP), (VAL))
#endif
/* Address of the calling thread's generation slot (NULL if unavailable). */
size_t *openblas_cancel_token(void) {
return openblas_cancel_slot_addr();
}
/* Request cancellation of the operation that was in flight on the token's
* thread when the caller loaded LOADED_TOKEN from it. May be called from
* any thread. */
void openblas_cancel(size_t *token, size_t loaded_token) {
if (token == NULL) return;
OPENBLAS_CANCEL_CAS(token, &loaded_token, loaded_token | (size_t)1);
}
/* --- internal helpers (not part of the public API) --------------------- */
/* Begin an instrumented operation on the calling thread: advance the slot
* past any stale cancel bit to a fresh even generation and return it.
* Returns 0 if the thread has no slot (paired with a NULL slot from
* openblas_cancel_self, so polling never reports cancellation). */
size_t openblas_cancel_begin(void) {
size_t *slot = openblas_cancel_slot_addr();
size_t gen;
if (slot == NULL) return 0;
gen = (*slot | (size_t)1) + 1;
OPENBLAS_CANCEL_STORE(slot, gen);
return gen;
}
/* The calling thread's slot address (same as openblas_cancel_token, for
* internal use without going through the exported symbol). */
size_t *openblas_cancel_self(void) {
return openblas_cancel_slot_addr();
}
/* Cheap poll usable from compute drivers: nonzero once GEN is no longer
* the live value of SLOT (cancelled, or superseded). SLOT may be NULL. */
int openblas_cancel_poll(size_t *slot, size_t gen) {
if (slot == NULL) return 0;
return OPENBLAS_CANCEL_LOAD(slot) != gen;
}
+2
View File
@@ -78,6 +78,7 @@ char *gotoblas_corename(void);
static char tmp_config_str[256];
int openblas_get_parallel(void);
OPENBLAS_EXPORT
char* CNAME(void) {
char tmpstr[20];
strncpy(tmp_config_str, openblas_config_str, 255-40);
@@ -93,6 +94,7 @@ char tmpstr[20];
}
OPENBLAS_EXPORT
char* openblas_get_corename(void) {
#ifndef DYNAMIC_ARCH
return CHAR_CORENAME;
+1
View File
@@ -35,6 +35,7 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
extern int openblas_get_num_procs(void);
OPENBLAS_EXPORT
int openblas_get_num_procs_(void) {
return openblas_get_num_procs();
}
+1
View File
@@ -35,6 +35,7 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
extern int openblas_get_num_threads(void);
OPENBLAS_EXPORT
int openblas_get_num_threads_(void) {
return openblas_get_num_threads();
}
+3
View File
@@ -41,11 +41,14 @@ static int parallel = 0;
#endif
OPENBLAS_EXPORT
#ifdef NEEDBUNDERSCORE
int CNAME(void) {
return parallel;
}
OPENBLAS_EXPORT
int NAME(void) {
return parallel;
}
+3
View File
@@ -38,6 +38,7 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
extern void openblas_set_num_threads(int num_threads) ;
extern int openblas_get_num_threads(void) ;
OPENBLAS_EXPORT
void openblas_set_num_threads_(int* num_threads){
openblas_set_num_threads(*num_threads);
}
@@ -53,9 +54,11 @@ int openblas_set_num_threads_local(int num_threads){
#else
//Single thread
OPENBLAS_EXPORT
void openblas_set_num_threads(int num_threads) {
}
OPENBLAS_EXPORT
void openblas_set_num_threads_(int* num_threads){
}
+1 -1
View File
@@ -73,7 +73,7 @@ static void openblas_xerbla_default(const char *message, const blasint *info,
static openblas_xerbla_handler openblas_xerbla = openblas_xerbla_default;
static volatile BLASULONG openblas_xerbla_lock = 0;
openblas_xerbla_handler
OPENBLAS_EXPORT openblas_xerbla_handler
openblas_set_xerbla(openblas_xerbla_handler handler) {
openblas_xerbla_handler previous;
+29
View File
@@ -0,0 +1,29 @@
#ifndef EXPORTS_H
#define EXPORTS_H
#pragma once
/***
* For GCC/Clang, always use -fvisibility=hidden. Then mark exported function
* implementations with OPENBLAS_EXPORT. For MSVC, using `__declspec` onces makes
* the default atrribute for any function in the entire shared object hidden
* (observed behaviour, documentation source needed).
* **/
#if defined (_WIN32) || defined (__CYGWIN__)
# if defined (__GNUC__)
/* GCC */
# define OPENBLAS_EXPORT __attribute__ ((dllexport))
# define OPENBLAS_IMPORT __attribute__ ((dllimport))
# else
/* MSVC */
# define OPENBLAS_EXPORT __declspec(dllexport)
# define OPENBLAS_IMPORT __declspec(dllimport)
# endif
#else
/* All other platforms. */
# define OPENBLAS_EXPORT __attribute__ ((visibility ("default")))
# define OPENBLAS_IMPORT
#endif
#endif // EXPORTS_H
+35
View File
@@ -187,6 +187,15 @@ misc_no_underscore_objs="
misc_underscore_objs=""
# Symbols that are exported exactly as spelled, without any SYMBOLPREFIX /
# SYMBOLSUFFIX decoration (like the openblas_* utility functions, these are
# not per-precision entry points). They are therefore deliberately left out
# of the objcopy/objconv rename lists.
misc_no_suffix_objs="
openblas_cancel
openblas_cancel_token
"
# These routines are provided by OpenBLAS.
lapackobjss="
sgesv
@@ -908,6 +917,7 @@ lapackobjs2c="$lapackobjs2c
clatrs3
crscl
ctrsyl3
cgecxx
"
# claqz0
# claqz1
@@ -923,6 +933,7 @@ lapackobjs2d="$lapackobjs2d
dlarmm
dlatrs3
dtrsyl3
dgecxx
"
# dlaqz0
# dlaqz1
@@ -938,6 +949,7 @@ lapackobjs2s="$lapackobjs2s
slarmm
slatrs3
strsyl3
sgecxx
"
lapackobjs2z="$lapackobjs2z
@@ -948,6 +960,7 @@ lapackobjs2z="$lapackobjs2z
zlatrs3
zrscl
ztrsyl3
zgecxx
"
# zlaqz0
# zlaqz1
@@ -1133,6 +1146,8 @@ lapackeobjsc="
LAPACKE_cgedmd_work
LAPACKE_cgedmdq
LAPACKE_cgedmdq_work
LAPACKE_cgecxx
LAPACKE_cgecxx_work
LAPACKE_cgeequ
LAPACKE_cgeequ_work
LAPACKE_cgeequb
@@ -1804,6 +1819,8 @@ lapackeobjsd="
LAPACKE_dgedmd_work
LAPACKE_dgedmdq
LAPACKE_dgedmdq_work
LAPACKE_dgecxx
LAPACKE_dgecxx_work
LAPACKE_dgeequ
LAPACKE_dgeequ_work
LAPACKE_dgeequb
@@ -2429,6 +2446,8 @@ lapackeobjss="
LAPACKE_sgedmd_work
LAPACKE_sgedmdq
LAPACKE_sgedmdq_work
LAPACKE_sgecxx
LAPACKE_sgecxx_work
LAPACKE_sgeequ
LAPACKE_sgeequ_work
LAPACKE_sgeequb
@@ -3050,6 +3069,8 @@ lapackeobjsz="
LAPACKE_zgedmd_work
LAPACKE_zgedmdq
LAPACKE_zgedmdq_work
LAPACKE_zgecxx
LAPACKE_zgecxx_work
LAPACKE_zgeequ
LAPACKE_zgeequ_work
LAPACKE_zgeequb
@@ -4011,6 +4032,10 @@ case "$p1" in
for obj in $no_underscore_objs; do
printf '_%s%s%s\n' "$symbolprefix" "$obj" "$symbolsuffix"
done
for obj in $misc_no_suffix_objs; do
printf '_%s\n' "$obj"
done
;;
aix)
@@ -4119,6 +4144,12 @@ case "$p1" in
done
printf '\t%sopenblas_set_xerbla%s=openblas_set_xerbla @%s\n' \
"$symbolprefix" "$symbolsuffix" "$count"
count=`expr $count + 1`
for obj in $misc_no_suffix_objs; do
printf '\t%s @%s\n' "$obj" "$count"
count=`expr $count + 1`
done
;;
win2khpl)
@@ -4171,6 +4202,10 @@ case "$p1" in
"$symbolprefix" "$uppercase" "$symbolsuffix" "$obj" "$count"
count=`expr $count + 1`
done
for obj in $misc_no_suffix_objs; do
printf '\t%s\n' "$obj"
done
;;
linktest)
+16 -4
View File
@@ -893,7 +893,8 @@ zpotri,
claqp3rk,
clatrs3,
crscl,
ctrsyl3
ctrsyl3,
cgecxx
);
# claqz0
# claqz1
@@ -908,7 +909,8 @@ zpotri,
dlaqp3rk,
dlarmm,
dlatrs3,
dtrsyl3
dtrsyl3,
dgecxx
);
@lapackobjs2s = (@lapackobjs2s,
@@ -918,7 +920,8 @@ zpotri,
slaqp3rk,
slarmm,
slatrs3,
strsyl3
strsyl3,
sgecxx
);
@lapackobjs2z = (@lapackobjs2z,
@@ -928,7 +931,8 @@ zpotri,
zlaqp3rk,
zlatrs3,
zrscl,
ztrsyl3
ztrsyl3,
zgecxx
);
# zlaqz0
# zlaqz1
@@ -1110,6 +1114,8 @@ zpotri,
LAPACKE_cgedmd_work,
LAPACKE_cgedmdq,
LAPACKE_cgedmdq_work,
LAPACKE_cgecxx,
LAPACKE_cgecxx_work,
LAPACKE_cgeequ,
LAPACKE_cgeequ_work,
LAPACKE_cgeequb,
@@ -1780,6 +1786,8 @@ zpotri,
LAPACKE_dgedmd_work,
LAPACKE_dgedmdq,
LAPACKE_dgedmdq_work,
LAPACKE_dgecxx,
LAPACKE_dgecxx_work,
LAPACKE_dgeequ,
LAPACKE_dgeequ_work,
LAPACKE_dgeequb,
@@ -2405,6 +2413,8 @@ zpotri,
LAPACKE_sgedmd_work,
LAPACKE_sgedmdq,
LAPACKE_sgedmdq_work,
LAPACKE_sgecxx,
LAPACKE_sgecxx_work,
LAPACKE_sgeequ,
LAPACKE_sgeequ_work,
LAPACKE_sgeequb,
@@ -3026,6 +3036,8 @@ zpotri,
LAPACKE_zgedmd_work,
LAPACKE_zgedmdq,
LAPACKE_zgedmdq_work,
LAPACKE_zgecxx,
LAPACKE_zgecxx_work,
LAPACKE_zgeequ,
LAPACKE_zgeequ_work,
LAPACKE_zgeequb,
+1
View File
@@ -42,6 +42,7 @@
#include "functable.h"
#endif
OPENBLAS_EXPORT
#ifndef CBLAS
FLOATRET NAME(blasint *N, FLOAT *x, blasint *INCX){
+1
View File
@@ -36,6 +36,7 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "functable.h"
#endif
OPENBLAS_EXPORT
#ifndef CBLAS
void NAME(blasint *N, FLOAT *ALPHA, FLOAT *x, blasint *INCX, FLOAT *BETA, FLOAT *y, blasint *INCY)
+2
View File
@@ -46,6 +46,8 @@
#else
#define MULTI_THREAD_MINIMAL 10000
#endif
OPENBLAS_EXPORT
#ifndef CBLAS
void NAME(blasint *N, FLOAT *ALPHA, FLOAT *x, blasint *INCX, FLOAT *y, blasint *INCY){
+1
View File
@@ -4,6 +4,7 @@
#include "functable.h"
#endif
OPENBLAS_EXPORT
#ifndef CBLAS
float NAME(blasint *N, bfloat16 *x, blasint *INCX, bfloat16 *y, blasint *INCY){
BLASLONG n = *N;
+1
View File
@@ -11,6 +11,7 @@
#else
#endif
OPENBLAS_EXPORT
#ifndef CBLAS
void NAME(blasint *N, bfloat16 *in, blasint *INC_IN, FLOAT_TYPE *out, blasint *INC_OUT){
BLASLONG n = *N;
+1
View File
@@ -42,6 +42,7 @@
#include "functable.h"
#endif
OPENBLAS_EXPORT
#ifndef CBLAS
void NAME(blasint *N, FLOAT *x, blasint *INCX, FLOAT *y, blasint *INCY){
+1
View File
@@ -42,6 +42,7 @@
#include "functable.h"
#endif
OPENBLAS_EXPORT
#ifndef CBLAS
FLOATRET NAME(blasint *N, FLOAT *x, blasint *INCX, FLOAT *y, blasint *INCY){
+1
View File
@@ -42,6 +42,7 @@
#include "functable.h"
#endif
OPENBLAS_EXPORT
#ifndef CBLAS
double NAME(blasint *N, float *x, blasint *INCX, float *y, blasint *INCY){
+6
View File
@@ -74,6 +74,7 @@ static int (*gbmv_thread[])(BLASLONG, BLASLONG, BLASLONG, BLASLONG, FLOAT,
};
#endif
OPENBLAS_EXPORT
#ifndef CBLAS
void NAME(char *TRANS, blasint *M, blasint *N,
@@ -225,6 +226,11 @@ void CNAME(enum CBLAS_ORDER order,
if (incy < 0) y -= (leny-1)*incy;
buffer = (FLOAT *)blas_memory_alloc(1);
if (!buffer) {
info = -999;
BLASFUNC(xerbla)(ERROR_NAME, &info, sizeof(ERROR_NAME));
return;
}
#ifdef SMP
if (m * n < 250000 || kl+ku < 15 )
+2
View File
@@ -48,6 +48,8 @@
#define ERROR_NAME "SGEADD "
#endif
OPENBLAS_EXPORT
#ifndef CBLAS
void NAME(blasint *M, blasint *N, FLOAT *ALPHA, FLOAT *a, blasint *LDA,
+67 -9
View File
@@ -252,6 +252,8 @@ static inline int get_gemm_optimal_nthreads(double MNK) {
}
#endif
OPENBLAS_EXPORT
#ifndef CBLAS
void NAME(char *TRANSA, char *TRANSB,
@@ -266,7 +268,6 @@ void NAME(char *TRANSA, char *TRANSB,
int transa, transb, nrowa, nrowb;
blasint info;
int order = -1;
char transA, transB;
IFLOAT *buffer;
@@ -315,7 +316,7 @@ void NAME(char *TRANSA, char *TRANSB,
args.alpha = (void *)alpha;
args.beta = (void *)beta;
transA = *TRANSA;
transB = *TRANSB;
@@ -344,7 +345,6 @@ void NAME(char *TRANSA, char *TRANSB,
if (transB == 'R') transb = 2;
if (transB == 'C') transb = 3;
#endif
nrowa = args.m;
if (transa & 1) nrowa = args.k;
nrowb = args.k;
@@ -560,22 +560,80 @@ if (strcmp(gotoblas_corename(), "armv9sme") == 0
|| strcmp(gotoblas_corename(), "vortexm4") == 0
#endif
)
// if (support_sme1())
#endif
if (order == CblasRowMajor && k==lda && n==ldb && n==ldc && beta == 0 && alpha == 1.0 && TransA == CblasNoTrans && TransB == CblasNoTrans && SGEMM_DIRECT_PERFORMANT(m,n,k)) {
SGEMM_DIRECT(m, n, k, a, lda, b, ldb, c, ldc);
return;
}
else
if (order == CblasRowMajor && k==lda && n==ldb && n==ldc && TransA == CblasNoTrans && TransB == CblasNoTrans && SGEMM_DIRECT_PERFORMANT(m,n,k)) {
else if (order == CblasRowMajor && k==lda && n==ldb && n==ldc && TransA == CblasNoTrans && TransB == CblasNoTrans && SGEMM_DIRECT_PERFORMANT(m,n,k)) {
SGEMM_DIRECT_ALPHA_BETA(m, n, k, alpha, a, lda, b, ldb, beta, c, ldc);
return;
}
#endif
#endif
#endif //defined arm64
#endif //defined complex
#endif //defined CBLAS
#if !defined(BFLOAT16) && !defined(HFLOAT16)
#if defined(ARCH_ARM64) && (defined(USE_SGEMM_KERNEL_DIRECT)||defined(DYNAMIC_ARCH))
#if defined(DYNAMIC_ARCH)
if (strcmp(gotoblas_corename(), "armv9sme") == 0
#if defined(__clang__)
|| strcmp(gotoblas_corename(), "vortexm4") == 0
#endif
)
#endif //defined dynarch
{
char* TA,*TB;
if (transa & 1)
TA = "T";
else
TA= "N";
if (transb & 1)
TB = "T";
else
TB= "N";
#ifndef COMPLEX
if (transa == 3)
TA= "T";
if (transb == 3)
TB= "T";
FLOAT* al=(FLOAT*)args.alpha;
FLOAT* be=(FLOAT*)args.beta;
#ifndef DOUBLE
SME_SGEMM_KERNEL(TA,TB, args.m, args.n, args.k, al, args.a, args.lda, args.b, args.ldb, be, args.c, args.ldc);
#else
SME_DGEMM_KERNEL(TA,TB, args.m, args.n, args.k, al, args.a, args.lda, args.b, args.ldb, be, args.c, args.ldc);
#endif
#else
if (transa == 2)
TA= "R";
if (transb == 2)
TB= "R";
if (transa == 3)
TA= "C";
if (transb == 3)
TB= "C";
FLOAT* al=(FLOAT*)args.alpha;
FLOAT* be=(FLOAT*)args.beta;
#ifndef DOUBLE
float _Complex c_al={al[0],al[1]};
float _Complex c_be={be[0],be[1]};
SME_CGEMM_KERNEL(TA,TB, args.m, args.n, args.k, al[0],al[1], args.a, args.lda, args.b, args.ldb, be[0],be[1], args.c, args.ldc);
#else
double _Complex c_al={al[0],al[1]};
double _Complex c_be={be[0],be[1]};
SME_ZGEMM_KERNEL(TA,TB, args.m, args.n, args.k, al[0],al[1], args.a, args.lda, args.b, args.ldb, be[0],be[1], args.c, args.ldc);
#endif
#endif
return;
}
#endif //defined arm64
#endif //defined b/hfloat16
#if defined(__linux__) && defined(__x86_64__) && defined(BFLOAT16)
#if defined(DYNAMIC_ARCH)
@@ -677,6 +735,7 @@ else
#if USE_SMALL_MATRIX_OPT
#if !defined(COMPLEX)
if(GEMM_SMALL_MATRIX_PERMIT(transa, transb, args.m, args.n, args.k, *(FLOAT *)(args.alpha), *(FLOAT *)(args.beta))){
if(*(FLOAT *)(args.beta) == 0.0){
(GEMM_SMALL_KERNEL_B0((transb << 2) | transa))(args.m, args.n, args.k, args.a, args.lda, *(FLOAT *)(args.alpha), args.b, args.ldb, args.c, args.ldc);
}else{
@@ -697,7 +756,6 @@ else
#endif
buffer = (XFLOAT *)blas_memory_alloc(0);
//For LOONGARCH64, applying an offset to the buffer is essential
//for minimizing cache conflicts and optimizing performance.
#if defined(ARCH_LOONGARCH64) && !defined(NO_AFFINITY)
+6 -4
View File
@@ -114,6 +114,8 @@ static size_t zgemm_small_kernel_b0[] = {
#endif
#endif
OPENBLAS_EXPORT
#ifndef CBLAS
void NAME(char *transa_array, char *transb_array,
blasint * m_array, blasint * n_array, blasint * k_array,
@@ -351,18 +353,18 @@ void CNAME(enum CBLAS_ORDER order, enum CBLAS_TRANSPOSE * transa_array, enum CB
#if !defined(COMPLEX)
if(*(FLOAT *)(group_beta) == 0.0){
group_mode=mode | BLAS_SMALL_B0_OPT;
group_small_matrix_opt_routine=(void *)(gemm_small_kernel_b0[(group_transb<<2)|group_transa]);
group_small_matrix_opt_routine=SMALL_KERNEL_ADDR(gemm_small_kernel_b0, ((group_transb<<2)|group_transa));
}else{
group_mode=mode | BLAS_SMALL_OPT;
group_small_matrix_opt_routine=(void *)(gemm_small_kernel[(group_transb<<2)|group_transa]);
group_small_matrix_opt_routine=SMALL_KERNEL_ADDR(gemm_small_kernel, ((group_transb<<2)|group_transa));
}
#else
if(((FLOAT *)(group_beta))[0] == 0.0 && ((FLOAT *)(group_beta))[1] == 0.0){
group_mode=mode | BLAS_SMALL_B0_OPT;
group_small_matrix_opt_routine=(void *)(zgemm_small_kernel_b0[(group_transb<<2)|group_transa]);
group_small_matrix_opt_routine=SMALL_KERNEL_ADDR(zgemm_small_kernel_b0, ((group_transb<<2)|group_transa));
}else{
group_mode=mode | BLAS_SMALL_OPT;
group_small_matrix_opt_routine=(void *)(zgemm_small_kernel[(group_transb<<2)|group_transa]);
group_small_matrix_opt_routine=SMALL_KERNEL_ADDR(zgemm_small_kernel, ((group_transb<<2)|group_transa));
}
#endif
+7 -2
View File
@@ -114,6 +114,8 @@ static size_t zgemm_small_kernel_b0[] = {
#endif
#endif
OPENBLAS_EXPORT
#ifndef CBLAS
void NAME(char *transa, char *transb,
blasint * M, blasint * N, blasint * K,
@@ -227,13 +229,16 @@ void CNAME(enum CBLAS_ORDER order, enum CBLAS_TRANSPOSE transa, enum CBLAS_TRANS
group_transb = -1;
info = 0;
#if defined(CBLAS)
#if defined(CBLAS)
if (order == CblasColMajor) {
group_m = m;
group_n = n;
group_k = k;
group_lda = lda;
group_ldb = ldb;
group_ldc = ldc;
if (transa == CblasNoTrans) group_transa = 0;
if (transa == CblasTrans) group_transa = 1;
#ifndef COMPLEX
+2
View File
@@ -84,6 +84,8 @@
#define GEMM_MULTITHREAD_THRESHOLD 4
#endif
OPENBLAS_EXPORT
#ifndef CBLAS
void NAME(char *UPLO, char *TRANSA, char *TRANSB,
+2
View File
@@ -131,6 +131,8 @@ static inline int get_gemv_optimal_nthreads(BLASLONG MN) {
}
#endif
OPENBLAS_EXPORT
#ifndef CBLAS
void NAME(char *TRANS, blasint *M, blasint *N,
+1
View File
@@ -66,6 +66,7 @@
#define GER_THREAD sger_thread
#endif
OPENBLAS_EXPORT
#ifndef CBLAS
+2
View File
@@ -54,6 +54,8 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
/* Enables the New IMATCOPY code with inplace operation if lda == ldb */
#define NEW_IMATCOPY
OPENBLAS_EXPORT
#ifndef CBLAS
void NAME( char* ORDER, char* TRANS, blasint *rows, blasint *cols, FLOAT *alpha, FLOAT *a, blasint *lda, blasint *ldb)
{
+2
View File
@@ -118,6 +118,8 @@
#endif
OPENBLAS_EXPORT
#ifndef CBLAS
blasint NAME(blasint *N, FLOAT *x, blasint *INCX){
+1
View File
@@ -60,6 +60,7 @@
#endif
#endif
OPENBLAS_EXPORT
int NAME(blasint *N, blasint *NRHS, FLOAT *a, blasint *ldA, blasint *ipiv,
FLOAT *b, blasint *ldB, blasint *Info){
+1
View File
@@ -50,6 +50,7 @@
#define ERROR_NAME "SGETF2"
#endif
OPENBLAS_EXPORT
int NAME(blasint *M, blasint *N, FLOAT *a, blasint *ldA, blasint *ipiv, blasint *Info){
blas_arg_t args;
+1
View File
@@ -50,6 +50,7 @@
#define ERROR_NAME "SGETRF"
#endif
OPENBLAS_EXPORT
int NAME(blasint *M, blasint *N, FLOAT *a, blasint *ldA, blasint *ipiv, blasint *Info){
blas_arg_t args;
+1
View File
@@ -60,6 +60,7 @@ static blasint (*getrs_parallel[])(blas_arg_t *, BLASLONG *, BLASLONG *, FLOAT *
};
#endif
OPENBLAS_EXPORT
int NAME(char *TRANS, blasint *N, blasint *NRHS, FLOAT *a, blasint *ldA,
blasint *ipiv, FLOAT *b, blasint *ldB, blasint *Info){
+2 -1
View File
@@ -40,6 +40,7 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#endif
/* ===================================================================== */
OPENBLAS_EXPORT
int NAME(blasint *k, blasint *n, blasint *n1, FLOAT *d,
FLOAT *q, blasint *ldq, FLOAT *rho, FLOAT *dlamda,
FLOAT *q2, blasint *indx, blasint *ctot, FLOAT *w,
@@ -73,7 +74,7 @@ int NAME(blasint *k, blasint *n, blasint *n1, FLOAT *d,
#ifdef SMP
int nthreads = 1;
if (n >= 64) nthreads = num_cpu_avail(4);
if (nval >= 64) nthreads = num_cpu_avail(4);
if (nthreads == 1) {
#endif
+1
View File
@@ -52,6 +52,7 @@ static int (*laswp[])(BLASLONG, BLASLONG, BLASLONG, FLOAT, FLOAT *, BLASLONG, FL
#endif
};
OPENBLAS_EXPORT
int NAME(blasint *N, FLOAT *a, blasint *LDA, blasint *K1, blasint *K2, blasint *ipiv, blasint *INCX){
blasint n = *N;
+1
View File
@@ -60,6 +60,7 @@ static blasint (*lauu2[])(blas_arg_t *, BLASLONG *, BLASLONG *, FLOAT *, FLOAT *
#endif
};
OPENBLAS_EXPORT
int NAME(char *UPLO, blasint *N, FLOAT *a, blasint *ldA, blasint *Info){
blas_arg_t args;
+1
View File
@@ -60,6 +60,7 @@ static blasint (*lauum_parallel[])(blas_arg_t *, BLASLONG *, BLASLONG *, FLOAT *
};
#endif
OPENBLAS_EXPORT
int NAME(char *UPLO, blasint *N, FLOAT *a, blasint *ldA, blasint *Info){
blas_arg_t args;
+1
View File
@@ -60,6 +60,7 @@ static blasint (*potf2[])(blas_arg_t *, BLASLONG *, BLASLONG *, FLOAT *, FLOAT *
#endif
};
OPENBLAS_EXPORT
int NAME(char *UPLO, blasint *N, FLOAT *a, blasint *ldA, blasint *Info){
blas_arg_t args;

Some files were not shown because too many files have changed in this diff Show More