Пример #1
0
/*Starting point of the program. This program calls other functions as required*/
int main(int argc, char*argv[])
{
	rubix myRubix;
	
	if (initRubix(&myRubix, argv[1]) == 1)
	{
		exit(1);
	}
	
	initGraphics();
	
	menu(&myRubix);
	
	printSequenceLst(myRubix.seqLst,myRubix.counter);
	
	printCounter(&myRubix);
	
	deleteLst(myRubix.seqLst,myRubix.counter);
	
	fflush(stdin);
	printf("\nPress any key to exit the program\n");
	
	getchar();
	
	closeGraphicsWin();
	
	return 0;
}
Пример #2
0
void MeasureMetric::doFinalization() {
	errs() << "The number of casting instruction: " << castInstCount << "\n";
	errs() << "The number of arithmetic operations\n";
	printCounter(arithOp);
	errs() << "The number of comparison operations\n";
	printCounter(cmpOp);
	errs() << "The number of load instructions\n";
	printCounter(loadOp);
	errs() << "The number of store instructions\n";
	printCounter(storeOp);
	ofstream scoreFile;
	scoreFile.open("score.cov", ios_base::app);
	scoreFile << "#score\n";
	scoreFile << score << "\n";
	scoreFile.close();

	return;
}