77#define __FUNC__ "SortedList_dhCreate"
91 tmp->o2n_external = NULL;
92 tmp->o2n_local = NULL;
103#define __FUNC__ "SortedList_dhDestroy"
118#define __FUNC__ "SortedList_dhInit"
128 sList->o2n_external = sg->
o2n_ext;
131 sList->alloc = sList->m + 5;
133 sList->list[0].col = INT_MAX;
134 sList->list[0].next = 0;
139#define __FUNC__ "SortedList_dhReset"
148 sList->list[0].next = 0;
153#define __FUNC__ "SortedList_dhReadCount"
160#define __FUNC__ "SortedList_dhResetGetSmallest"
169#define __FUNC__ "SortedList_dhGetSmallest"
175 int get = sList->get;
187#define __FUNC__ "SortedList_dhGetSmallestLowerTri"
194 int globalRow = sList->row + sList->beg_rowP;
207#define __FUNC__ "SortedList_dhPermuteAndInsert"
214 double testVal = fabs (sr->val);
219 if (col >=
beg_row && col < end_row)
223 col = sList->o2n_local[col];
226 if (testVal > thresh || col == sList->row)
245 if (testVal < thresh)
246 goto END_OF_FUNCTION;
249 if (sList->o2n_external == NULL)
282#define __FUNC__ "SortedList_dhInsertOrUpdate"
296 node->level =
MIN (sr->level, node->level);
303#define __FUNC__ "SortedList_dhInsert"
308 int ct, col = sr->col;
312 if (sList->countMax == sList->alloc)
320 ct = sList->countMax;
321 sList->countMax += 1;
331 while (col >
list[next].col)
342#define __FUNC__ "SortedList_dhFind"
352 for (i = 1; i <
count; ++i)
365#define __FUNC__ "lengthen_list_private"
370 int size = sList->alloc = 2 * sList->alloc;
375 memcpy (sList->list, tmp, sList->countMax * sizeof (
SRecord));
376 SET_INFO (
"doubling size of sList->list");
388 int thisSubdomain,
int col);
392#define __FUNC__ "SortedList_dhEnforceConstraint"
407 fprintf (
logFile,
"SLIST ======= enforcing constraint for row= %i\n",
410 fprintf (
logFile,
"\nSLIST ---- before checking: ");
417 fprintf (
logFile,
"%i ", sr->col + 1);
435 fprintf (
logFile,
"SLIST next col= %i\n", col + 1);
440 if (col < beg_rowP || col >= end_rowP)
445 fprintf (
logFile,
"SLIST external col: %i ; ", 1 + col);
459 fprintf (
logFile,
" deleted\n");
475 fprintf (
logFile,
"SLIST---- after checking: ");
482 fprintf (
logFile,
"%i ", sr->col + 1);
494#define __FUNC__ "check_constraint_private"
504 nabors = sg->
adj + sg->
ptrs[p1];
507 for (i = 0; i <
count; ++i)
519#define __FUNC__ "delete_private"
530 while (
list[
list[curNode].next].col != col)
int Hash_i_dhLookup(Hash_i_dh h, int key)
bool Parser_dhHasSwitch(Parser_dh p, char *s)
void SortedList_dhInit(SortedList_dh sList, SubdomainGraph_dh sg)
int SortedList_dhReadCount(SortedList_dh sList)
static void lengthen_list_private(SortedList_dh sList)
void delete_private(SortedList_dh sList, int col)
void SortedList_dhEnforceConstraint(SortedList_dh sList, SubdomainGraph_dh sg)
void SortedList_dhInsertOrUpdate(SortedList_dh sList, SRecord *sr)
static bool check_constraint_private(SubdomainGraph_dh sg, int thisSubdomain, int col)
SRecord * SortedList_dhFind(SortedList_dh sList, SRecord *sr)
void SortedList_dhReset(SortedList_dh sList, int row)
bool SortedList_dhPermuteAndInsert(SortedList_dh sList, SRecord *sr, double thresh)
void SortedList_dhCreate(SortedList_dh *sList)
void SortedList_dhDestroy(SortedList_dh sList)
void SortedList_dhResetGetSmallest(SortedList_dh sList)
SRecord * SortedList_dhGetSmallestLowerTri(SortedList_dh sList)
SRecord * SortedList_dhGetSmallest(SortedList_dh sList)
void SortedList_dhInsert(SortedList_dh sList, SRecord *sr)
int SubdomainGraph_dhFindOwner(SubdomainGraph_dh s, int idx, bool permuted)
#define CHECK_ERROR(retval)
#define END_FUNC_VAL(retval)