#333 Open

Bitbucket cannot automatically merge this request.

The commits that make up this pull request have been removed.

Bitbucket cannot automatically merge this request due to conflicts.

Review the conflicts on the Overview tab. You can then either decline the request or merge it manually on your local system using the following commands:

hg update default
hg pull -r blas_header https://bitbucket.org/ryan_richard/eigen
hg merge blas_header
hg commit -m 'Merged in ryan_richard/eigen/blas_header (pull request #333)'
  1. Ryan Richard

Before CBLAS was a thing many projects have written their own versions of Eigen/src/misc/blas.h. Let's call the other project's version other/blas.h. As Eigen stands now, if both Eigen/src/misc/blas.h and other/blas.h are included in the same source file the compilation will fail as each BLAS function will be declared with two different signatures (and since they have C-linkage they can't be overloaded). The problem (at least for me) is that the signatures in Eigen/src/misc/blas.h do not adhere to the standardized BLAS APIs. This PR fixes that.

The particular fixes:

  • const-correctness is now obeyed for all (see caveat below) functions
  • Many functions, like ?axpy were listed as returning int when their BLAS API does not return. This has been corrected.
  • Functions taking complex arguments now take void * instead of float * and/or double * in accordance with the BLAS API.

General notes:

  • The file contains several functions that are not part of the usual BLAS API (e.g. ?max). I did my best to infer what the signature should be from OpenBLAS (which appears to be their origin) and similar functions that are part of BLAS (in the case of ?max the corresponding function is i?amax)
  • There still remains several functions at the top of the file (e.g. cdotuw) for which I am unsure of the signature because I can not seem to find the function in OpenBLAS or the standard BLAS API.
  • For clarity I assigned the short and double complex void types typedefs (BLASC and BLASZ respectively).
  • I took the liberty of defining a typedef for both the real and complex quadruple precision types (BLASQ and BLASX respectively).

Advice on what to do about the functions that are not part of the BLAS API would be greatly appreciated.

Comments (0)