PaStiX Handbook
6.4.0
|
Data Structures | |
struct | ExtendVectorINT_s |
The extend integer array structure. More... | |
Typedefs | |
typedef struct ExtendVectorINT_s | ExtendVectorINT |
The extend integer array structure. | |
Functions | |
pastix_int_t * | extendint_Init (ExtendVectorINT *vec, pastix_int_t size) |
Initialize the extendVector structure with the initial size given. More... | |
void | extendint_Exit (ExtendVectorINT *vec) |
Free the extendVector structure. More... | |
void | extendint_Add (ExtendVectorINT *vec, pastix_int_t elt) |
Add an element elt to the end of the vector. More... | |
pastix_int_t | extendint_Size (const ExtendVectorINT *vec) |
Return the number of element stored in the vector. More... | |
pastix_int_t | extendint_Read (const ExtendVectorINT *vec, pastix_int_t eltnum) |
Return the element of index eltnum. More... | |
void | extendint_Clear (ExtendVectorINT *vec) |
Cleanup the vector. More... | |
void | extendint_ToSize (ExtendVectorINT *vec, pastix_int_t size) |
Reallocate the vector to the given size. More... | |
void | extendint_incr (ExtendVectorINT *vec) |
Increment the number of element stored. More... | |
This module contains all subroutines to manage the extend int vector arrays. This structure manage a vector of integer automatically extensible when elements are added. This is used in the simulation algorithm to store the available tasks per worker.
struct ExtendVectorINT_s |
The extend integer array structure.
Definition at line 29 of file extendVector.h.
Data Fields | ||
---|---|---|
pastix_int_t | vecsize |
The size of the vector |
pastix_int_t | eltnbr |
The number of elements stored |
pastix_int_t * | inttab |
The actual array with the elements |
pastix_int_t * extendint_Init | ( | ExtendVectorINT * | vec, |
pastix_int_t | size | ||
) |
Initialize the extendVector structure with the initial size given.
[in,out] | vec | The allocated pointer to initialize. |
[in] | size | The initial size of the vector. |
Definition at line 45 of file extendVector.c.
References ExtendVectorINT_s::eltnbr, ExtendVectorINT_s::inttab, pastix_int_t, and ExtendVectorINT_s::vecsize.
Referenced by graphComputeProjection(), graphIsolateRange(), orderSupernodes(), simuInit(), and thread_reorder().
void extendint_Exit | ( | ExtendVectorINT * | vec | ) |
Free the extendVector structure.
[in,out] | vec | The allocated pointer to free. |
Definition at line 66 of file extendVector.c.
References ExtendVectorINT_s::inttab.
Referenced by graphComputeProjection(), graphIsolateRange(), orderSupernodes(), simuExit(), simuRealloc(), and thread_reorder().
void extendint_Add | ( | ExtendVectorINT * | vec, |
pastix_int_t | elt | ||
) |
Add an element elt to the end of the vector.
[in,out] | vec | The pointer to the extend vector. Might be extended if there is not enough space.. |
[in] | elt | The value to store in the vector |
Definition at line 90 of file extendVector.c.
References ExtendVectorINT_s::eltnbr, extendint_incr(), and ExtendVectorINT_s::inttab.
Referenced by graph_iRange_fill_outptr(), graphComputeProjection(), order_tasks(), orderSupernodes(), and simuRun().
pastix_int_t extendint_Size | ( | const ExtendVectorINT * | vec | ) |
Return the number of element stored in the vector.
[in] | vec | The extend vector structure. |
Definition at line 112 of file extendVector.c.
References ExtendVectorINT_s::eltnbr.
Referenced by graph_iRange_fill_outptr(), graphComputeProjection(), orderSupernodes(), and thread_preorder_zigzag_stategy().
pastix_int_t extendint_Read | ( | const ExtendVectorINT * | vec, |
pastix_int_t | eltnum | ||
) |
Return the element of index eltnum.
[in] | vec | The extend vector structure. |
[in] | eltnum | The index of the element to return. |
Definition at line 136 of file extendVector.c.
References ExtendVectorINT_s::inttab.
Referenced by graph_iRange_fill_outptr(), graphComputeProjection(), orderSupernodes(), and thread_preorder_zigzag_stategy().
void extendint_Clear | ( | ExtendVectorINT * | vec | ) |
Cleanup the vector.
Set the number of elements to 0. Does NµOT free the sturcture.
[in,out] | vec | The extend vector to clear. |
Definition at line 220 of file extendVector.c.
References ExtendVectorINT_s::eltnbr.
Referenced by extendint_ToSize(), graph_iRange_fill_outptr(), graphComputeProjection(), and orderSupernodes().
void extendint_ToSize | ( | ExtendVectorINT * | vec, |
pastix_int_t | size | ||
) |
Reallocate the vector to the given size.
[in,out] | vec | The extend vector structure to realloc. |
[in] | size | The new size of the vector. If the size is smaller than the actual size of the vector, nothing is done. Otherwise the vectore is enlarged and the values are kept. |
Definition at line 159 of file extendVector.c.
References extendint_Clear(), ExtendVectorINT_s::inttab, pastix_int_t, and ExtendVectorINT_s::vecsize.
void extendint_incr | ( | ExtendVectorINT * | vec | ) |
Increment the number of element stored.
This is the internal function that reallocate the vector.
[in,out] | vec | The extend vector structure to realloc. |
if the vector is not big enough, make it bigger !!
Definition at line 189 of file extendVector.c.
References ExtendVectorINT_s::eltnbr, ExtendVectorINT_s::inttab, pastix_int_t, and ExtendVectorINT_s::vecsize.
Referenced by extendint_Add().