forked from N-BodyShop/changa
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathScaleTranMapBG.h
More file actions
31 lines (25 loc) · 836 Bytes
/
ScaleTranMapBG.h
File metadata and controls
31 lines (25 loc) · 836 Bytes
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
#include <deque>
#include <iostream>
#include <vector>
#include "charm++.h"
using namespace std;
class ScaleTranMapBG{
#ifdef CMK_VERSION_BLUEGENE
BGLTorusManager *manager;
#else
bool isVnodeMode;
#endif
int xsize,ysize,zsize;
int collisions;
Cluster *clusterArray;
int nClusters;
inline void translate(Vector3D<float> &vec, float xdist, float ydist, float zdist);
inline void scale(Vector3D<float> &vec, int xlen, int ylen, int zlen);
void roundOff(Vector3D<float> &vec);
int map(Vector3D<float> &vec, int numprocs, bool *avail, int *ringRadius);
void enqueueNeighbors(int x, int y, int z, deque<int> &q, int dist);
public:
void assign(int *from, double *clusterWeights, CkVec<int> &to, int numobjs, int numprocs);
CkVec <TaggedVector3D> tpCentroids;
bool isNeighborOf(int pe1, int pe2);
};