Data Types#
NVPL LAPACK types are defined in include/nvpl_lapack_types.h header file.
Complex Data Types#
C / C++#
For portability, NVPL LAPACK defines its own single 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_lapack_types.h, as long as they are ABI
compatible with the above definition and NVPL_LAPACK_COMPLEX_CUSTOM is
defined.
For instance:
For C with standard C99 and newer one can do:
#include <complex.h> #define NVPL_LAPACK_COMPLEX_CUSTOM #define nvpl_scomplex_t float complex #define nvpl_dcomplex_t double complex #include "nvpl_lapack_types.h"
For C++:
#include <complex> #define NVPL_LAPACK_COMPLEX_CUSTOM #define nvpl_scomplex_t std::complex<float> #define nvpl_dcomplex_t std::complex<double> #include "nvpl_lapack_types.h"
Integer Data Types#
See also
C / C++#
NVPL LAPACK defines the following 3 integer data types:
nvpl_int32_t: 32-bit integer, an alias toint32_t.nvpl_int64_t: 64-bit integer, an alias toint64_t.nvpl_int_t: an alias tonvpl_int64_t, ifNVPL_ILP64macro is defined, andnvpl_int32_t, otherwise.
The NVPL LAPACK C declarations in nvpl_lapack.h use integer type nvpl_int_t
such that an application can define macro NVPL_ILP64 and link with the
ILP64 interface library, or link with the LP64 interface if NVPL_ILP64 is not defined.
Service Types#
nvpl_lapack_math_mode_t#
C / C++
NVPL LAPACK defines enum nvpl_lapack_math_mode_t with the following values:
NVPL_LAPACK_MATH_MODE_DEFAULT, default math mode for computations inside NVPL LAPACKNVPL_LAPACK_MATH_MODE_PEDANTIC, enables extra care for handling numerically pathological casesNVPL_LAPACK_MATH_MODE_USE_GLOBAL, special value which can be used to reset thread-local math mode settings.
Note: it is recommended to use the default math mode unless numerical artifacts or undesirable behavior are observed. See more in Math Mode.
nvpl_lapack_env_mode_t#
C / C++
NVPL LAPACK defines enum nvpl_lapack_env_mode_t with the following values:
NVPL_LAPACK_ENV_MODE_DEFAULT, respects environment variablesNVPL_LAPACK_ENV_MODE_IGNORE, ignores environment variablesNVPL_LAPACK_ENV_MODE_USE_GLOBAL, special value which can be used to reset thread-local environment mode settings.
See more in Environment Mode.