81 float* extraParameter,
94 float* extraParameter,
111 float* extraParameter,
133 float* extraParameter,
163 return (
int)ceil( (
double)blocksCard / procsCard);
178 return (
int)floor( (
double)blocksCard / procsCard);
187 return hit_min( blocksCard, procsCard );
204 int procId,
int procsCard,
int blocksCard,
float* extraParameter ) {
210 int actives =
hit_min( blocksCard, procsCard );
221 int procId,
int procsCard,
int blocksCard,
float* extraParameter ) {
225 if ( blocksCard >= procsCard ) {
226 if ( procId < 0 || procId > procsCard )
return HIT_RANK_NULL;
232 return (
int)(procId * (double)blocksCard / procsCard );
234 else return (
int)ceil( procId * (
double)procsCard / blocksCard );
239 int procId,
int procsCard,
int blocksCard,
float* extraParameter ) {
243 if ( blocksCard >= procsCard ) {
244 if ( procId < 0 || procId > procsCard )
return HIT_RANK_NULL;
250 return (
int)(procId * (double)blocksCard / procsCard );
252 else return (
int)ceil( (procId+1) * (
double)procsCard / blocksCard ) - 1;
257 int procId,
int procsCard,
int blocksCard,
float* extraParameter ) {
274 float* extraParameter,
279 if ( blocksCard == 0 ) {
284 int begin = procId * blocksCard /
hit_min(blocksCard, procsCard);
287 if ( begin >= blocksCard ) {
297 (*res).end = ((( procId + 1 ) * blocksCard /
hit_min(blocksCard, procsCard))-1)
301 (*res).stride = input.
stride;
308 float* extraParameter,
319 int id = tileInd *
hit_min(blocksCard, procsCard) / blocksCard;
320 if ( (
id+1) * blocksCard /
hit_min(blocksCard, procsCard) == tileInd )
return id+1;
367 group.
rank[dim] = -1;
423 group.
rank[dim] = -1;
438 float* extraParameter,
440 int minimum = (int)*extraParameter;
443 if ( blocksCard == 0 ) {
450 int size = blocksCard /
hit_min(blocksCard, procsCard);
451 if ( size < minimum ) {
453 int begin = procId * minimum;
454 if ( begin >= blocksCard ) {
461 (*res).end = ( begin + minimum ) * input.
stride + input.
begin;
462 (*res).stride = input.
stride;
470 float* extraParameter,
474 int minimum = (int)*extraParameter;
481 int size = blocksCard /
hit_min(blocksCard, procsCard);
485 if ( size < minimum )
486 return tileInd / minimum;
494 int minimum = (int)*extraParameter;
497 if ( regularMaxSize < minimum )
return minimum;
498 else return regularMaxSize;
502 int minimum = (int)*extraParameter;
505 if ( regularMinSize < minimum )
return minimum;
506 else return regularMinSize;
510 int minimum = (int)*extraParameter;
511 return hit_min( procsCard, blocksCard/minimum );
515 int procId,
int procsCard,
int blocksCard,
float* extraParameter ) {
532 float extraParameterValue = (float)minElems;
550 &extraParameterValue,
571 group.
rank[dim] = -1;
591 if ( blocksCard <= procsCard ) {
592 if ( procId >= blocksCard ) {
599 (*res).
begin = procId;
606 int begin = procId * blocksCard /
hit_min(blocksCard, procsCard);
612 (*res).end = ((( procId + 1 ) * blocksCard /
hit_min(blocksCard, procsCard))-1)
616 (*res).stride = input.
stride;
668 group.
rank[dim] = -1;
687 float* extraParameter,
692 double ratio = (double)blocksCard / procsCard;
693 double beginFrac = procId * ratio;
694 int begin = (int)beginFrac;
697 if ( floor(beginFrac) == floor(beginFrac-ratio) ) {
708 int adjust = (blocksCard > procsCard) ? 1 : 0;
709 int end = ((procId + adjust) * blocksCard / procsCard ) - adjust;
713 (*res).stride = input.
stride;
790 float* extraParameter,
795 double ratio = (double)blocksCard / procsCard;
796 double beginFrac = procId * ratio;
797 int begin = (int)beginFrac;
800 printf(
"CTRL procId: %d, procsCard %d, blocksCard: %d\n", procId, procsCard, blocksCard);
801 printf(
"CTRL Input[%d:%d:%d]\n",
812 if( floor(beginFrac) == floor(beginFrac+ratio) ) {
823 int adjust = (blocksCard > procsCard) ? 1 : 0;
824 int end = ((procId + adjust) * blocksCard / procsCard ) - adjust;
828 (*res).stride = input.
stride;
906 float* extraParameter,
911 if ( blocksCard <= procId ) {
920 int tmp = (blocksCard / procsCard - 1) * procsCard + procId;
921 if ( procId < blocksCard % procsCard ) tmp = tmp + procsCard;
925 (*res).stride = input.
stride * procsCard;
931 float* extraParameter,
943 return tileInd % procsCard;
988 if ( restrictToDim != dim ) {
1039 if(! res.
active)
return res;
1044 group.
rank[dim] = 0;
1059 float* extraParameter,
1063 if ( procsCard < 2 && procId == 0 ) {
1069 int firstSize = (int)ceilf(*extraParameter * (
float)blocksCard);
1071 int lastSize = blocksCard - firstSize;
1074 int lastProc =
hit_min( procsCard-1, firstSize );
1075 if ( procId > lastProc ) {
1082 if ( procId == lastProc ) {
1083 if ( lastSize == 0 ) {
1089 (*res).end = input.
end;
1090 (*res).stride = input.
stride;
1102 float* extraParameter,
1110 if ( procsCard < 2 && procId == 0 )
return 0;
1113 int firstSize = (int)ceilf(*extraParameter * (
float)blocksCard);
1115 int lastSize = blocksCard - firstSize;
1116 int lastProc =
hit_min( procsCard-1, firstSize );
1123 if ( tileInd >= firstSize )
return procsCard-1;
1131 if ( procsCard < 2 )
return blocksCard;
1134 int firstSize = (int)ceilf(*extraParameter * (
float)blocksCard);
1136 int lastSize = blocksCard - firstSize;
1138 int lastProc =
hit_min( procsCard-1, firstSize );
1142 return (lastSize > others) ? lastSize:others;
1148 if ( procsCard < 2 )
return blocksCard;
1151 int firstSize = (int)ceilf(*extraParameter * (
float)blocksCard);
1153 int lastSize = blocksCard - firstSize;
1155 int lastProc =
hit_min( procsCard-1, firstSize );
1159 return (lastSize < others) ? lastSize:others;
1166 if ( blocksCard < 1 )
return 0;
1169 if ( procsCard < 2 )
return 1;
1172 int firstSize = (int)ceilf(*extraParameter * (
float)blocksCard);
1175 if ( firstSize == 0 )
return 1;
1181 if ( firstSize == blocksCard )
return numActivesFirst;
1182 else return numActivesFirst + 1;
1187 int procId,
int procsCard,
int blocksCard,
float* extraParameter ) {
1205 if ( load < 0.0 || load > 1.0 ) {
1206 hit_errInternal( __FUNCTION__,
"Incorrect load parameter",
"", __FILE__, __LINE__);
1249 group.
rank[dim] = -1;
1266 float sumDimWeights = 0;
1267 for (i = 0; i < procsCard; i++)
1269 if (weights[i] < 0.0)
1270 {
hit_errInternal(__FUNCTION__,
"Weight input data is incorrect (check workload expressions)",
"",__FILE__,__LINE__);}
1272 {sumDimWeights += weights[i];}
1276 double sumWeights = 0;
1278 for (i = 0; i < procsCard; i++)
1279 sumWeights += weights[i];
1282 if (sumWeights == 0.0) sumWeights = 1.0;
1285 double floatElemDimProcess[procsCard];
1286 double remElemDimProcess[procsCard];
1287 int intElemDimProcess[procsCard];
1288 int sumIntElemDimProcess = 0;
1290 for (i = 0; i < procsCard; i++)
1293 floatElemDimProcess[i] = (weights[i] / sumWeights) * blocksCard;
1298 intElemDimProcess[i] = (int) floatElemDimProcess[i];
1302 remElemDimProcess[i] = floatElemDimProcess[i] - intElemDimProcess[i];
1304 sumIntElemDimProcess += intElemDimProcess[i];
1308 for (i = 0; i < (blocksCard - sumIntElemDimProcess); i++)
1310 double maxRemElemDimProcessValue = remElemDimProcess[0];
1311 int maxRemElemDimProcessPosit = 0;
1315 for (j = 0; j < procsCard; j++)
1317 if (remElemDimProcess[j] > maxRemElemDimProcessValue)
1319 maxRemElemDimProcessValue = remElemDimProcess[j];
1320 maxRemElemDimProcessPosit = j;
1324 intElemDimProcess[maxRemElemDimProcessPosit]++;
1328 remElemDimProcess[maxRemElemDimProcessPosit]--;
1333 for (i = 0; i < procsCard; i++)
1334 {result[i] = intElemDimProcess[i];}
1341 float* extraParameter,
1344 if ( blocksCard == 0 ) {
1351 int weightedDistRes[procsCard];
1355 if (weightedDistRes[procId] == 0.0)
1365 int cumSumIntElemDimProcess = 0;
1366 for (j = 0; j < procId ; j++)
1367 cumSumIntElemDimProcess += weightedDistRes[j];
1375 (*res).end = (*res).begin + ((weightedDistRes[procId] - 1) * input.
stride);
1378 (*res).stride = input.
stride;
1386 float* extraParameter,
1399 int weightedDistRes[procsCard];
1409 int cumSumIntElemDimTARGETProcess = ((ind - input.
begin) / input.
stride);
1412 int cumSumIntElemDimProcess = 0;
1413 for (i = 0; i < procsCard; i++){
1414 cumSumIntElemDimProcess += weightedDistRes[i];
1415 if (cumSumIntElemDimProcess >= cumSumIntElemDimTARGETProcess)
break;
1419 begin = input.
begin + (cumSumIntElemDimProcess * input.
stride);
1420 end = begin + ((weightedDistRes[i] - 1) * input.
stride);
1421 if (! ((ind >= begin) && (ind <= end)))
1422 printf(
"Error @ %s:%i: index %i not within the bounds of block (%i, %i, %i) for processor %i", __FILE__,__LINE__, ind, input.
begin, input.
end, input.
stride, i);
1429 int procId,
int procsCard,
int blocksCard,
float* extraParameter ) {
1438 int actives =
hit_min( blocksCard, procsCard );
1449 int weightedDistRes[procsCard];
1453 int maxCard = weightedDistRes[0];
1454 for (i = 0; i < procsCard; i++)
1455 {
if (weightedDistRes[i] > maxCard) maxCard = weightedDistRes[i];}
1461 int weightedDistRes[procsCard];
1465 int minCard = weightedDistRes[0];
1466 for (i = 0; i < procsCard; i++)
1467 {
if (weightedDistRes[i] < minCard) minCard = weightedDistRes[i];}
1473 int weightedDistRes[procsCard];
1477 int numDimActiveLayProcesses = 0;
1478 for (i = 0; i < procsCard; i++)
1479 {
if (weightedDistRes[i] != 0) numDimActiveLayProcesses++;}
1480 return numDimActiveLayProcesses;
1524 group.
rank[dim] = -1;
1578 group.
rank[dim] = -1;
1627 if(!lay.
active)
return newShp;
1654 if(!lay.
active)
return newShp;
1681 if(!lay.
active)
return newShp;
1708 if(!lay.
active)
return newShp;
1739 float* extraParameter,
1750 if ( dim >= topoNumDims ) {
1755 int procId = proc.
rank[dim];
1758 if ( procId ==
HIT_RANK_NULL || procId < 0 || procId >= card[dim] ) {
1764 int procsCard = card[dim];
1770 tmpActive = sigFunctionRestricted(procId, procsCard, blocksCard,
1776 tmpActive = sigFunctionGeneric(procId, procsCard, blocksCard,
1781 active = active && tmpActive;
1803 self.info.layoutSig.signatureGenericF,
1804 self.info.layoutSig.signatureRestrictedF,
1805 self.info.layoutSig.extraParameter,
1806 self.info.layoutSig.restrictToDim
1824 if ( d == dim && d >=
self.topo.numDims ) {
1826 if ( shift == 0 ||
self.wrap[d] ==
HIT_WRAPPED ) {
1837 else if ( d != dim ) {
1848 if (newProcId ==
HIT_RANK_NULL || newProcId<0 || newProcId>=
self.topo.card[d]) {
1855 &&
self.info.layoutSig.restrictToDim == d ) {
1856 tmpActive =
self.info.layoutSig.signatureRestrictedF( newProcId,
1859 self.info.layoutSig.extraParameter,
1865 tmpActive =
self.info.layoutSig.signatureGenericF( newProcId,
1868 self.info.layoutSig.extraParameter,
1893 float* extraParameter =
self.info.layoutSig.extraParameter;
1894 int restrictedDim =
self.info.layoutSig.restrictToDim;
1900 int procsCard =
self.topo.card[dim];
1904 if ( restrictedDim == dim )
1905 active.
rank[dim] =
self.info.layoutSig.ranksRestrictedF( topoActiveMode, ranks.
rank[dim], procsCard, blocksCard, extraParameter );
1907 active.
rank[dim] =
self.info.layoutSig.ranksGenericF( topoActiveMode, ranks.
rank[dim], procsCard, blocksCard, extraParameter );
1925 linear = linear + acumCard * ranks.
rank[dim];
1946 ranks.
rank[dim] = linear / acumCard[dim];
1947 linear %= acumCard[dim];
1957 int procsCard =
self.topo.card[dim];
1959 float* extraParameter =
self.info.layoutSig.extraParameter;
1960 int numActives =
self.numActives[ dim ];
1961 int restrictedDim =
self.info.layoutSig.restrictToDim;
1964 int shiftedActive = source + shift;
1966 if ( shiftedActive < 0 || shiftedActive >= numActives )
return HIT_RANK_NULL;
1969 shiftedActive = shiftedActive % numActives;
1970 if ( shiftedActive < 0 ) shiftedActive = shiftedActive + numActives;
1974 if ( restrictedDim == dim )
1984 int procsCard =
self.topo.card[dim];
1986 float* extraParameter =
self.info.layoutSig.extraParameter;
1987 int restrictedDim =
self.info.layoutSig.restrictToDim;
1991 if ( restrictedDim == dim )
2002 int procId =
self.topo.self.rank[dim];
2004 return neigh - procId;
2017 if(dim >=
self.topo.numDims ) {
2018 if (
self.wrap[dim] )
return self.topo.self;
2049 if(dim >=
self.topo.numDims ) {
2050 if (
self.wrap[dim] )
return self.topo.self;
2058 neighbor.
rank[d] =
self.topo.self.rank[d];
2087 float* extraParameter,
2136 else if ( dim == restrictToDim )
2137 res.
numActives[dim] = activesRestrictedF( topo.
card[dim], blocksCard, extraParameter);
2140 res.
numActives[dim] = activesGenericF( topo.
card[dim], blocksCard, extraParameter);
2158 signatureRestrictedF,
2170 res.
maxSize[dim] = blocksCard;
2171 res.
minSize[dim] = blocksCard;
2174 else if ( dim == restrictToDim ) {
2175 res.
maxSize[dim] = maxCardRestrictedF( topo.
card[dim], blocksCard, extraParameter);
2176 res.
minSize[dim] = minCardRestrictedF( topo.
card[dim], blocksCard, extraParameter);
2180 res.
maxSize[dim] = maxCardGenericF( topo.
card[dim], blocksCard, extraParameter);
2181 res.
minSize[dim] = minCardGenericF( topo.
card[dim], blocksCard, extraParameter);
2189 for (dim=0; dim<topo.
numDims; dim++) {
2201 printf(
"Not all processes are active -> mpi communicator split\n");
2323 hit_warnInternal(__FUNCTION__,
"Sorry. Implementation of Group topologies for signature layouts is not yey implemented.",
"", __FILE__, __LINE__ );
2329 hit_warnInternal(__FUNCTION__,
"Group Id does not exist",
"", __FILE__, __LINE__ );
2353 if ( groupId == lay.
group ) {
2457 int * elements = NULL;
2466 elements[ nElements -1 ] = i;
2471 (*nEls) = nElements;
2486 if(processor < sum)
return i;
2498 double totWeight = 0.0;
2516 nProcs *= topo.
card[i];
2523 int numProcs[nElements];
2524 double normWeight[nElements];
2525 double normWeightPerGroup[nElements];
2529 setbuf(stdout, NULL);
2537 for (i=0; i<nElements; i++) {
2538 if (weights[i]<0.0){
2539 hit_errInternal(__FUNCTION__,
"Weight input data is incorrect (check workload expressions)",
"",__FILE__,__LINE__);
2546 for (i=0; i<nElements; i++) totWeight = totWeight + weights[i];
2548 printf(
"TotWeight-A %lf\n", totWeight);
2552 if (totWeight == 0.0) totWeight = 1.0;
2554 printf(
"TotWeight-B %lf\n", totWeight);
2558 for (i=0; i<nElements; i++) {
2559 normWeight[i] = nProcs * weights[i] / totWeight;
2560 numProcs[i] = (int)normWeight[i];
2561 normWeight[i] = normWeight[i] - numProcs[i];
2562 totProcs = totProcs + numProcs[i];
2564 printf(
"CTRL numProcs[%i] = %d . %lf\n", i, numProcs[i],normWeight[i]);
2565 normW = normW + numProcs[i] + normWeight[i];
2570 printf(
"CTRL Total norm. weight %lf\n", normW);
2574 for (i=0; i<(nProcs-totProcs); i++) {
2576 double maxWeight = normWeight[0];
2579 for (j=1; j<nElements; j++) {
2580 if (normWeight[j]>maxWeight) {
2581 maxWeight = normWeight[j];
2586 normWeight[maxPos]=normWeight[maxPos]-1;
2590 for (i=0;i<nElements;i++) {
2591 printf(
"CTRL numProcs[%i] = %d . %lf\n", i, numProcs[i],normWeight[i]);
2598 for (i=0; i<nElements; i++) {
2599 if ( numProcs[i] > 0 ) {
2601 proc = proc + numProcs[i];
2605 normWeightPerGroup[numGroups]=normWeight[i];
2611 for (i=0; i<nElements; i++) {
2612 if (numProcs[i]==0) {
2614 double minWeight = normWeightPerGroup[0];
2617 for (j=1; j<numGroups; j++) {
2618 if ( normWeightPerGroup[j] < minWeight) {
2619 minWeight = normWeightPerGroup[j];
2624 normWeightPerGroup[minPos] = normWeightPerGroup[minPos] + normWeight[i];
2626 printf(
"Block %d, assigned to group %d, new normWeight %lf\n",i,minPos,normWeightPerGroup[minPos]);
2642 leaderRanks.
rank[0] = leaderId;
2670 nProcs *= topo.
card[i];
2675 nElements = hit_shapeCard( elements );
2682 for (i=0; i<nElements; i++) {
2683 if (weights[i]<0.0){
2684 hit_errInternal(__FUNCTION__,
"Weight input data is incorrect (check workload expressions)",
"",__FILE__,__LINE__);
2691 for (i=0; i<nElements; i++) totWeight += weights[i];
2694 if (totWeight == 0.0) totWeight = 1.0;
2697 avgWeight = totWeight /
nProcs;
2700 printf(
"[%d] plugContiguous CTRL totalWeight: %lf, nprocs: %d, avg: %lf\n",
hit_Rank, totWeight, nProcs, avgWeight );
2704 double localWeight = 0.0;
2705 double acumWeight = 0.0;
2706 int localElements = 0;
2707 int acumElements = 0;
2710 for(i=0; i<nElements; i++) {
2712 localWeight = localWeight + weights[i];
2715 if ( acumWeight + localWeight >= avgWeight * (proc+1) ) {
2727 acumWeight += localWeight;
2728 acumElements += localElements;
2734 if ( localWeight != 0.0 ) {
2745 acumWeight += localWeight;
2746 acumElements += localElements;
2751 for ( ; proc <
nProcs; proc++ ) {
2820 MPI_Bcast(cards, 2, MPI_INT, 0, comm);
2822 MPI_Bcast(cards, 2, MPI_INT, 0, comm);
2842 int nbits = cards[0] * cards[1];
2843 int ndata = (int)(hit_bitmapShapeIndex(nbits) + (hit_bitmapShapeOffset(nbits)==0 ? 0 : 1));
2845 ok = MPI_Bcast(
hit_bShapeData(*shape),ndata,HIT_BITMAP_COMM_TYPE,0,comm);
2889 for(i=0;i<nactives;i++){
2895 for(j=part_i.
begin; j<=part_i.
end; j++){
2923 MPI_Bcast(cards, 2, MPI_INT, 0, comm);
2924 MPI_Bcast(&nz, 1, MPI_INT, 0, comm);
2926 MPI_Bcast(cards, 2, MPI_INT, 0, comm);
2927 MPI_Bcast(&nz, 1, MPI_INT, 0, comm);
2947 ok = MPI_Bcast(
hit_cShapeXadj(*shape), cards[0]+1, MPI_INT, 0, comm);
2994 for(i=0;i<procsCard;i++){
3000 for(j=part_i.
begin; j<=part_i.
end; j++){
3047 for(i=0;i<procsCard;i++){
3053 for(j=part_i.
begin; j<=part_i.
end; j++){
#define HIT_LAY_RANKS_TOPO_TO_ACTIVE
int hit_layout_plug_layBlocksBalance_SigInv(int procId, int procsCard, int blocksCard, float *extraParameter, HitSig input, int ind)
#define hit_cShapeAdjncy(shape)
#define hit_shape(nd,...)
HitLayout hit_layout_plug_layCyclic(HitTopology topo, HitShape shape, int dim)
HitLayout HIT_LAYOUT_NULL
#define hit_layShape(lay)
int hit_layDimOwner(HitLayout lay, int dim, int ind)
HitLayoutSig HIT_LAYOUTSIG_NULL
int(* HitLayoutRanksFunction)(char topoActiveMode, int procId, int procsCard, int blocksCard, float *extraParam)
HitShape hit_bShapeSelectRows(HitShape shape, int nNames, int *names)
HitLayoutSignatureFunction signatureGenericF
int hit_layout_plug_layMinBlocks_numActives(int procsCard, int blocksCard, float *extraParameter)
HitLayoutSignatureInvFunction signatureInvRestrictedF
HitShape hit_bShapeSelect(HitShape shape, int nvertices, int *vertices)
#define HIT_LAYOUT_MINBLOCKS
HitLayoutRanksFunction ranksGenericF
#define HIT_GROUP_NULL_STATIC
int hit_layout_plug_layMinBlocks_maxCard(int procsCard, int blocksCard, float *extraParameter)
HitPTopology * hit_ptopSplit(HitPTopology *in, int group)
int hit_layout_plug_layAllInOne_ranks(char topoActiveMode, int procId, int procsCard, int blocksCard, float *extraParameter)
int perform_weighted_distribution(int procsCard, int blocksCard, float *weights, int *result)
int hit_layNeighborDistance(HitLayout self, int dim, int shift)
HitLayoutSignatureFunction signatureRestrictedF
int hit_topRankInternal(HitTopology topo, HitRanks ranks)
void hit_lay_elements(HitLayout layout, int group, int **elements, int *nElements)
#define HIT_LAYOUT_LIST_FIRST
#define hit_shapeDimsSet(shape, value)
#define hit_bShapeCard(shape, dim)
int hit_layout_plug_layBlocksL_Sig(int procId, int procsCard, int blocksCard, float *extraParameter, HitSig input, HitSig *res)
#define hit_lgr_numGroups(lay)
HitLayout hit_layout_plug_layIndependentLB(HitTopology topo, HitShape elements, const double *weights)
#define HIT_LAYOUT_NULL_STATIC
int hit_layout_plug_layBlocks_SigInv(int procId, int procsCard, int blocksCard, float *extraParameter, HitSig input, int ind)
int hit_layout_plug_layCopy_maxCard(int procsCard, int blocksCard, float *extraParameter)
HitShape hit_csrShapeMatrix(int n, int m, int nz)
int hit_layout_plug_layBlocksBalance_minCard(int procsCard, int blocksCard, float *extraParameter)
int hit_layout_plug_layCopy_Sig(int procId, int procsCard, int blocksCard, float *extraParameter, HitSig input, HitSig *res)
#define hit_bShapeNameList(shape, dim)
HitShape hit_layMaxShape(HitLayout lay)
#define HIT_LAYOUT_BLOCKSX
int hit_layout_plug_layWeighted_minCard(int procsCard, int blocksCard, float *extraParameter)
#define HIT_LAYOUT_BLOCKSL
HitTopology hit_layGroupTopo(HitLayout lay, int groupId)
#define hit_calloc(ptr, type, nmemb)
#define HIT_LAYOUT_DIMWEIGHTED
#define hit_lgr_groupNProcs(lay, group)
void hit_layUnwrapNeighbors(HitLayout *lay)
int hit_layout_plug_layBlocksBalance_numActives(int procsCard, int blocksCard, float *extraParameter)
int hit_layout_plug_layWeighted_Sig(int procId, int procsCard, int blocksCard, float *extraParameter, HitSig input, HitSig *res)
int hit_layout_plug_layMinBlocks_minCard(int procsCard, int blocksCard, float *extraParameter)
#define hit_ranksCmp(a, b)
#define HIT_LAYOUT_ALLINLEADER
#define hit_bShapeData(shape)
#define HIT_LAYOUT_BLOCKS
#define hit_cShapeCard(shape, dim)
#define hit_sigIn(sig, ind)
void hit_layout_list_addGroup(HitLayout *lay, int leader, int np)
HitPTopology * hit_ptopDup(HitPTopology *in)
HitPTopology * pTopology[HIT_MAXDIMS+1]
int hit_layActiveRanksId(HitLayout lay, HitRanks ranks)
HitShape hit_layDimMaxShape(HitLayout lay, int dim)
int hit_layout_plug_layCyclic_Sig(int procId, int procsCard, int blocksCard, float *extraParameter, HitSig input, HitSig *res)
int hit_layout_plug_layBlocksBalance_ranks(char topoActiveMode, int procId, int procsCard, int blocksCard, float *extraParameter)
int(* HitLayoutSignatureNumActivesFunction)(int procsCard, int blocksCard, float *extraParameter)
int hit_layout_plug_layWeighted_SigInv(int procId, int procsCard, int blocksCard, float *extraParameter, HitSig input, int ind)
#define hit_laySelfRanksDim(lay, dim)
HitShape hit_layout_wrapperOtherShape(HitLayout self, HitRanks ranks)
HitLayout hit_layout_plug_layInLeader(HitTopology topo, HitShape shape)
int hit_layout_plug_layMinBlocks_SigInv(int procId, int procsCard, int blocksCard, float *extraParameter, HitSig input, int ind)
#define HIT_GROUP_ID_NULL
#define hit_layNumDims(lay)
int hit_layout_plug_layBlocksF_Sig(int procId, int procsCard, int blocksCard, float *extraParameter, HitSig input, HitSig *res)
int hit_layNeighborFrom(HitLayout self, int source, int dim, int shift)
#define HIT_LAYOUT_BLOCKSF
double successorsLoad[HIT_MAXDIMS]
HitRanks hit_layTransformRanks(char topoActiveMode, HitLayout lay, HitRanks ranks)
int hit_layout_plug_layRegular_maxCard(int procsCard, int blocksCard, float *extraParameter)
int hit_layout_plug_layBlocksX_Sig(int procId, int procsCard, int blocksCard, HitSig input, HitSig *res)
void hit_cShapeBcastInternal(HitShape *shape, HitTopology topo)
#define hit_shapeDims(shape)
HitLayout hit_layout_plug_layBlocksBalance(HitTopology topo, HitShape shape, int dim, float load)
#define hit_cShapeXadj(shape)
#define hit_mpiTestError(ok, cad)
int hit_layout_plug_layMinBlocks_ranks(char topoActiveMode, int procId, int procsCard, int blocksCard, float *extraParameter)
#define HIT_LAYOUT_LIST_CLASS
#define hit_cShapeNvertices(shape)
int(* HitLayoutSignatureMinCardFunction)(int procsCard, int blocksCard, float *extraParameter)
#define HIT_LAYOUT_DIMBLOCKS
HitLayoutList HIT_LAYOUTLIST_NULL
HitLayout hit_layout_wrapper(HitTopology topo, HitShape shape, HitLayoutSignatureFunction signatureGenericF, HitLayoutSignatureInvFunction signatureInvGenericF, HitLayoutSignatureFunction signatureRestrictedF, HitLayoutSignatureInvFunction signatureInvRestrictedF, HitLayoutRanksFunction ranksGenericF, HitLayoutRanksFunction ranksRestrictedF, HitLayoutSignatureMaxCardFunction maxCardGenericF, HitLayoutSignatureMaxCardFunction maxCardRestrictedF, HitLayoutSignatureMinCardFunction minCardGenericF, HitLayoutSignatureMinCardFunction minCardRestrictedF, HitLayoutSignatureNumActivesFunction activesGenericF, HitLayoutSignatureNumActivesFunction activesRestrictedF, float *extraParameter, int restrictToDim)
#define hit_cShapeNameList(shape, dim)
HitRanks hit_layActiveIdRanks(HitLayout lay, int id)
HitLayout hit_layout_plug_layBlocks(HitTopology topo, HitShape shape)
int hit_layout_plug_layRegular_numActives(int procsCard, int blocksCard, float *extraParameter)
HitLayout hit_layout_plug_laySparseRows(HitTopology topo, HitShape *shape)
int hit_layout_plug_layBlocks_Sig(int procId, int procsCard, int blocksCard, float *extraParameter, HitSig input, HitSig *res)
int hit_layout_plug_layRegular_minCard(int procsCard, int blocksCard, float *extraParameter)
#define hit_cShapeNZElems(shape)
#define HIT_LAY_RANKS_ACTIVE_TO_TOPO
void hit_layWrapNeighbors(HitLayout *lay)
void hit_ptopFree(HitPTopology **in)
int hit_layout_plug_layRegularF_ranks(char topoActiveMode, int procId, int procsCard, int blocksCard, float *extraParameter)
HitLayout hit_layout_plug_layMinBlocks(HitTopology topo, HitShape shape, int minElems)
int hit_layout_plug_layAllInOne_Sig(int procId, int procsCard, int blocksCard, float *extraParameter, HitSig input, HitSig *res)
HitShape hit_layDimMinShape(HitLayout lay, int dim)
HitShape hit_bitmapShapeMatrix(int n, int m)
#define HIT_TOPOLOGY_PLAIN
#define hit_layImActive(lay)
HitLayout hit_layout_plug_layBlocksX(HitTopology topo, HitShape shape)
int hit_layout_plug_layAllInOne_SigInv(int procId, int procsCard, int blocksCard, float *extraParameter, HitSig input, int ind)
HitLayout hit_layout_plug_layContiguous(HitTopology topo, HitShape elements, const double *weights)
#define hit_bShapeNvertices(shape)
HitPTopology * pTopologyGroup
#define HIT_LAYOUT_BLOCKS_BALANCE
int hit_layout_plug_layCopy_SigInv(int procId, int procsCard, int blocksCard, float *extraParameter, HitSig input, int ind)
#define HIT_LAYOUT_CONTIGUOUS
void hit_layWrapNeighborsDim(HitLayout *lay, int dim)
int hit_topCard(HitTopology topo)
int hit_layout_plug_layCyclic_SigInv(int procId, int procsCard, int blocksCard, float *extraParameter, HitSig input, int ind)
HitLayout hit_layout_plug_layBlocksL(HitTopology topo, HitShape shape)
int hit_layout_plug_layWeighted_numActives(int procsCard, int blocksCard, float *extraParameter)
HitLayout hit_layout_plug_layDimWeighted(HitTopology topo, HitShape shape, int restrictDim, float *weights)
#define hit_shapeSigCard(shape, dim)
int hit_layout_plug_layMinBlocks_Sig(int procId, int procsCard, int blocksCard, float *extraParameter, HitSig input, HitSig *res)
#define HIT_LAYOUT_WEIGHTED
int hit_layout_plug_layCopy_minCard(int procsCard, int blocksCard, float *extraParameter)
void hit_layFree(HitLayout lay)
HitShape hit_cShapeSelectRows(HitShape shape, int n, int *names)
#define HIT_SIGLAYOUT_NULL_STATIC
int hit_layNeighborFromTopoRank(HitLayout self, int source, int dim, int shift)
int hit_layout_wrapperShape(int topoNumDims, HitRanks proc, int card[HIT_MAXDIMS], HitShape shape, HitShape *newShape, HitLayoutSignatureFunction sigFunctionGeneric, HitLayoutSignatureFunction sigFunctionRestricted, float *extraParameter, int restrictToDim)
HitLayoutSignatureInvFunction signatureInvGenericF
#define HIT_LAYOUTLIST_NULL_STATIC
#define HIT_LAYOUT_INDEPENDENTLB
#define hit_realloc(ptr, type, nmemb)
int hit_layout_plug_layRegularContiguos_ranks(char topoActiveMode, int procId, int procsCard, int blocksCard, float *extraParameter)
HitShape hit_layMinShape(HitLayout lay)
HitLayout hit_layout_plug_layWeighted(HitTopology topo, HitShape shape, float *weights)
#define HIT_LAYOUT_CYCLIC
int hit_layout_plug_layAllInOne_numActives(int procsCard, int blocksCard, float *extraParameter)
#define HIT_LAYOUT_SIG_CLASS
int hit_layout_plug_layWeighted_maxCard(int procsCard, int blocksCard, float *extraParameter)
HitShape hit_layout_wrapperNeighborShape(HitLayout self, int dim, int shift)
int(* HitLayoutSignatureFunction)(int procId, int procsCard, int blocksCard, float *extraParam, HitSig input, HitSig *res)
HitLayout hit_layout_plug_layBlocksF(HitTopology topo, HitShape shape)
int hit_layNumActives(HitLayout lay)
int hit_layout_plug_layBlocksBalance_Sig(int procId, int procsCard, int blocksCard, float *extraParameter, HitSig input, HitSig *res)
double predecessorsLoad[HIT_MAXDIMS]
HitRanks hit_layNeighborRanksFrom(HitLayout self, HitRanks source, int dim, int shift)
int hit_layout_plug_layRegularL_ranks(char topoActiveMode, int procId, int procsCard, int blocksCard, float *extraParameter)
HitTopology HIT_TOPOLOGY_NULL
#define hit_topSelfRankInternal(topo)
#define hit_warnInternal(routine, text, extraParam, file, numLine)
int numActives[HIT_MAXDIMS]
#define hit_shapeSig(shape, dim)
#define hit_layout_class(lay)
int(* HitLayoutSignatureMaxCardFunction)(int procsCard, int blocksCard, float *extraParameter)
HitTopology hit_layActivesTopology(HitLayout lay)
HitLayoutRanksFunction ranksRestrictedF
void hit_shapeFree(HitShape s)
#define hit_errInternal(routine, text, extraParam, file, numLine)
#define hit_layDimNeighbor(lay, dim, shift)
HitLayout hit_layout_plug_layDimBlocks(HitTopology topo, HitShape shape, int restrictDim)
HitRanks hit_layNeighborRanks(HitLayout self, int dim, int shift)
void hit_bShapeBcastInternal(HitShape *shape, HitTopology topo)
int hit_layout_plug_layWeighted_ranks(char topoActiveMode, int procId, int procsCard, int blocksCard, float *extraParameter)
HitLayout hit_layout_plug_layBitmap(HitTopology topo, HitShape *shape)
void hit_layUnwrapNeighborsDim(HitLayout *lay, int dim)
int(* HitLayoutSignatureInvFunction)(int procId, int procsCard, int blocksCard, float *extraParam, HitSig input, int ind)
HitLayout hit_layout_plug_laySparseBitmapRows(HitTopology topo, HitShape *shapeP)
int hit_lay_procGroup(HitLayout layout, int processor)
int hit_lsig_vfor_index[HIT_MAXDIMS]
int hit_layout_plug_layBlocksBalance_maxCard(int procsCard, int blocksCard, float *extraParameter)
void hit_layout_list_initGroups(HitLayout *lay, int numElementsTotal)