Hitmap 1.3
 All Data Structures Namespaces Files Functions Variables Typedefs Friends Macros Groups Pages
hit_layout.h
Go to the documentation of this file.
1 
15 /*
16  * <license>
17  *
18  * Hitmap v1.2
19  *
20  * This software is provided to enhance knowledge and encourage progress in the scientific
21  * community. It should be used only for research and educational purposes. Any reproduction
22  * or use for commercial purpose, public redistribution, in source or binary forms, with or
23  * without modifications, is NOT ALLOWED without the previous authorization of the copyright
24  * holder. The origin of this software must not be misrepresented; you must not claim that you
25  * wrote the original software. If you use this software for any purpose (e.g. publication),
26  * a reference to the software package and the authors must be included.
27  *
28  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER AND CONTRIBUTORS "AS IS" AND ANY
29  * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
30  * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
31  * THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
32  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
33  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
34  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
35  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
36  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
37  *
38  * Copyright (c) 2007-2015, Trasgo Group, Universidad de Valladolid.
39  * All rights reserved.
40  *
41  * More information on http://trasgo.infor.uva.es/
42  *
43  * </license>
44 */
45 
46 #ifndef _HitLayout_
47 #define _HitLayout_
48 
49 #include <stdio.h>
50 #include <stdlib.h>
51 
52 #include "hit_shape.h"
53 #include "hit_topology.h"
54 #include "hit_error.h"
55 
56 
57 #ifdef __cplusplus
58  extern "C" {
59 #endif
60 /* 1. Hit SIGNATURE LAYOUT */
61 
62 /* 1.1. TYPES FOR FUNCTION POINTERS TO LAYOUT DEFINITIONS */
73 typedef int (*HitLayoutSignatureFunction)( int procId,
74  int procsCard,
75  int blocksCard,
76  float* extraParam,
77  HitSig input,
78  HitSig *res );
79 
89 typedef int (*HitLayoutSignatureInvFunction)( int procId,
90  int procsCard,
91  int blocksCard,
92  float* extraParam,
93  HitSig input,
94  int ind );
95 
104 #define HIT_LAY_RANKS_ACTIVE_TO_TOPO 0
105 #define HIT_LAY_RANKS_TOPO_TO_ACTIVE 1
106 typedef int (*HitLayoutRanksFunction)( char topoActiveMode,
107  int procId,
108  int procsCard,
109  int blocksCard,
110  float* extraParam );
111 
119 typedef int (*HitLayoutSignatureMaxCardFunction)( int procsCard,
120  int blocksCard,
121  float* extraParameter );
122 
130 typedef int (*HitLayoutSignatureMinCardFunction)( int procsCard,
131  int blocksCard,
132  float* extraParameter );
133 
141 typedef int (*HitLayoutSignatureNumActivesFunction)( int procsCard,
142  int blocksCard,
143  float* extraParameter );
144 
145 
146 /* 1.2. STRUCTURE DEFINITION */
155 typedef struct HitLayoutSig {
156 
164  float* extraParameter;
167 } HitLayoutSig;
168 
169 /* 1.3. NULL CONSTANTS */
173 #define HIT_LAYOUT_NODIM -1
174 
180 //#define HIT_SIGLAYOUT_NULL_STATIC {NULL, NULL, NULL, NULL, NULL, NULL, 0.0, HIT_LAYOUT_NODIM}
181 #define HIT_SIGLAYOUT_NULL_STATIC {NULL, NULL, NULL, NULL, NULL, NULL, NULL, HIT_LAYOUT_NODIM}
182 
183 /* 1.4. CONSTANTS FOR NO-WRAPPED AND WRAPPED (PERIODIC) SIGNATURE LAYOUTS */
187 #define HIT_NOWRAPPED 0
188 
191 #define HIT_WRAPPED 1
192 
193 
194 
195 /* 2. Hit LIST LAYOUT */
196 /* 2.1. GROUP STRUCTURE DEFINITION */
201 typedef struct {
202  int leader;
203  int numProcs;
204 } HitGroup;
205 
206 /* 2.2 GROUP NULL VALUE */
210 extern HitGroup HIT_GROUP_NULL;
212 #define HIT_GROUP_NULL_STATIC {0, 0}
213 
214 /* 2.3. LAYOUT LIST STRUCTURE DEFINITION */
223 typedef struct {
224  int numGroups;
231 } HitLayoutList;
232 
233 /* 2.4. LAYOUT LIST NULL VALUE */
239 #define HIT_LAYOUTLIST_NULL_STATIC {0, NULL, 0, NULL, 0, 0, 0}
240 
241 
242 /* 3. Hit LAYOUT UNION STRUCTURE */
243 /* 3.1. STRUCTURE DEFINITION */
250 typedef struct HitLayout {
251 
252  int type;
254  /* TOPOLOGY AND VIRTUAL PROCESSOR NETWORK INFORMATION */
259  /* DATA FOR THIS VIRTUAL PROCESSOR */
263  int active;
265  // My group leader
266  int group;
267  char leader;
270  /* DATA FOR THIS VIRTUAL PROCESSOR */
273  /* ORIGINAL SHAPE, COMMON FOR SIGs AND LISTSs */
278  HitPTopology *pTopology[ HIT_MAXDIMS+1 ];
279  HitPTopology *pTopologyGroup;
280 
281  union {
282  /* SUPPORT FOR SIGNATURE LAYOUTS */
284  /* SUPPORT FOR GROUP LAYOUTS */
286  } info ;
287 
288  /* LOAD INFORMATION */
291  double ownLoad;
292 } HitLayout;
293 
294 /* 3.2. NULL CONSTANT */
300 #define HIT_LAYOUT_NULL_STATIC {0, HIT_TOPOLOGY_NULL_STATIC, { HIT_NOWRAPPED, HIT_NOWRAPPED, HIT_NOWRAPPED, HIT_NOWRAPPED }, { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, 0, HIT_GROUP_ID_NULL, 0, HIT_RANKS_NULL_STATIC, HIT_SHAPE_NULL_STATIC, HIT_SHAPE_NULL_STATIC, {NULL, NULL, NULL, NULL, NULL}, NULL, {HIT_SIGLAYOUT_NULL_STATIC}, { 0.0, 0.0, 0.0, 0.0 }, { 0.0, 0.0, 0.0, 0.0 }, 0.0 }
301 
302 /* 3.3. CONSTANTS FOR CLASSES AND TYPES OF LAYOUTS */
306 #define HIT_LAYOUT_SIG_CLASS 1
307 
311 #define HIT_LAYOUT_LIST_CLASS 2
312 
316 #define HIT_LAYOUT_BLOCKS 1
317 
321 #define HIT_LAYOUT_DIMBLOCKS 2
322 
326 #define HIT_LAYOUT_MINBLOCKS 3
327 
328 
329 
333 #define HIT_LAYOUT_BLOCKSX 5
334 
338 #define HIT_LAYOUT_BLOCKSF 6
339 
343 #define HIT_LAYOUT_BLOCKSL 7
344 
348 #define HIT_LAYOUT_ALLINLEADER 5
349 
353 #define HIT_LAYOUT_WEIGHTED 8
354 
358 #define HIT_LAYOUT_DIMWEIGHTED 9
359 
363 #define HIT_LAYOUT_CYCLIC 10
364 
365 
369 #define HIT_LAYOUT_BLOCKS_BALANCE 20
370 
371 
372 
376 #define HIT_LAYOUT_LIST_FIRST 100
377 
381 #define HIT_LAYOUT_CONTIGUOUS (HIT_LAYOUT_LIST_FIRST+1)
382 
386 #define HIT_LAYOUT_INDEPENDENTLB (HIT_LAYOUT_LIST_FIRST+2)
387 
391 #define HIT_LAYOUT_METIS (HIT_LAYOUT_LIST_FIRST+3)
392 
398 #define hit_layout_class(lay) (((lay).type<HIT_LAYOUT_LIST_FIRST)?(HIT_LAYOUT_SIG_CLASS):(HIT_LAYOUT_LIST_CLASS))
399 
400 
401 
402 
403 
404 /* 3.4 GROUP ID AND LEADER NULL VALUES */
408 #define HIT_GROUP_ID_NULL -1
409 
410 
411 /* 4. LAYOUT CONSTRUCTORS AND PREDEFINED LAYOUT FUNCTIONS */
415 #define hit_layout( name, topo, ...) hit_layout_##name( topo, __VA_ARGS__ )
416 
417 
418 /* 4.1 LAYOUT SIGNATURE CREATION FUNCTIONS */
419 /* 4.1.1 BLOCKS */
428 
439 
450 
451 /* 4.1.2 BLOCKS X */
456 
457 /* 4.1.3 BLOCKSF */
467 
468 /* 4.1.3 BLOCKSL */
478 
479 /* 4.1.4 CYCLIC */
489 
490 /* 4.1.5 ALL IN LEADER */
498 
499 /* 4.1.6 NOT IN LEADER */
509 
510 
511 /* 4.1.7 WEIGHTED */
516 
517 
518 /* 4.1.7 WEIGHTED WITH LOAD BALANCE IN ONE DIMENSION */
522 HitLayout hit_layout_plug_layDimWeighted(HitTopology topo, HitShape shape, int restrictDim, float* weights);
523 
524 /* 4.1.10 BLOCKS WITH LOAD BALANCE IN ONE DIMENSION */
539 
540 
541 
542 /* 4.2 LIST LAYOUT CREATION FUNCTIONS */
543 /* 4.2.1 SCHEDULING FOR CONTIGUOUS TASKS*/
552 HitLayout hit_layout_plug_layContiguous(HitTopology topo, HitShape elements, const double *weights);
553 
554 /* 4.2.2 GENERIC SCHEDULING FOR INDEPENDENT TASKS: LOAD BALANCING */
563 HitLayout hit_layout_plug_layIndependentLB(HitTopology topo, HitShape elements, const double *weights);
564 
565 /* 4.2.3 METIS GRAPH PARTITION */
573 
581 
589 
598 
599 
600 /* 5. ACCESS TO SIGNATURE AND LIST LAYOUTS */
601 /* 5.1. ACCESS TO BASIC STATIC INFORMACION */
605 #define hit_layTopology( lay ) ((lay).topo)
606 
611 
615 #define hit_layGroup( lay ) ((lay).group)
616 
620 HitTopology hit_layGroupTopo( HitLayout lay, int groupId );
621 
625 #define hit_layLeader( lay ) ((lay).leaderRanks)
626 
630 #define hit_layLoad( lay ) ((lay).ownLoad)
631 #define hit_layPredLoad( lay, dim ) ((lay).predecessorsLoad[dim])
632 #define hit_laySuccLoad( lay, dim ) ((lay).successorsLoad[dim])
633 
637 //#define hit_layActive(lay) ((lay).active)
638 
642 #define hit_layFullShape(lay) ((lay).origShape)
643 
644 
645 /* 6. ACCESS TO SIGNATURE LAYOUT */
646 /* 6.1. ACCESS TO BASIC STATIC INFORMACION */
650 #define hit_layShape(lay) ((lay).shape)
651 
655 #define hit_layNumDims(lay) (hit_shapeDims((lay).shape))
656 
660 #define hit_layDimMaxSize(lay, dim) ((lay).maxSize[dim])
661 
665 #define hit_layDimNumActives(lay, dim) ((lay).numActives[dim])
666 
671 
675 #define hit_layOnDim(lay) ((lay).info.layoutSig.restrictToDim)
676 
680 #define hit_layDimSig( lay, dim ) hit_shapeSig( (lay).shape, dim )
681 
685 #define hit_layDimCard( lay, dim ) hit_sigCard( hit_layDimSig(lay,dim) )
686 
690 #define hit_layCard( lay ) hit_shapeCard( (lay).shape )
691 
695 #define hit_layDimBegin( lay, dim ) hit_layDimSig(lay,dim).begin
696 
700 #define hit_layDimEnd( lay, dim ) hit_layDimSig(lay,dim).end
701 
705 #define hit_layDimStride( lay, dim ) hit_layDimSig(lay,dim).stride
706 
707 /* 6.2. METHODS TO OBTAIN DATA FOR OTHER VIRTUAL PROCESSOR */
708 /* 6.2.1. EXTERNAL DECLARATIONS */
712 #define hit_layDimNeighbor( lay, dim, shift ) hit_layNeighborFromTopoRank(lay, lay.topo.self.rank[dim], dim, shift)
713 
717 #define hit_layDimNeighborAbs( lay, dim, coord ) hit_ranks2( lay.topo.self.rank[dim], dim, shift)
718 
722 #define hit_layNeighbor( lay, dim, shift ) hit_layNeighborRanks(lay, dim, shift)
723 
727 #define hit_layShapeNeighbor(lay, dim, shift) (hit_layout_wrapperNeighborShape( lay, dim, shift ))
728 
732 #define hit_layShapeOther(lay, ranks) (hit_layout_wrapperOtherShape( lay, ranks ))
733 
741 
750 
758 
767 
768 
769 /* 6.3. FUNCTIONS TO CHANGE LAYOUT OPTIONS (SIGNATURE LAYOUTS) */
774 
778 void hit_layWrapNeighborsDim(HitLayout *lay, int dim);
779 
784 
788 void hit_layUnwrapNeighborsDim(HitLayout *lay, int dim);
789 
790 
791 
792 /* 6.4.1. DO ONLY FOR ACTIVATED PROCESSORS IN THE LAYOUT */
797 #define hit_layImActive( lay ) ((lay).active)
798 
802 #define hit_layInactiveWarning( lay ) \
803  if ( hit_layImLeader(lay) ) { \
804  int numInactive = hit_topCard( (lay).topo ) - hit_layNumActives( lay ); \
805  if ( numInactive > 0 ) { \
806  char message[256]; \
807  sprintf( message, "%d Processors inactive in layout \"%s\"", numInactive, #lay); \
808  hit_warning( message, __FILE__, __LINE__ ); \
809  } \
810  }
811 
812 /* 6.4.2 DO ONLY FOR LEADER OF ACTIVATED PROCESSORS IN THE LAYOUT */
817 #define hit_layImLeader( lay ) hit_topImLeader( (lay).topo )
818 
819 /* 6.5. LOOPS ACROSS VIRTUAL PROCESSORS */
824 extern int hit_lsig_vfor_index[HIT_MAXDIMS];
825 #define hit_lsig_vfor(lay, dim, index) \
826  for( hit_lsig_vfor_index[dim]=0, index=0; \
827  hit_lsig_vfor_index[dim]<hit_lsig_numActives(lay,dim); \
828  hit_lsig_vfor_index[dim]++, index=hit_lsig_vDimNeighbor(lay,index,dim,1) )
829 
830 /* 6.6. LOOPS ACROSS ELEMENTS IN THE VIRTUAL PROCESS */
837 #define hit_layForDimDomain(lay, dim, index) for( index=hit_layDimBegin(lay, dim); \
838  index<=hit_layDimEnd(lay,dim); \
839  index=index+hit_layDimStride(lay,dim) )
840 
841 /* 6.7 RANKS */
848 #define hit_laySelfRanks( lay ) (hit_layToActiveRanks( lay, (lay).topo.self ))
849 
857 #define hit_laySelfRanksDim( lay, dim ) (hit_laySelfRanks( lay ).rank[dim])
858 
866 #define hit_laySelfRank( lay ) ( hit_topoSelfRankInternal( (lay).topo ))
867 
868 
869 
870 
871 /* 7. LIST LAYOUT FUNCTIONS */
879 void hit_lay_elements(HitLayout layout, int group, int ** elements, int * nElements);
880 
887 int hit_lay_procGroup(HitLayout layout, int processor);
888 
889 
890 /* 7.1. SHORT-CUTS */
891 /* SHORT-CUTS TO GET THE GROUP STRUCTURE */
897 #define hit_lgr_numGroups(lay) (lay.info.layoutList.numGroups)
898 
906 #define hit_lgr_group(lay, group) (lay.info.layoutList.groups[group])
907 
908 /* SHORT-CUTS TO GET THE INFORMATION ABOUT THE LOCAL NUMBER OF ELEMENTS */
909 #define hit_lgr_card(lay) (lay.info.layoutList.cardOwnElements)
910 #define hit_lgr_cardTotal(lay) (lay.info.layoutList.numElementsTotal)
911 #define hit_lgr_cardPred(lay) (lay.info.layoutList.cardPredElements)
912 #define hit_lgr_cardSucc(lay) (lay.info.layoutList.cardSuccElements)
913 
914 /* SHORT-CUTS TO GET INFORMATION FOR ELEMENTS */
922 #define hit_lgr_leader(lay, element) (lay.info.layoutList.groups[lay.assignedGroups[element]].leader)
923 
930 #define hit_lgr_nProcs(lay, element) (lay.info.layoutList.groups[lay.assignedGroups[element]].numProcs)
931 
938 #define hit_lgr_elementGroup(lay, element) ((lay).info.layoutList.assignedGroups[element])
939 
947 #define hit_layHasElem(lay, element) ((lay).group == (lay).info.layoutList.assignedGroups[element])
948 
949 
950 
951 /* SHORT-CUTS TO GET INFORMATION FOR GROUPS */
959 #define hit_lgr_groupLeader(lay, group) (lay.info.layoutList.groups[group].leader)
960 
967 #define hit_lgr_groupNProcs(lay, group) (lay.info.layoutList.groups[group].numProcs)
968 
969 
970 
971 
977 #define hit_layExtendedShape(lay) ((lay).info.layoutList.extendedShape)
978 
979 
980 
981 /* 8. HIT LAYOUT FREE */
986 
987 
988 
989 /* 9. INTERNAL FUNCTIONS */
990 HitRanks hit_layTransformRanks( char topoActiveMode, HitLayout lay, HitRanks ranks );
991 int hit_layNeighborFrom(HitLayout self, int source, int dim, int shift);
992 int hit_layNeighborFromTopoRank(HitLayout self, int source, int dim, int shift);
993 int hit_layNeighborDistance(HitLayout self, int dim, int shift);
994 HitRanks hit_layNeighborRanks(HitLayout self, int dim, int shift);
995 HitRanks hit_layNeighborRanksFrom(HitLayout self, HitRanks source, int dim, int shift);
996 HitShape hit_layout_wrapperNeighborShape(HitLayout self, int dim, int shift);
998 
999 
1000 /* 9.1. INTERNAL FUNCTIONS TO BUILD LAYOUTS */
1001 int hit_layout_wrapperShape( int topoNumDims,
1002  HitRanks proc,
1003  int card[HIT_MAXDIMS],
1004  HitShape shape,
1005  HitShape *newShape,
1006  HitLayoutSignatureFunction sigFunctionGeneric,
1007  HitLayoutSignatureFunction sigFunctionRestricted,
1008  float* extraParameter,
1009  int restrictToDim
1010  );
1012  HitShape shape,
1013  HitLayoutSignatureFunction signatureGenericF,
1014  HitLayoutSignatureInvFunction signatureInvGenericF,
1015  HitLayoutSignatureFunction signatureRestrictedF,
1016  HitLayoutSignatureInvFunction signatureInvRestrictedF,
1017  HitLayoutRanksFunction ranksGenericF,
1018  HitLayoutRanksFunction ranksRestrictedF,
1019  HitLayoutSignatureMaxCardFunction maxCardGenericF,
1020  HitLayoutSignatureMaxCardFunction maxCardRestrictedF,
1021  HitLayoutSignatureMinCardFunction minCardGenericF,
1022  HitLayoutSignatureMinCardFunction minCardRestrictedF,
1023  HitLayoutSignatureNumActivesFunction activesGenericF,
1024  HitLayoutSignatureNumActivesFunction activesRestrictedF,
1025  float* extraParameter,
1026  int restrictToDim
1027  );
1028 
1029 
1037 
1038 
1046 
1047 
1054 #define hit_layToActiveRanks( lay, ranks ) hit_layTransformRanks( HIT_LAY_RANKS_TOPO_TO_ACTIVE, lay, ranks )
1055 
1062 #define hit_layToTopoRanks( lay, ranks ) hit_layTransformRanks( HIT_LAY_RANKS_ACTIVE_TO_TOPO, lay, ranks )
1063 
1064 
1071 int hit_layDimOwner( HitLayout lay, int dim, int ind );
1072 
1073 #ifdef __cplusplus
1074 }
1075 #endif
1076 
1077 /* END OF HEADER FILE _HitLayout_ */
1078 #endif
HitLayout hit_layout_plug_layCyclic(HitTopology topo, HitShape shape, int dim)
Definition: hit_layout.c:948
HitLayout HIT_LAYOUT_NULL
Definition: hit_layout.c:71
HitGroup * groups
Definition: hit_layout.h:225
int hit_layDimOwner(HitLayout lay, int dim, int ind)
Definition: hit_layout.c:2223
HitLayoutSig HIT_LAYOUTSIG_NULL
Definition: hit_layout.c:62
int(* HitLayoutRanksFunction)(char topoActiveMode, int procId, int procsCard, int blocksCard, float *extraParam)
Definition: hit_layout.h:106
HitLayoutSignatureFunction signatureGenericF
Definition: hit_layout.h:158
HitLayoutSignatureInvFunction signatureInvRestrictedF
Definition: hit_layout.h:161
struct HitLayout HitLayout
HitLayoutRanksFunction ranksGenericF
Definition: hit_layout.h:162
HitRanks leaderRanks
Definition: hit_layout.h:268
int hit_layNeighborDistance(HitLayout self, int dim, int shift)
Definition: hit_layout.c:2001
HitLayoutSignatureFunction signatureRestrictedF
Definition: hit_layout.h:160
void hit_lay_elements(HitLayout layout, int group, int **elements, int *nElements)
Definition: hit_layout.c:2452
float * extraParameter
Definition: hit_layout.h:164
int cardPredElements
Definition: hit_layout.h:229
HitTopology topo
Definition: hit_layout.h:255
int minSize[HIT_MAXDIMS]
Definition: hit_layout.h:261
HitLayout hit_layout_plug_layIndependentLB(HitTopology topo, HitShape elements, const double *weights)
Definition: hit_layout.c:2495
int numElementsTotal
Definition: hit_layout.h:226
HitShape hit_layMaxShape(HitLayout lay)
Definition: hit_layout.c:1623
HitLayout hit_layout_plug_layNotInLeader(HitTopology topo, HitShape shape)
HitTopology hit_layGroupTopo(HitLayout lay, int groupId)
Definition: hit_layout.c:2318
void hit_layUnwrapNeighbors(HitLayout *lay)
Definition: hit_layout.c:1607
HitLayout layout[k_num]
Definition: mg.c:150
Definition: hit_sig.h:79
#define HIT_MAXDIMS
Definition: hit_shape.h:72
HitGroup HIT_GROUP_NULL
Definition: hit_layout.c:65
HitPTopology * pTopology[HIT_MAXDIMS+1]
Definition: hit_layout.h:278
int hit_layActiveRanksId(HitLayout lay, HitRanks ranks)
Definition: hit_layout.c:1916
HitShape hit_layDimMaxShape(HitLayout lay, int dim)
Definition: hit_layout.c:1650
int cardSuccElements
Definition: hit_layout.h:230
int(* HitLayoutSignatureNumActivesFunction)(int procsCard, int blocksCard, float *extraParameter)
Definition: hit_layout.h:141
int restrictToDim
Definition: hit_layout.h:165
HitShape hit_layout_wrapperOtherShape(HitLayout self, HitRanks ranks)
Definition: hit_layout.c:1792
HitLayout hit_layout_plug_layInLeader(HitTopology topo, HitShape shape)
Definition: hit_layout.c:1013
double ownLoad
Definition: hit_layout.h:291
int hit_layNeighborFrom(HitLayout self, int source, int dim, int shift)
Definition: hit_layout.c:1955
int cardOwnElements
Definition: hit_layout.h:228
double successorsLoad[HIT_MAXDIMS]
Definition: hit_layout.h:290
HitRanks hit_layTransformRanks(char topoActiveMode, HitLayout lay, HitRanks ranks)
Definition: hit_layout.c:1886
char leader
Definition: hit_layout.h:267
HitLayout hit_layout_plug_layBlocksBalance(HitTopology topo, HitShape shape, int dim, float load)
Definition: hit_layout.c:1202
int(* HitLayoutSignatureMinCardFunction)(int procsCard, int blocksCard, float *extraParameter)
Definition: hit_layout.h:130
int * assignedGroups
Definition: hit_layout.h:227
HitLayoutList HIT_LAYOUTLIST_NULL
Definition: hit_layout.c:68
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)
Definition: hit_layout.c:2073
HitRanks hit_layActiveIdRanks(HitLayout lay, int id)
Definition: hit_layout.c:1935
HitLayout hit_layout_plug_layBlocks(HitTopology topo, HitShape shape)
Definition: hit_layout.c:326
HitLayout hit_layout_plug_laySparseRows(HitTopology topo, HitShape *shape)
Definition: hit_layout.c:2963
void hit_layWrapNeighbors(HitLayout *lay)
Definition: hit_layout.c:1593
int leader
Definition: hit_layout.h:202
HitLayout hit_layout_plug_layMinBlocks(HitTopology topo, HitShape shape, int minElems)
Definition: hit_layout.c:529
HitShape hit_layDimMinShape(HitLayout lay, int dim)
Definition: hit_layout.c:1704
HitShape shape
HitLayout hit_layout_plug_layBlocksX(HitTopology topo, HitShape shape)
Definition: hit_layout.c:625
int maxSize[HIT_MAXDIMS]
Definition: hit_layout.h:260
HitLayoutList layoutList
Definition: hit_layout.h:285
HitLayout hit_layout_plug_layContiguous(HitTopology topo, HitShape elements, const double *weights)
Definition: hit_layout.c:2652
HitPTopology * pTopologyGroup
Definition: hit_layout.h:279
void hit_layWrapNeighborsDim(HitLayout *lay, int dim)
Definition: hit_layout.c:1602
HitLayout hit_layout_plug_layMetis(HitTopology topo, HitShape *shape)
HitLayout hit_layout_plug_layBlocksL(HitTopology topo, HitShape shape)
Definition: hit_layout.c:838
HitLayout hit_layout_plug_layDimWeighted(HitTopology topo, HitShape shape, int restrictDim, float *weights)
Definition: hit_layout.c:1484
HitLayoutSig layoutSig
Definition: hit_layout.h:283
void hit_layFree(HitLayout lay)
Definition: hit_layout.c:2251
struct HitLayoutSig HitLayoutSig
HitShape shape
Definition: hit_layout.h:271
int hit_layNeighborFromTopoRank(HitLayout self, int source, int dim, int shift)
Definition: hit_layout.c:1982
int numProcs
Definition: hit_layout.h:203
int hit_layout_wrapperShape(int topoNumDims, HitRanks proc, int card[HIT_MAXDIMS], HitShape shape, HitShape *newShape, HitLayoutSignatureFunction sigFunctionGeneric, HitLayoutSignatureFunction sigFunctionRestricted, float *extraParameter, int restrictToDim)
Definition: hit_layout.c:1732
HitLayoutSignatureInvFunction signatureInvGenericF
Definition: hit_layout.h:159
union HitLayout::@0 info
HitShape hit_layMinShape(HitLayout lay)
Definition: hit_layout.c:1677
HitLayout hit_layout_plug_layWeighted(HitTopology topo, HitShape shape, float *weights)
Definition: hit_layout.c:1538
HitShape origShape
Definition: hit_layout.h:274
HitShape hit_layout_wrapperNeighborShape(HitLayout self, int dim, int shift)
Definition: hit_layout.c:1815
int(* HitLayoutSignatureFunction)(int procId, int procsCard, int blocksCard, float *extraParam, HitSig input, HitSig *res)
Definition: hit_layout.h:73
HitLayout hit_layout_plug_layBlocksF(HitTopology topo, HitShape shape)
Definition: hit_layout.c:721
int hit_layNumActives(HitLayout lay)
Definition: hit_layout.c:2213
double predecessorsLoad[HIT_MAXDIMS]
Definition: hit_layout.h:289
HitRanks hit_layNeighborRanksFrom(HitLayout self, HitRanks source, int dim, int shift)
Definition: hit_layout.c:2008
int active
Definition: hit_layout.h:263
int numActives[HIT_MAXDIMS]
Definition: hit_layout.h:257
HitLayout lay
Definition: heat.c:107
int(* HitLayoutSignatureMaxCardFunction)(int procsCard, int blocksCard, float *extraParameter)
Definition: hit_layout.h:119
HitTopology hit_layActivesTopology(HitLayout lay)
Definition: hit_layout.c:2372
HitLayoutRanksFunction ranksRestrictedF
Definition: hit_layout.h:163
HitLayout hit_layout_plug_layDimBlocks(HitTopology topo, HitShape shape, int restrictDim)
Definition: hit_layout.c:382
int wrap[HIT_MAXDIMS]
Definition: hit_layout.h:256
HitRanks hit_layNeighborRanks(HitLayout self, int dim, int shift)
Definition: hit_layout.c:2039
HitLayout hit_layout_plug_layBitmap(HitTopology topo, HitShape *shape)
Definition: hit_layout.c:2859
void hit_layUnwrapNeighborsDim(HitLayout *lay, int dim)
Definition: hit_layout.c:1616
int(* HitLayoutSignatureInvFunction)(int procId, int procsCard, int blocksCard, float *extraParam, HitSig input, int ind)
Definition: hit_layout.h:89
HitLayout hit_layout_plug_laySparseBitmapRows(HitTopology topo, HitShape *shapeP)
Definition: hit_layout.c:3015
int hit_lay_procGroup(HitLayout layout, int processor)
Definition: hit_layout.c:2477
int hit_lsig_vfor_index[HIT_MAXDIMS]
Definition: hit_layout.c:59