bulles.c

Summary
bulles.c
Bubble_InitTreeInitialize a tree of bubbles
Bubble_FreeFree the BubbleTree structure.
Bubble_AddAdd a task in the BubbleTree structure defined by the set of candidates processors (first and last) and by the cost and the deep of this task in the dependence’s tree.
Bubble_buildtreeConstruct the tree by filling nodetab and sonstab tables thanks to the bubbles added whith Bubble_Add.
Bubble_BuildTree
Bubble_printGenerate a dot file for graphviz with the bubble tree.
Bubble_Print

Bubble_InitTree

void Bubble_InitTree(BubbleTree *btree,
int nbleaves)

Initialize a tree of bubbles

Parameters

btreePointer to bubble tree to allocate and initialize.
nbleavesNumber of leaves in the tree.

Returns

Bubble_Free

void Bubble_Free(BubbleTree *btree)

Free the BubbleTree structure.

Parameters

btreePointer to the bubble tree to be free, NULL is returned.

Returns

Bubble_Add

int Bubble_Add(BubbleTree *btree,
INT fcandnum,
INT lcandnum,
double costlevel,
INT treelevel)

Add a task in the BubbleTree structure defined by the set of candidates processors (first and last) and by the cost and the deep of this task in the dependence’s tree.

Parameters

btreePointer to Bubble tree in which we need to add some task.
fcandnumIndice of the first candidate for the task to add.
lcandnumIndice of the last candidate for the task to add.
costlevelCost of the path from the root to this task.
treelevelDeep of the task in the task’s tree.

Returns

The indice of the bubble corresponding to the set of candidates.  Exit if the search or the add of the bubble fails.

Bubble_buildtree

Construct the tree by filling nodetab and sonstab tables thanks to the bubbles added whith Bubble_Add.  This function must be call only one time for one bubble tree.  And only after the add of all bubbles.

Parameters

btreePointer to Bubble tree
verboseIf verbose, the tree is printed

Returns

void

Bubble_BuildTree

void Bubble_BuildTree(const BubbleTree *btree)

Bubble_print

Generate a dot file for graphviz with the bubble tree.

Parameters

btreePointer to Bubble tree
bcostCost in time of all tasks included in each bubble

Returns

void

Bubble_Print

void Bubble_Print(const BubbleTree *btree,
const double *bcost,
double totalcost,
FILE *out)
void Bubble_InitTree(BubbleTree *btree,
int nbleaves)
Initialize a tree of bubbles
void Bubble_Free(BubbleTree *btree)
Free the BubbleTree structure.
int Bubble_Add(BubbleTree *btree,
INT fcandnum,
INT lcandnum,
double costlevel,
INT treelevel)
Add a task in the BubbleTree structure defined by the set of candidates processors (first and last) and by the cost and the deep of this task in the dependence’s tree.
void Bubble_BuildTree(const BubbleTree *btree)
void Bubble_Print(const BubbleTree *btree,
const double *bcost,
double totalcost,
FILE *out)
Close