Revision c68d71addb81bcd80823cc8c69f0d03962c0cbe8 authored by Thomas Quinn on 13 December 2015, 01:08:22 UTC, committed by Thomas Quinn on 13 December 2015, 01:08:22 UTC
Change-Id: I81318c3a414129aee0df10475c76d63784ccc870
1 parent 5a980e7
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