Commit Graph
52 Commits
Author SHA1 Message Date
Simon Maertens d270dac898 Apply const where possible. Use CBLAS_XERBLA_API_PREFIX instead of plain "cblas_" 2026-07-29 12:52:44 +02:00
Simon Maertens 745782750e Report the cblas routine in xerbla with the _64 suffix in extended API builds 2026-07-29 12:38:57 +02:00
Simon MaertensandClaude Opus 5 bfadf61f2f CBLAS: add a shared helper header for XERBLA name and INFO handling
cblas_xerbla_internal.h collects the routine-name construction and the
row-major INFO remapping that the library and the test harness each
open-code today, so the two copies can no longer drift apart.

Relative to those copies the helper also trims the blank padding Fortran
supplies, drops the _64 suffix that BUILD_INDEX64_EXT_API rewrites into
the XERBLA name literals, matches operation names exactly rather than by
substring, and derives its buffer size from a named maximum so that long
names are clamped instead of silently truncated.

It has no user yet; the xerbla sources are switched over next.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-07-28 21:35:13 +02:00
Simon MaertensandClaude Opus 5 2ba64b0003 CBLAS: provide F77_INT and FCHAR to the testing headers
c_xerbla.c needs the Fortran integer and character types to declare
F77_xerbla(), but the testing sources deliberately do not include
cblas_f77.h: that header maps every F77_* name to the real BLAS symbol
while cblas_test.h maps them to the Fortran test wrappers, and 141 of
those names collide.

Copy the two fallbacks into cblas_test.h instead, alongside the
BLAS_FORTRAN_STRLEN_END and FORTRAN_STRLEN definitions it already
duplicates for the same reason.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-07-28 21:35:13 +02:00
Simon MaertensandClaude Opus 5 58cff20b27 CBLAS: add CBLAS_WEAK_SYMBOL and use it for the xerbla declarations
Replace the repeated

    void
    #ifdef HAS_ATTRIBUTE_WEAK_SUPPORT
    __attribute__((weak))
    #endif

preamble on the cblas_xerbla(), cblas_xerbla_64() and F77_xerbla_base()
declarations with a single CBLAS_WEAK_SYMBOL macro.

Define it in cblas.h ahead of the cblas_64.h include: cblas_64.h declares
cblas_xerbla_64() with the macro, and its own include of cblas.h is a
no-op while cblas.h is still inside its own include guard.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-07-28 21:35:08 +02:00
Simon Maertens 549f4a6299 Fix mixed enum and integer sign change warnings by using explicitly typed invalid values in CBLAS tests. 2026-07-22 16:47:26 +01:00
Simon Maertens b4ba901b29 Added API_SUFFIX to CBLAS tests 2026-05-02 18:05:38 +02:00
Simon Maertens 7872e2d6e6 Fixed CBLAS symbol name: cblas_zaxbpy_64 -> cblas_zaxpby_64 2026-05-02 18:05:38 +02:00
Simon Maertens 5a687f4922 Remove the explicit __declspec(dllexport) since that is handles already by CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS 2026-05-02 18:05:02 +02:00
Simon Maertens cd40e85a40 Remove unnecessary test_inlude directory in the build folder 2026-05-02 18:05:01 +02:00
Simon Maertens 3afa8276ef Fix export & import of global CBLAS symbols for shared Windows builds 2026-05-02 18:05:01 +02:00
langou a4641a28a5 Merge pull request #1169 from sh-zheng/skew-symmetric-presubmit 2026-03-24 20:53:50 -06:00
Simon Maertens eeed198193 Only enable Fortran for CBLAS if Fortran compiler is found 2026-01-13 14:34:05 +01:00
Simon Maertens daed92441d Replace FORTRAN_STRLEN type in the cblas_f77.h and handle the header like the lapack.h header. 2026-01-13 12:11:05 +01:00
sh-zheng fc2a4fd659 Add skew-symmetric cblas subroutines and tests 2025-11-27 01:15:36 +08:00
Martin Köhler 4b9693f8f1 Add CBLAS for AXPBY 2024-08-26 16:27:18 +02:00
Martin Köhler c571921241 Update CBLAS headers 2024-08-26 16:27:18 +02:00
Martin Köhler 81b3767a5a Change xGEMMT to xGEMMTR in CBLAS/ 2024-06-24 14:04:03 +02:00
Martin Köhler 630fb5b85c Tests for cblas_cgemmt 2024-06-24 14:04:02 +02:00
Martin Köhler 5daea4888b CBLAS routines for xGEMMT added 2024-06-24 14:04:02 +02:00
Simon Maertens f47a8708b9 Added missing FORTRAN_STRLEN arguments in CBLAS testting framework 2024-06-19 18:58:50 +01:00
Simon Maertens a926c938eb Fixed wrong F77 C declarations for complex BLAS routines. Some complex arrays were declared as float* or double* instead of void*. 2024-06-19 18:56:09 +01:00
Simon Maertens 6cd9d27cd5 Made the type of hidden Fortran strlen arguments configurable for the NAG Fortran compiler and old GFortran 2024-06-19 15:31:45 +02:00
Maria Kraynyuk ce3f662e12 Add Index-64 API as extended API with _64 suffix for CBLAS 2023-06-22 16:15:41 -07:00
langou 88aa204975 Revert "Add Index-64 API as extended API with _64 suffix for CBLAS" 2023-06-21 02:33:49 -06:00
Maria Kraynyuk 4c2236a536 Add Index-64 API as extended API with _64 suffix for CBLAS 2023-06-06 10:56:33 -07:00
Simon Maertens 05043da7a6 Formatting. 2022-11-19 23:56:42 +01:00
Simon Maertens e7afed35fb Fixed usage of HAS_ATTRIBUTE_WEAK_SUPPORT. Formatted cblas_f77.h 2022-11-19 21:25:15 +01:00
Angelika Schwarz a8028e9ddc Fix undefined reference to cblas_[sd]cabs1
cblas.h defines

   double cblas_dcabs1(const void  *z);
   float  cblas_scabs1(const void  *c);

but does not provide an implementation. This commit adds
the missing implementation in the common CBLAS style and
eliminates the linker error when calling the above function.
2022-10-02 16:54:32 +02:00
Angelika Schwarz 02b71fcbc6 Add interfaces cblas_[c,z]rotg, cblas_[cs,zd]rot
Closes #473
2022-09-27 19:46:08 +02:00
Simon Maertens 86d37075ed Fixed CBLAS integer formats for 64bit build. 2022-08-08 16:41:04 +02:00
Larson, Eric d04553067e ILP support
long's in windows are 4 bytes (MSVS, intel compilers). Use int64_t and int32_t
to ensure 8 byte integers for ILP interface.

support 8 byte integer flag for intel ifort compiler
2021-09-27 10:22:49 -07:00
Sébastien Villemot e6411157cb Fix CBLAS xerbla following hidden strlen argument changes
Commits 2d9fbdeecc and
628a2095c2 changed the function prototypes in the
cblas_f77.h.

However, the F77_xerbla case was not treated in the same way as the others. In
particular, the consequence is now that the xerbla function provided by the
CBLAS/src/xerbla.c file is never called at runtime (because it is identified as
“F77_xerbla” in the symbol table, instead of simply “xerbla”, since F77_xerbla
is *not* a macro).

This patch restores the symmetry between xerbla and the other functions.
2021-09-01 14:43:21 +02:00
weslley.spereira 29c946d743 First attempt in getting (back) CBLAS_INDEX and CBLAS_INT integer types 2021-06-23 18:50:47 -03:00
weslley.spereira 666d1b866e Applies @mdarnold1's suggestions 2021-04-22 10:49:07 -03:00
langou acbf97050f Merge pull request #499 from epsilon-0/master
fix redundant install of cblas_test.h
2021-04-06 09:03:48 -06:00
weslley.spereira 628a2095c2 Fix bug thanks to @langou. Defines LAPACK_FORTRAN_STRLEN_END by default, following @mgates3 comments in @512 and LAPACK++ convention 2021-03-18 18:19:22 -03:00
weslley.spereira d3e64d6445 Change unsigned to size_t, thanks to @jabl 2021-03-18 16:10:09 -03:00
weslley.spereira 2d9fbdeecc Add hidden strlen argument in CBLAS and LAPACKE 2021-03-18 16:10:34 -03:00
Aisha Tammy 0095825b56 fix redundant install of cblas_test.h
Signed-off-by: Aisha Tammy <gentoo@aisha.cc>
2021-02-26 22:31:42 +00:00
Aisha Tammy 41779680d1 enable building the cblas64 library
changes all function signatures to use CBLAS_INDEX
also fixes internal variables to be CBLAS_INDEX
all tests are passing
2020-10-27 18:16:18 +00:00
cmoha 1103a96bdb fix #3 2016-12-06 17:52:59 +02:00
cmoha c5cebb4c3d bug: fixed compilation error 2016-12-06 08:06:34 +02:00
Julie 3f23bd5d53 merging: Various cleanups to makefiles #84
Contribution by @turboencabulator
Closing #84
2016-11-25 17:03:13 -08:00
cmoha 748287abe5 bug: fixed compilation error 2016-11-15 13:53:13 +02:00
Hans Johnson b1e0d47edc STYLE: Convert CMake-language commands to lower case
Ancient CMake versions required upper-case commands.  Later command
names became case-insensitive.  Now the preferred style is lower-case.

Run the following shell code:
NOTE: MUST USE GNU compliant version of sed

cmake --help-command-list \
| grep -v "cmake version" \
| while read c; do
    echo 's/\b'"$(echo $c | tr '[:lower:]' '[:upper:]')"'\(\s*\)(/'"$c"'\1(/g'
  done >convert.sed \
&& git ls-files -z -- bootstrap '*.cmake' '*.cmake.in' '*CMakeLists.txt' \
   | xargs -0 gsed -i -f convert.sed \
&& rm convert.sed
2016-07-10 14:37:46 -05:00
Hans Johnson 78d32fd2a6 STYLE: Remove trailing whitespace in C files
This is mostly a long term maintenance improvement.

Many coding styles require elimination of trailing whitespace, and
many editors and source code management configurations automatically
gobble up whitespace. When these tools gobble up whitespace, it
complicates reviewing the meaningful code changes.

By removing whitespace on one patch, it makes future
code reviews much easier.

=SCRIPT====================================================================

if which tempfile &>/dev/null; then
  TEMPMAKER=tempfile
elif which mktemp &>/dev/null; then
  TEMPMAKER=mktemp
else
  echo "Cannot find tempfile program." 2>&1
  exit 1
fi

MYTEMP=$($TEMPMAKER)
trap 'rm -f $MYTEMP' SIGINT SIGTERM

stripit() {
  echo "stripping $1"
  sed 's/[ \t]*$//' "$1" > $MYTEMP
  cp $MYTEMP "$1"
}

if [ $# -gt 0 ]; then
  while [ "$1" != "" ]; do
    stripit $1
    shift
  done
else
  while read -t 2; do
    stripit $REPLY
  done
fi

rm $MYTEMP
=================================================
2016-07-09 10:53:07 -05:00
Hans Johnson 2cf2448324 COMP: Improve introspection and header configuration
Use CMake capabilities to test if the specified fortran
and C compilers are compatible.  Fail early if they are
determined to be incompatible.

Use CMake capabilities to generate platform specific
header files, If CMake FortranCInterface_HEADER function
fails to identify FortranCInterface_GLOBAL_FOUND or
FortranCInterface_MODULE_FOUND, then fall back to the
statically generated file that is used by Makefiles.
2016-07-05 16:08:43 -05:00
Hans Johnson 9dd0968b21 STYLE: Change source template files to .in extension
The cblas_mangling_with_flags.h and lapacke_mangling_with_flags.h
are template files that are not used directly.  They need to be
configured (i.e. copied) to lapacke_mangling.h and cblas_mangling.h
header files that are used.  These renamings make the intent of
these files more clearly reported.

The file LAPACKE/include/lapacke_mangling.h should not be stored in the
repository because it should be generated (copied from above) at build
time.
2016-07-04 17:35:05 -05:00
julie 50d40d7852 Updating version number 2015-11-15 20:33:40 +00:00