global_lTemp2 = null;
}
- public int BITS(int x, int k, int j) {
- int retval = ((x>>k) & ~(~0<<j));
- return retval;
+ public static int BITS(int x, int k, int j) {
+ return ((x>>k) & ~(~0<<j));
}
/* =============================================================================
for (int k = 0; k < q; k++) {
int j = BITS(lKey[k], bitOff, m);
lSorted[myHisto[j]] = lKey[k];
- auxSorted[myHisto[j]] = lKey[k];
+ auxSorted[myHisto[j]] = auxKey[k];
myHisto[j]++;
//
//mhp[j]++;
}
-
- psHisto = null;
- myHisto = null;
}
int[] auxKey,
int[] auxSorted)
{
- int[] lTemp = null;
- int[] lTemp2 = null;
-
- lTemp = new int[ q];
- lTemp2 = new int[ q];
+ int[] lTemp = new int[q];
+ int[] lTemp2 = new int[q];
all_countsort_node_aux_seq(q, lKeys, lSorted, auxKey, auxSorted, (1<<11), 0, 11);
all_countsort_node_aux_seq(q, lSorted, lTemp, auxSorted, lTemp2, (1<<11), 11, 11);
all_countsort_node_aux_seq(q, lTemp, lSorted, lTemp2, auxSorted, (1<<10), 22, 10);
-
- lTemp = null;
- lTemp2 = null;
}
Barrier.enterBarrier();
- if(myId == 0) {
- lTemp = null;
- lTemp2 = null;
- }
}
}
}
Barrier.enterBarrier();
-
- if (myId == 0) {
- p = null;
- }
}
/* =============================================================================
*/
LocalStartStop lss = new LocalStartStop();
CreatePartition.createPartition(0, numEdgesPlaced, myId, numThread, lss);
-
for (int i = lss.i_start; i < lss.i_stop; i++) {
if (computeGraphArgs.SDGdataPtr.startVertex[i] > maxNumVertices) {
maxNumVertices = computeGraphArgs.SDGdataPtr.startVertex[i];
Barrier.enterBarrier();
- if (myId == 0) {
- impliedEdgeList = null;
- }
-
for (int i = lss.i_start; i < lss.i_stop; i++) {
if (computeGraphArgs.GPtr.inDegree[i] > glb.MAX_CLUSTER_SIZE) {
auxArr[i] = null;
Barrier.enterBarrier();
- if (myId == 0) {
- auxArr = null;
- }
-
}
}
}
}
- SDGdataPtr.strWeight = new char[numStrWtEdges * glb.MAX_STRLEN];
+ SDGdataPtr.strWeight = new byte[numStrWtEdges * glb.MAX_STRLEN];
for (int i = 0; i < numEdgesPlaced; i++) {
if (SDGdataPtr.intWeight[i] <= 0) {
for (int j = 0; j < glb.MAX_STRLEN; j++) {
SDGdataPtr.strWeight[(-SDGdataPtr.intWeight[i])*glb.MAX_STRLEN+j] =
- (char) (1 + randomPtr.posrandom_generate() % 127);
+ (byte) (1 + randomPtr.posrandom_generate() % 127);
}
}
}
*/
if (glb.SOUGHT_STRING.length != glb.MAX_STRLEN) {
- glb.SOUGHT_STRING = new char[glb.MAX_STRLEN];
+ glb.SOUGHT_STRING = new byte[glb.MAX_STRLEN];
}
{
numStrWtEdges = gsd.global_numStrWtEdges;
if (myId == 0) {
- SDGdataPtr.strWeight = new char[numStrWtEdges * glb.MAX_STRLEN];
+ SDGdataPtr.strWeight = new byte[numStrWtEdges * glb.MAX_STRLEN];
}
Barrier.enterBarrier();
for (int j = 0; j < glb.MAX_STRLEN; j++) {
SDGdataPtr.strWeight[(-SDGdataPtr.intWeight[i])*glb.MAX_STRLEN+j] =
//FIXME if needed
- (char) (1 + (randomPtr.posrandom_generate() % 127));
+ (byte) (1 + (randomPtr.posrandom_generate() % 127));
}
}
}
if (myId == 0) {
if (glb.SOUGHT_STRING.length != glb.MAX_STRLEN) {
- glb.SOUGHT_STRING = new char[glb.MAX_STRLEN];
+ glb.SOUGHT_STRING = new byte[glb.MAX_STRLEN];
}
int t = (int) (randomPtr.posrandom_generate() % numStrWtEdges);
glb.MAX_INT_WEIGHT = (1<<glb.SCALE); /* Max int value in edge weight */
glb.MAX_STRLEN = glb.SCALE;
- glb.SOUGHT_STRING = new char[1]; /* Kernel 2: Character string sought: */
+ glb.SOUGHT_STRING = new byte[1]; /* Kernel 2: Character string sought: */
/* specify here, else it is picked */
/* picked from randomly selected entry */
/* in genScalData.c */
public int MAX_CLIQUE_SIZE;
public int MAX_PARAL_EDGES;
public int MAX_INT_WEIGHT;
- public char[] SOUGHT_STRING;
+ public byte[] SOUGHT_STRING;
public int MAX_STRLEN;
public float PERC_INT_WEIGHTS;
public float PROB_UNIDIRECTIONAL;
public int[] inVertexList;
public int[] intWeight;
- public char[] strWeight;
+ public byte[] strWeight;
public Graph() {
* in the int Weight array. A negative value because we need to sort on
* the intWeights in Kernel 2. Hence the int int
*/
- public char[] strWeight;
+ public byte[] strWeight;
public int numEdgesPlaced;
public GraphSDG() {
* The Global arguments
*/
ComputeGraph computeGraphArgs = new ComputeGraph();
+ long starttime;
+ long stoptime;
computeGraphArgs.GPtr = G;
computeGraphArgs.SDGdataPtr = SDGdata;
for(int i = 1; i<nthreads; i++) {
ssca[i].start();
}
-
System.out.println("\nScalable Data Generator - genScalData() beginning execution...\n");
+ starttime=System.currentTimeMillis();
+
#ifdef USE_PARALLEL_DATA_GENERATION
/*
GenScalData.genScalData_seq(glb, SDGdata, gsd, radixsort);
#endif
+
+ stoptime=System.currentTimeMillis();
System.out.println("\n\tgenScalData() completed execution.");
+ System.out.println("Time="+(stoptime-starttime));
#ifdef ENABLE_KERNEL1
* -------------------------------------------------------------------------
*/
System.out.println("\nKernel 1 - computeGraph() beginning execution...");
+ starttime=System.currentTimeMillis();
parallel_work_computeGraph(nthreads, glb, computeGraphArgs);
+ stoptime=System.currentTimeMillis();
System.out.println("\n\tcomputeGraph() completed execution.\n");
-
+ System.out.println("Time="+(stoptime-starttime));
#endif
#ifdef ENABLE_KERNEL2