-
Notifications
You must be signed in to change notification settings - Fork 0
/
BlasMpi1.hpp
59 lines (48 loc) · 1.49 KB
/
BlasMpi1.hpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
/*!
* @file BlasMpi.hpp
* @brief header of BlasMpi part 2
* @author Abal-Kassim Cheik Ahamed, Frédéric Magoulès, Sonia Toubaline
* @date Wed Dec 09 16:36:50 CET 2015
* @version 1.0
* @remarks
*/
#ifndef GUARD_BLASMPI1_HPP_
#define GUARD_BLASMPI1_HPP_
// basic packages
#include <mpi.h>
// project packages
#include "dllmrg.hpp"
#include "Vector.hpp"
#include "MatrixDense.hpp"
// third-party packages
//! @namespace BlasMpi
namespace BlasMpi {
//! @brief compute dot product
//! @param [in] x_local = local first vector
//! @param [in] y_local = local second vector
//! @param [in] mpi_comm = MPI communicator
//! @return dot product
double Dot (
const Vector<double,int>& x_local,
const Vector<double,int>& y_local,
MPI_Comm& mpi_comm ) ;
//! @brief compute xx-norm (xx = 2 | inf | ...)
//! @param [in] x_local = local vector
//! @param [in] norm_type = type of the norm (x)
//! @param [in] mpi_comm = MPI communicator
//! @return norm Lp
double NormLp (
const Vector<double,int>& x_local,
const int norm_type,
MPI_Comm& mpi_comm ) ;
//! @brief compute xx-norm, without (.)^(1/p), (xx = 2 | inf | ...)
//! @param [in] x_local = local vector
//! @param [in] norm_type = type of the norm (x)
//! @param [in] mpi_comm = MPI communicator
//! @return norm pLp, without (.)^(1/p)
double NormpLp (
const Vector<double,int>& x_local,
const int norm_type,
MPI_Comm& mpi_comm ) ;
} // namespace BlasMpi {
#endif // GUARD_BLASMPI1_HPP_