예제 #1
0
int main(int argc, char const *argv[])
{
	printf("%s: %s@%d: %s\n", PRJ_NAME, __FILE__,__LINE__ , __func__ );

	fun_1();
	fun_2();

    printf("submod 1 = %d, submod 2 = %d\n",  SUB_MOD1, SUB_MOD2 );

	return 0;
}
예제 #2
0
void CPUBenchmark::getProcedureOverhead(vector<double> &result){
    uint64_t totalTime = 0;
    uint64_t start, end;

    //0 argument
    warmup();
    for (int i = 0; i < TIMES; i++) {
      start = rdtscStart();
      fun_0();
      end = rdtscEnd();
      totalTime += (end - start);
    }
    result[0] = (double)totalTime / (double)TIMES;

    //1 argument
    warmup();
    totalTime = 0;
    for (int i = 0; i < TIMES; i++) {
      start = rdtscStart();
      fun_1(1);
      end = rdtscEnd();
      totalTime += (end - start);
    }
    result[1] = (double)totalTime / (double)TIMES;

     //2 argument
    warmup();
    totalTime = 0;
    for (int i = 0; i < TIMES; i++) {
      start = rdtscStart();
      fun_2(1, 2);
      end = rdtscEnd();
      totalTime += (end - start);
    }
    result[2] = (double)totalTime / (double)TIMES;

     //3 argument
    warmup();
    totalTime = 0;
    for (int i = 0; i < TIMES; i++) {
      start = rdtscStart();
      fun_3(1, 2, 3);
      end = rdtscEnd();
      totalTime += (end - start);
    }
    result[3] = (double)totalTime / (double)TIMES;

     //4 argument
    warmup();
    totalTime = 0;
    for (int i = 0; i < TIMES; i++) {
      start = rdtscStart();
      fun_4(1, 2, 3, 4);
      end = rdtscEnd();
      totalTime += (end - start);
    }
    result[4] = (double)totalTime / (double)TIMES;

     //5 argument
    warmup();
    totalTime = 0;
    for (int i = 0; i < TIMES; i++) {
      start = rdtscStart();
      fun_5(1, 2, 3, 4, 5);
      end = rdtscEnd();
      totalTime += (end - start);
    }
    result[5] = (double)totalTime / (double)TIMES;

     //6 argument
    warmup();
    totalTime = 0;
    for (int i = 0; i < TIMES; i++) {
      start = rdtscStart();
      fun_6(1, 2, 3, 4, 5, 6);
      end = rdtscEnd();
      totalTime += (end - start);
    }
    result[6] = (double)totalTime / (double)TIMES;

     //7 argument
    warmup();
    totalTime = 0;
    for (int i = 0; i < TIMES; i++) {
      start = rdtscStart();
      fun_7(1, 2, 3, 4, 5, 6, 7);
      end = rdtscEnd();
      totalTime += (end - start);
    }
    result[7] = (double)totalTime / (double)TIMES;
}
예제 #3
0
파일: fun_2.c 프로젝트: rampantmonkey/oryx
int main(){
  return fun_2(12,13);
}