Skip to content
Snippets Groups Projects
Select Git revision
  • e39c6ecca3da0b8b198ea207aec2e7cca3c9e301
  • main default protected
2 results

.gitkeep

Blame
  • algebraic.h 1.18 KiB
    /* Distributed under the terms of GPLv3 or later. See COPYING for details. */
    
    /*! \file algebraic.h
     *
     * \brief Declaration of algebraic functions with different call-backs.
     *
     * In principle, the system that runs NP_TMcode may offer various types of
     * optimized features, such as multi-core or multi-node scaling, GPU offload,
     * or external libraries. This header collects a set of functions that can
     * perform standard algebraic operations choosing the most optimized available
     * system as a call-back. If no optimization is detected, eventually the 
     * legacy serial function implementation is used as a fall-back.
     */
    
    #ifndef INCLUDE_ALGEBRAIC_H_
    #define INCLUDE_ALGEBRAIC_H_
    
    /*! \brief Perform in-place matrix inversion.
     *
     * \param mat: `complex double **` The matrix to be inverted (must be a square matrix).
     * \param size: `np_int` The size of the matrix (i.e. the number of its rows or columns).
     * \param ier: `int &` Reference to an integer variable for returning a result flag.
     * \param max_size: `np_int` The maximum expected size (required by some call-backs,
     * optional, defaults to 0).
     */
    void invert_matrix(dcomplex **mat, np_int size, int &ier, np_int max_size=0);
    
    #endif