forked from N-BodyShop/changa
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathScaledORBMapBG.h
37 lines (25 loc) · 964 Bytes
/
ScaledORBMapBG.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#include <deque>
#include <iostream>
#include <vector>
#include "charm++.h"
using namespace std;
class ScaledORBMapBG{
#ifdef CMK_VERSION_BLUEGENE
BGLTorusManager *manager;
#else
bool isVnodeMode;
#endif
int xsize,ysize,zsize;
bool *avail; // array indicating processor availability
// cluster information
Cluster *clusterArray;
int nClusters;
void map(/*Volume <float> &clusterVol,*/ ClusterSection §ion, Volume <int> &procVol, int clusters);
void q_sort(int axis, int left, int right); // FIXME - improve to bubblesort below threshold number of entries
void enqueueNeighbors(int x, int y, int z, deque<int> &q, int dist);
public:
CkVec <TaggedVector3D> tpCentroids;
void assign(int *from, int *clusterWeights, CkVec<int> &to, int numobjs, int numprocs);
void sortOnAxis(int axis, ClusterSection section);
bool isNeighborOf(int pe1, int pe2);
};