Revision 8655dffe71f44f69c699722f5cb4c3bc68f42fb5 authored by Thomas Quinn on 24 June 2014, 22:13:51 UTC, committed by Thomas Quinn on 24 June 2014, 22:13:51 UTC
2 parent s fcf9383 + e8a5b4b
Raw File
ScaledORBMapBG.h
#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 &section, 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);
  	
};


back to top