Hitmap 1.3
|
#include <stdio.h>
#include <math.h>
#include <stdlib.h>
#include <hit_topology.h>
#include <hit_com.h>
Go to the source code of this file.
Macros | |
#define | pow2(x) ( 1<<(x) ) |
Functions | |
HitPTopology * | hit_ptopDup (HitPTopology *in) |
HitPTopology * | hit_ptopSplit (HitPTopology *in, int group) |
void | hit_ptopFree (HitPTopology **in) |
void | hit_topFree (HitTopology topo) |
HitTopology | hit_topology_plug_topPlain (HitPTopology *ptopo) |
HitTopology | hit_topology_plug_topPlainPower2 (HitPTopology *ptopo) |
HitTopology | hit_topology_plug_topSquare (HitPTopology *ptopo) |
HitTopology | hit_topology_plug_topArray2DComplete (HitPTopology *ptopo) |
HitTopology | hit_topology_plug_topArrayDims (HitPTopology *ptopo, int dims) |
HitTopology | hit_topology_plug_topDummyDims (HitPTopology *ptopo, int dims, int *virprocelems) |
int | hit_topCard (HitTopology topo) |
int | hit_topDimNeighbor (HitTopology topo, int dim, int shift) |
int | hit_topRankInternal (HitTopology topo, HitRanks ranks) |
HitRanks | hit_topRanksInternal (HitTopology topo, int linealRank) |
Variables | |
HitPTopology * | HIT_TOPOLOGY_INFO = NULL |
HitPTopology | HIT_PTOPOLOGY_NULL = HIT_PTOPOLOGY_NULL_STATIC |
HitTopology | HIT_TOPOLOGY_NULL = HIT_TOPOLOGY_NULL_STATIC |
int | HIT_RANK_NULL = HIT_RANK_NULL_STATIC |
HitRanks | HIT_RANKS_NULL = HIT_RANKS_NULL_STATIC |
HitRanks | HIT_RANK_LEADER = {{0,0,0,0}} |
Physical and virtual topologies of processes. Information about the physical topology of the system and virtual topologies of processes created using plug-ins modules. Support for virtual multidimensional array topologies.
Definition in file hit_topology.c.
Definition at line 55 of file hit_topology.c.
HitPTopology* hit_ptopDup | ( | HitPTopology * | in | ) |
void hit_ptopFree | ( | HitPTopology ** | in | ) |
HitPTopology* hit_ptopSplit | ( | HitPTopology * | in, |
int | group | ||
) |
int hit_topCard | ( | HitTopology | topo | ) |
Topology cardinality: number of active processors in the topology.
Definition at line 361 of file hit_topology.c.
int hit_topDimNeighbor | ( | HitTopology | topo, |
int | dim, | ||
int | shift | ||
) |
Return the neighbor index in the selected dimension with a shift.
Definition at line 376 of file hit_topology.c.
void hit_topFree | ( | HitTopology | topo | ) |
Free the resources used by a topology
Definition at line 129 of file hit_topology.c.
HitTopology hit_topology_plug_topArray2DComplete | ( | HitPTopology * | topo | ) |
Complete 2D Array topology generator
First dimension bigger. All processors are arranged in a two-dimensional topology or in a one-dimensional topology if some of then can't active. All of them are active.
Definition at line 207 of file hit_topology.c.
HitTopology hit_topology_plug_topArrayDims | ( | HitPTopology * | topo, |
int | dims | ||
) |
X-D Array topology generator
The processors are arranged in a X-dimensional topology Some processor may be inactive. If the input is power of two the result cardinalities keep this property First dimensions are bigger
This function is meant to be used thought the macros below.
Definition at line 249 of file hit_topology.c.
HitTopology hit_topology_plug_topDummyDims | ( | HitPTopology * | ptopo, |
int | dims, | ||
int * | virprocelems | ||
) |
Definition at line 319 of file hit_topology.c.
HitTopology hit_topology_plug_topPlain | ( | HitPTopology * | topo | ) |
Plain topology generator
All the processor are arranged in one dimension. All of them are active.
Definition at line 139 of file hit_topology.c.
HitTopology hit_topology_plug_topPlainPower2 | ( | HitPTopology * | topo | ) |
Plain topology generator, which restricts the number of active processors to a power of 2
All the processor are arranged in one dimension. Only a power of 2 number of processors are active
Definition at line 156 of file hit_topology.c.
HitTopology hit_topology_plug_topSquare | ( | HitPTopology * | topo | ) |
Square topology generator
The processors are arranged in a perfect square two-dimensional topology Uneven processors are inactive
Definition at line 176 of file hit_topology.c.
int hit_topRankInternal | ( | HitTopology | topo, |
HitRanks | ranks | ||
) |
Converts a multidimensional HitRanks in a linear value
Definition at line 415 of file hit_topology.c.
HitRanks hit_topRanksInternal | ( | HitTopology | topo, |
int | linealRank | ||
) |
Converts a linear value in a HitRanks
Definition at line 438 of file hit_topology.c.
HitPTopology HIT_PTOPOLOGY_NULL = HIT_PTOPOLOGY_NULL_STATIC |
Definition at line 63 of file hit_topology.c.
HitRanks HIT_RANK_LEADER = {{0,0,0,0}} |
Definition at line 71 of file hit_topology.c.
int HIT_RANK_NULL = HIT_RANK_NULL_STATIC |
Value for null rank
Definition at line 67 of file hit_topology.c.
HitRanks HIT_RANKS_NULL = HIT_RANKS_NULL_STATIC |
HitRanks null value
Is a HitRanks structure with all the ranks set to HIT_RANK_NULL
Definition at line 68 of file hit_topology.c.
HitPTopology* HIT_TOPOLOGY_INFO = NULL |
Definition at line 60 of file hit_topology.c.
HitTopology HIT_TOPOLOGY_NULL = HIT_TOPOLOGY_NULL_STATIC |
HitTopology null value.
Definition at line 64 of file hit_topology.c.