PaStiX Handbook  6.3.2
cand.h
Go to the documentation of this file.
1 /**
2  *
3  * @file cand.h
4  *
5  * PaStiX analyse headers for candidate array functions.
6  *
7  * @copyright 1998-2023 Bordeaux INP, CNRS (LaBRI UMR 5800), Inria,
8  * Univ. Bordeaux. All rights reserved.
9  *
10  * @version 6.3.2
11  * @author Pascal Henon
12  * @author Mathieu Faverge
13  * @date 2023-07-21
14  *
15  * @addtogroup blend_dev_cand
16  * @{
17  * This module contains all subroutines to initialize the candidates array
18  * for each supernode, as well as supernode properties that are defined by
19  * level such as 2D layouts and 2D tasks.
20  *
21  **/
22 #ifndef _cand_h_
23 #define _cand_h_
24 
25 /**
26  * @brief Processor candidate group to own a column blok
27  */
28 typedef struct cand_s {
29  double costlevel; /**< Cost from root to node */
30  pastix_int_t treelevel; /**< Level of the cblk in the elimination tree (depth from the root) */
31  pastix_int_t fcandnum; /**< first processor number of this candidate group */
32  pastix_int_t lcandnum; /**< last processor number of this candidate group */
33  pastix_int_t fccandnum; /**< first cluster number of the cluster candidate group */
34  pastix_int_t lccandnum; /**< last cluster number of the cluster candidate group */
35  pastix_int_t cluster; /**< Cluster id on which the task will be executed */
36  int8_t cblktype; /**< type of the distribution */
37 } Cand;
38 
39 Cand *candInit ( pastix_int_t cblknbr );
40 void candExit ( Cand *candtab );
41 int candCheck( const Cand *candtab,
42  const symbol_matrix_t *symbmtx );
43 void candSave ( const Cand *candtab,
44  pastix_int_t cblknbr,
45  const char *directory );
46 void candBuild( pastix_int_t level_tasks2d,
47  pastix_int_t width_tasks2d,
48  pastix_compress_when_t lr_when,
49  pastix_int_t lr_width,
50  Cand *candtab,
51  EliminTree *etree,
52  const symbol_matrix_t *symbmtx,
53  const CostMatrix *costmtx );
54 
55 
56 void candUpdate ( Cand *candtab,
57  EliminTree *etree,
58  const symbol_matrix_t *symbmtx,
59  const CostMatrix *costmtx );
60 
61 void candSetClusterCand( Cand *candtab,
62  pastix_int_t cblknbr,
63  const pastix_int_t *core2clust,
64  pastix_int_t coresnbr );
65 
66 void candGenDot ( const EliminTree *etree,
67  const Cand *candtab,
68  FILE *stream );
69 void candGenDotLevel ( const EliminTree *etree,
70  const Cand *candtab,
71  FILE *stream,
72  pastix_int_t level );
73 void candGenCompressedDot( const EliminTree *etree,
74  const Cand *candtab,
75  FILE *stream );
76 
77 #endif /* _cand_h_ */
78 
79 /**
80  * @}
81  */
BEGIN_C_DECLS typedef int pastix_int_t
Definition: datatypes.h:51
pastix_int_t lcandnum
Definition: cand.h:32
pastix_int_t cluster
Definition: cand.h:35
pastix_int_t fcandnum
Definition: cand.h:31
double costlevel
Definition: cand.h:29
pastix_int_t treelevel
Definition: cand.h:30
pastix_int_t lccandnum
Definition: cand.h:34
pastix_int_t fccandnum
Definition: cand.h:33
int8_t cblktype
Definition: cand.h:36
int candCheck(const Cand *candtab, const symbol_matrix_t *symbmtx)
Check the correctness of the computed candidates.
Definition: cand.c:204
void candUpdate(Cand *candtab, EliminTree *etree, const symbol_matrix_t *symbmtx, const CostMatrix *costmtx)
Update the candtab array costs after the symbol split algorithm has been applied.
Definition: cand.c:804
struct cand_s Cand
Processor candidate group to own a column blok.
Cand * candInit(pastix_int_t cblknbr)
Initialize the candtab array with default values.
Definition: cand.c:48
void candSave(const Cand *candtab, pastix_int_t cblknbr, const char *directory)
Print the candidates array into the candtab.txt file.
Definition: cand.c:108
void candExit(Cand *candtab)
Exit and free the candtab structure given.
Definition: cand.c:83
void candGenCompressedDot(const EliminTree *etree, const Cand *candtab, FILE *stream)
Print the compressed elimination tree in a dot file, where all nodes with the same candidates are mer...
Definition: cand_gendot.c:441
void candSetClusterCand(Cand *candtab, pastix_int_t cblknbr, const pastix_int_t *core2clust, pastix_int_t coresnbr)
Set the clusters candidates from the cores canditates.
Definition: cand.c:158
void candBuild(pastix_int_t level_tasks2d, pastix_int_t width_tasks2d, pastix_compress_when_t lr_when, pastix_int_t lr_width, Cand *candtab, EliminTree *etree, const symbol_matrix_t *symbmtx, const CostMatrix *costmtx)
Finish to build the candtab array for the proportionnal mapping.
Definition: cand.c:709
void candGenDot(const EliminTree *etree, const Cand *candtab, FILE *stream)
Print the elimination tree in a dot file.
Definition: cand_gendot.c:253
void candGenDotLevel(const EliminTree *etree, const Cand *candtab, FILE *stream, pastix_int_t level)
Print the first levels of the elimination tree in a dot file.
Definition: cand_gendot.c:405
Processor candidate group to own a column blok.
Definition: cand.h:28
Arrays of double to store the cost of each element in the matrix.
Definition: cost.h:30
Elimination tree.
Definition: elimintree.h:39
enum pastix_compress_when_e pastix_compress_when_t
Compression strategy available for IPARM_COMPRESS_WHEN parameter.
Symbol matrix structure.
Definition: symbol.h:77