icl-utk-edu / blaspp

BLAS++ is a C++ wrapper around CPU and GPU BLAS (basic linear algebra subroutines), developed as part of the SLATE project.
https://icl.utk.edu/slate/
BSD 3-Clause "New" or "Revised" License
66 stars 23 forks source link

Use typedef instead of #define. Use int64_t to be unambiguous. #56

Closed mgates3 closed 1 year ago

mgates3 commented 1 year ago

Fixes blas_int(value) cast when blas_int is long long. Originally:

src/blas_internal.hh: In function 'long long int blas::to_blas_int_(int64_t, const char*)':
./include/blas/config.h:13:39: error: expected primary-expression before 'long'
   13 |         #define blas_int              long long  /* or int64_t */

The cblas wrappers also had an error respecting int64:

test/cblas_wrappers.cc: In function 'void cblas_rot(int, std::complex<float>*, int, std::complex<float>*, int, float, std::complex<float>)':
test/cblas_wrappers.cc:52:9: error: cannot convert 'int*' to 'const blas_int*' {aka 'const long int*'}
   52 |         &n,

Regarding #define use, see https://stackoverflow.com/a/638759/1655607

mgates3 commented 1 year ago

CUDA failures are from mis-configured CI setup. These previously passed.