sigma icon indicating copy to clipboard operation
sigma copied to clipboard

Support for more general datatypes

Open poulson opened this issue 9 years ago • 2 comments

It appears that sigma always assumes double-precision real data. Are there plans to support, for example, complex data? (Support for double-double and/or quad-precision would also be very useful.)

poulson avatar Jul 16 '15 16:07 poulson

Hi Jack, thanks for taking a look! While it would be very useful to include more general data types, C++ will always beat Fortran on this point via template meta-programming. In order to implement this for sigma, one would have to systematically replace all of the real variable declarations with SCALAR, then generate the real and complex versions of the library code by replacing all instances of SCALAR in the template source code. This is the approach taken in PSBLAS.

I'm more inclined to prioritize developing distributed matrix data structures using the co-array features of Fortran 2008. I haven't seen many libraries take advantage of this yet.

danshapero avatar Jul 16 '15 21:07 danshapero

Does Fortran 2003 not support templating? http://fortranwiki.org/fortran/show/Generic+programming

I think that support for more general datatypes would be very beneficial for adoption, but I'm biased as I always try to support complex data.

poulson avatar Jul 17 '15 02:07 poulson