Data Types#

NVPL BLAS types are defined in include/nvpl_blas_types.h header file.

Complex Data Types#

C / C++#

For portability, NVPL BLAS defines its own single precision and double precision complex data types: nvpl_scomplex_t and nvpl_dcomplex_t. These types are structures with two fields (real and imag) of the corresponding floating-point data type (float and double respectively).

For better interoperability with user’s code, it is allowed to redefine the types before including nvpl_blas_types.h, as long as they are ABI compatible with the above definition.

For instance:

  • For C with standard C99 and newer one can do:

    #include <complex.h>
    #define nvpl_scomplex_t float complex
    #define nvpl_dcomplex_t dobule complex
    #include "nvpl_blas_types.h"
    
  • For C++:

    #include <complex>
    #define nvpl_scomplex_t std::complex<float>
    #define nvpl_dcomplex_t std::complex<double>
    #include "nvpl_blas_types.h"
    

Integer Data Types#

C / C++#

NVPL BLAS defines the following integer data types:

  • nvpl_int32_t: 32-bit integer, an alias to int32_t

  • nvpl_int64_t: 64-bit integer, an alias to int64_t

  • nvpl_int_t:

    • an alias to nvpl_int64_t, if NVPL_ILP64 macro is defined

    • an alias to nvpl_int32_t, otherwise.

Most BLAS C and Fortran-style APIs use nvpl_int_t that allows using NVPL BLAS for both LP64 (where integers are 32-bit), and ILP64 (integers are 64-bit) modes based on presence or absence of NVPL_ILP64 macro.

Most Service APIs take integer parameters of fixed length, for instance nvpl_int32_t.

Please check the reference manual to see the exact API signature.

Fortran#

Most BLAS APIs take integer parameters of type INTEGER, which has unspecified length, and which can be controlled with the compiler flags (like -fdefault-integer-8 for GNU Fortran).

Most Service APIs take integer parameters of fixed length, for instance INTEGER*4.

Please check the reference manual to see the exact API signature.