20 #include "symbol/symbol_reorder.h"
75 for (itercblk=0; itercblk<cblknbr; itercblk++, cblk++) {
80 memset( depthweight, 0, maxdepth *
sizeof(
pastix_int_t) );
84 depthweight, maxdepth,
89 memFree_null( depthweight );
100 struct args_reorder_t
131 struct args_reorder_t *arg = (
struct args_reorder_t*)args;
145 tasknbr = cblknbr / size;
147 if (rank < (cblknbr % size)) {
157 cblk = symbptr->
cblktab + rank;
158 for (ii=0; ii<tasknbr; ii++, cblk += size) {
160 memset( depthweight, 0, maxdepth *
sizeof(
pastix_int_t) );
164 depthweight, maxdepth,
169 memFree_null( depthweight );
197 struct args_reorder_t *arg = (
struct args_reorder_t*)args;
217 tasktab = arg->tasktab + rank;
220 for ( ii=0; ii<tasknbr; ii++ ) {
223 memset( depthweight, 0, maxdepth *
sizeof(
pastix_int_t) );
226 depthweight, maxdepth,
231 memFree_null( depthweight );
257 #ifdef BASIC_REORDERING_STRATEGY
291 return n*n * ((double)(cblk[1].bloknum - cblk[0].bloknum) / 2.0 + 1.0);
318 struct args_reorder_t *args )
328 double cblk_cost, proc_cost;
338 for ( itercblk=0; itercblk < cblknbr; itercblk++, cblk++ ) {
346 for ( iterproc=0; iterproc < size; ++iterproc) {
353 proc_cost += -cblk_cost;
399 struct args_reorder_t args_reorder = { pastix_data, maxdepth, levels, NULL };
407 for ( iterproc=0; iterproc < size; ++iterproc ) {
414 for ( iterproc=0; iterproc < size; ++iterproc ) {
418 memFree_null( args_reorder.tasktab );
421 #ifndef DOXYGEN_SHOULD_SKIP_THIS
468 if (reorder == NULL) {
471 reorder( pastix_data, maxdepth, levels );
BEGIN_C_DECLS typedef int pastix_int_t
pastix_int_t extendint_Size(const ExtendVectorINT *)
Return the number of element stored in the vector.
pastix_int_t extendint_Read(const ExtendVectorINT *, pastix_int_t)
Return the element of index eltnum.
pastix_int_t * extendint_Init(ExtendVectorINT *, pastix_int_t)
Initialize the extendVector structure with the initial size given.
void extendint_Add(ExtendVectorINT *, pastix_int_t)
Add an element elt to the end of the vector.
void extendint_Exit(ExtendVectorINT *)
Free the extendVector structure.
The extend integer array structure.
static void pqueuePush1(pastix_queue_t *q, pastix_int_t elt, double key1)
Push an element with a single key.
void pqueueExit(pastix_queue_t *)
Free the structure associated to the queue.
pastix_int_t pqueueSize(const pastix_queue_t *)
Return the size of the queue.
static pastix_int_t pqueuePop1(pastix_queue_t *q, double *key1)
Pop the head of the queue and get the associated first key.
int pqueueInit(pastix_queue_t *, pastix_int_t)
Initialize the queue structure with an initial space to store the elements.
Symbol column block structure.
pastix_order_t * ordemesh
symbol_matrix_t * symbmtx
Main PaStiX data structure.
static void thread_reorder(pastix_data_t *pastix_data, pastix_int_t maxdepth, pastix_int_t *levels)
Prepare arguments for parallel subroutines and order cblks.
static void order_tasks(isched_t *ctx, struct args_reorder_t *args)
Order cblks for each process.
void thread_preorder_basic_stategy(isched_thread_t *ctx, void *args)
Parallel basic version for reordering.
static double cost(symbol_cblk_t *cblk)
Computes the cost of a cblk.
void symbol_reorder(pastix_data_t *pastix_data, pastix_int_t maxdepth, pastix_int_t *levels)
Reorder all node.
static void sequential_reorder(pastix_data_t *pastix_data, pastix_int_t maxdepth, pastix_int_t *levels)
Sequential version for reordering.
void thread_preorder_zigzag_stategy(isched_thread_t *ctx, void *args)
Parallel improved version for reordering.
void symbol_reorder_cblk(const symbol_matrix_t *symbptr, const symbol_cblk_t *cblk, pastix_order_t *order, const pastix_int_t *levels, pastix_int_t *depthweight, pastix_int_t depthmax, pastix_int_t split_level, pastix_int_t stop_criterion)
Reorder a supernode.
static void thread_preorder(isched_thread_t *ctx, void *args)
Function called by each thread.