示例#1
0
int main(int argc, char* argv[]) {
  boost::mpi::environment env(argc, argv);
  boost::mpi::communicator comm;

  slctTest();
  slctTupleTest();
  funcInvokeTest();
  MapTest(argc, argv);
  //ReduceTest(argc, argv);
  ReduceAllTest(argc, argv);
  FilterTest(argc, argv);
  readFileTest(argc, argv);
  MPIBridgeTest(argc, argv);
  LoadTest(argc, argv);

  std::cout<<"All tests passed successfully"<<std::endl;
  return 0;
}
示例#2
0
void ordOfGrowth(string text, ordGrowthT horspool, ordGrowthT bruteforce){
	int i, j, size, newSize, stop, pat;
	double div;
	string newtext;
	pat = 20;
	i = pat;
	j = 0;
	size = 0;
	newSize = 0;
	div = 1;
	stop = (horspool->arrSize + pat);

	Randomize();
	size = StringLength(text);
	newSize = size;
	while (i < stop){
		printf("%d\n", i);
		newtext = readFileTest("string.txt", i);
		//markera längd på text
		
		horspool->textLen[j] = i;
		

		//markera längd på text
		bruteforce->textLen[j] = i;
		

		//räkna ut antal jämförelser
		testStringMatch(text, newtext, horspool, bruteforce, j);
		FreeBlock(newtext);
		j++;
		i = (i + 50);
	}
	createGrowthFile(horspool);
	createGrowthFile(bruteforce);
}