No Matches
saf_externals.h File Reference

Include header for SAF externals. More...

#include "mkl.h"

Go to the source code of this file.


#define SAF_INTEL_IPP_STATUS_STRING   "Disabled"
#define SAF_FFTW_STATUS_STRING   "Disabled"
#define SAF_SIMD_STATUS_STRING   "Disabled"
#define SAF_NETCDF_STATUS_STRING   "Disabled"
 Current configuration information.

Detailed Description

Include header for SAF externals.

Including this header is optional and only needed if you wish to have access to these external libraries in your own project.
More information can be found in the docs folder regarding where to find and how to link dependencies
Using ATLAS (SAF_USE_ATLAS) as the performance library is not recommended, since some LAPACK routines are not implemented by the library! However, if you don't mind losing some SAF functionality (namely: certain veclib utility functions), then it may still be a good choice for your particular project.

Required Dependencies

A performance library comprising CBLAS and LAPACK routines is required by SAF. Add one of the following FLAGS to your project's preprocessor definitions in order to enable one of these suitable performance libraries, (which must be correctly linked when building SAF):

  • SAF_USE_INTEL_MKL_LP64: to enable Intel's Math Kernel Library with the Fortran LAPACK interface
  • SAF_USE_INTEL_MKL_ILP64 same as SAF_USE_INTEL_MKL except using int64 and LAPACKE interface
  • SAF_USE_OPENBLAS_WITH_LAPACKE: to enable OpenBLAS with the LAPACKE interface
  • SAF_USE_APPLE_ACCELERATE: to enable the Accelerate framework with the Fortran LAPACK interface
  • SAF_USE_ATLAS: to enable ATLAS BLAS routines and ATLAS's CLAPACK interface

Optional dependencies

If the optional saf_sofa_reader module is enabled and SAF_ENABLE_NETCDF is defined, then the netcdf library must also be linked along with saf.

Intel IPP may be optionally employed with the flag: SAF_USE_INTEL_IPP

FFTW may be optionally employed with the flag: SAF_USE_FFTW

SIMD intrinsics utilisation may be enabled with: SAF_ENABLE_SIMD

  • SSE/SSE2/SSE3 intrinsics are used by default
  • AVX/AVX2 intrinsics are enabled with compiler flag: -mavx2
  • AVX-512 intrinsics are enabled with compiler flag: -mavx512f (Note that intrinsics require a CPU that supports them)
Leo McCormack

Definition in file saf_externals.h.

Macro Definition Documentation



Definition at line 309 of file saf_externals.h.



Definition at line 351 of file saf_externals.h.


"Current SAF externals configuration: " "\n" \
" - Performance library: " SAF_CURRENT_PERFORMANCE_LIBRARY_STRING "\n" \
" - Intel IPP status: " SAF_INTEL_IPP_STATUS_STRING "\n" \
" - FFTW status: " SAF_FFTW_STATUS_STRING "\n" \
" - SIMD status: " SAF_SIMD_STATUS_STRING "\n" \
" - Enabled intrinsics: " SAF_ENABLED_SIMD_INTRINSICS_STRING "\n" \
" - netCDF status: " SAF_NETCDF_STATUS_STRING "\n"

Current configuration information.

Definition at line 362 of file saf_externals.h.


#define SAF_FFTW_STATUS_STRING   "Disabled"

Definition at line 333 of file saf_externals.h.


#define SAF_INTEL_IPP_STATUS_STRING   "Disabled"

Definition at line 326 of file saf_externals.h.


#define SAF_NETCDF_STATUS_STRING   "Disabled"

Definition at line 358 of file saf_externals.h.


#define SAF_SIMD_STATUS_STRING   "Disabled"

Definition at line 350 of file saf_externals.h.