66 for( i=0; i<sonsnbr; i++ )
71 if ( (fcand != candtab[son].fcandnum) ||
72 (lcand != candtab[son].lcandnum) )
137 assert( *cnodeidx < ctree->nodenbr );
143 cnode = ctree->
nodetab + (*cnodeidx);
149 ccand[ *cnodeidx ].
fcandnum = fcand;
150 ccand[ *cnodeidx ].
lcandnum = lcand;
163 for( i=0; i<sonsnbr; i++ )
168 memcpy( tmp + sonsnbr + gdsonsnbr,
174 if ( (fcand != candtab[son].fcandnum) ||
175 (lcand != candtab[son].lcandnum) )
184 for (i=0; i<gdsonsnbr; i++) {
185 tmp[i] = tmp[sonsnbr+i];
191 while( merge && (sonsnbr>0) );
195 for(i=0; i<sonsnbr; i++) {
199 merge, cnodeidx, tmp+sonsnbr );
205 for(i=0; i<sonsnbr; i++) {
209 if ( ccand[soni].fcandnum != ccand[soni].lcandnum )
212 for( j=i+1; j<sonsnbr; j++ ) {
215 if ( (ccand[sonj].fcandnum != ccand[soni].fcandnum) ||
216 (ccand[sonj].lcandnum != ccand[soni].lcandnum) )
226 tmp[j] = tmp[sonsnbr]; j--;
264 for (i=0; i < etree->
nodenbr; i++)
266 if ((etree->
nodetab[i]).fathnum == -2)
269 if ( candtab == NULL ) {
270 fprintf( stream,
"\t\"%ld\" [label=\"#%ld\\nNode: %e:%e\\nSubtree: %e:%e\"]\n",
278 if ( candtab[i].lcandnum != candtab[i].fcandnum ) {
279 fprintf( stream,
"\t\"%ld\" [label=\"#%ld\\nCand: %ld - %ld\\nNode: %e:%e\\nSubtree cost: %e:%e\"]\n",
281 (
long)(candtab[i].fcandnum),
282 (
long)(candtab[i].lcandnum),
289 fprintf( stream,
"\t\"%ld\" [label=\"#%ld\\nCand: %ld\\nNode: %e:%e\\nSubtree cost: %e:%e\" colorscheme=set312 style=filled fillcolor=%ld]\n",
291 (
long)(candtab[i].fcandnum),
296 (
long)((candtab[i].
lcandnum % 12) + 1));
299 if ((etree->
nodetab[i]).fathnum == -1)
301 fprintf(stream,
"\t\"%ld\"->\"%ld\"\n", (
long)i, (
long)((etree->
nodetab[i]).fathnum));
303 fprintf(stream,
"}\n");
339 assert( (etree->
nodetab[rootnum]).fathnum != -2 );
342 if ( candtab == NULL ) {
343 fprintf( stream,
"\t\"%ld\" [label=\"#%ld\\nSubtree cost: %e\\nNode cost: %e\\nNode CP: %e\"]\n",
344 (
long)rootnum, (
long)rootnum,
350 if ( candtab[rootnum].lcandnum != candtab[rootnum].fcandnum ) {
351 fprintf( stream,
"\t\"%ld\" [label=\"#%ld\\nCand: %ld - %ld\\nSubtree cost: %e\\nNode cost: %e\\nNode CP: %e\"]\n",
352 (
long)rootnum, (
long)rootnum,
353 (
long)(candtab[rootnum].fcandnum),
354 (
long)(candtab[rootnum].lcandnum),
360 fprintf(stream,
"\t\"%ld\" [label=\"#%ld\\nCand: %ld\\nSubtree cost: %e\\nNode cost: %e\\nNode CP: %e\" colorscheme=set312 style=filled fillcolor=%ld]\n",
361 (
long)rootnum, (
long)rootnum,
362 (
long)(candtab[rootnum].fcandnum),
366 (
long)((candtab[rootnum].
lcandnum % 12) + 1));
378 fprintf(stream,
"\t\"%ld\"->\"%ld\"\n", (
long)son, (
long)rootnum);
418 fprintf(stream,
"}\n");
459 ctree, ccand, -1, &cnodeidx, tmp );
BEGIN_C_DECLS typedef int pastix_int_t
Cand * candInit(pastix_int_t cblknbr)
Initialize the candtab array with default values.
void candExit(Cand *candtab)
Exit and free the candtab structure given.
Processor candidate group to own a column blok.
static pastix_int_t eTreeRoot(const EliminTree *etree)
Return the root of the elimination tree.
static pastix_int_t eTreeSonI(const EliminTree *etree, pastix_int_t node, pastix_int_t i)
Return the i^{th} son of a given node.
EliminTree * eTreeInit(pastix_int_t)
Initialize the elimination tree structure.
static void candGenDotLevelSub(const EliminTree *etree, const Cand *candtab, FILE *stream, pastix_int_t nblevel, pastix_int_t rootnum)
Print one level of the elimination subtree in a dot file.
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...
static pastix_int_t compress_getNodeNbr(const EliminTree *etree, const Cand *candtab, pastix_int_t rootnum)
Compute the number of nodes in the compressed tree. The compression is based on identical candidates ...
void candGenDotLevel(const EliminTree *etree, const Cand *candtab, FILE *stream, pastix_int_t nblevel)
Print the first levels of the elimination tree in a dot file.
static void compress_setSonsNbr(const EliminTree *etree, const Cand *candtab, pastix_int_t rootnum, EliminTree *ctree, Cand *ccand, pastix_int_t fathnum, pastix_int_t *cnodeidx, pastix_int_t *tmp)
Compress a subtree. The compression is based on identical candidates for computations.
void candGenDot(const EliminTree *etree, const Cand *candtab, FILE *stream)
Print the elimination tree in a dot file.
void eTreeExit(EliminTree *)
Free the elimination tree structure.
Node of the elimination tree.