PaStiX Handbook 6.4.0
Loading...
Searching...
No Matches
solver_comm_matrix.h
Go to the documentation of this file.
1/**
2 *
3 * @file solver_comm_matrix.h
4 *
5 * PaStiX communication matrix handler.
6 *
7 * @copyright 2021-2024 Bordeaux INP, CNRS (LaBRI UMR 5800), Inria,
8 * Univ. Bordeaux. All rights reserved.
9 *
10 * @version 6.4.0
11 * @author Nolan Bredel
12 * @date 2024-07-05
13 *
14 **/
15#ifndef _solver_comm_matrix_h_
16#define _solver_comm_matrix_h_
17
18#include "common/common.h"
19#include "blend/solver.h"
20
21#if defined(PASTIX_COMMUNICATION_MATRIX)
22void solverComMatrixInit( SolverMatrix *solvmtx );
23void solverComMatrixExit( SolverMatrix *solvmtx );
24void solverComMatrixGather( SolverMatrix *solvmtx );
25
26/**
27 *******************************************************************************
28 *
29 * @brief Add the size of a communication
30 *
31 *******************************************************************************
32 *
33 * @param[inout] solvmtx
34 * The solver matrix structure.
35 *
36 * @param[in] dest
37 * The destination node where the data goes.
38 *
39 * @param[in] size
40 * Size of the communication.
41 *
42 *******************************************************************************/
43static inline void
44solverCommMatrixAdd( SolverMatrix *solvmtx, int dest, size_t size )
45{
46 solvmtx->com_vector[dest] += size;
47}
48
49#else
50#ifndef DOXYGEN_SHOULD_SKIP_THIS
51static inline void
52solverComMatrixInit( __attribute__((unused)) SolverMatrix *solvmtx ) {}
53
54static inline void
55solverComMatrixExit( __attribute__((unused)) SolverMatrix *solvmtx ) {}
56
57static inline void
58solverComMatrixGather( __attribute__((unused)) SolverMatrix *solvmtx ) {}
59
60static inline void
61solverCommMatrixAdd( __attribute__((unused)) SolverMatrix *solvmtx,
62 __attribute__((unused)) int dest,
63 __attribute__((unused)) size_t size )
64{}
65#endif /* DOXYGEN_SHOULD_SKIP_THIS */
66#endif
67
68#endif /* _solver_comm_matrix_h_ */
size_t * com_vector
Definition solver.h:276
Solver column block structure.
Definition solver.h:203
void solverComMatrixExit(SolverMatrix *solvmtx)
Free the communication matrix.
void solverComMatrixGather(SolverMatrix *solvmtx)
Gather the volume of communication and save it as a csv.
void solverComMatrixInit(SolverMatrix *solvmtx)
Initialize the communication matrix.