int main(int argc, char **argv) 
{

    int x = 0;
    if (argc == 2)
        x = atoi(argv[1]);

    int y = 2;

    if (x > 0) 
    {

	#pragma omp parallel if ((x == 4) && (y == 2)) 
	{
		int tid, nthreads;
		tid = omp_get_thread_num();
    		nthreads = omp_get_num_threads();

   		static_func(tid);
    		//some_other_func(tid);

    		printf("Hello world from thread %3d of %3d\n", tid, nthreads);

		//#pragma omp barrier

	}

    }

    return 0;
}
예제 #2
0
파일: test.c 프로젝트: AlexDenisov/clang
                                 // CHECK: main
int main() {                     // CHECK-NEXT: File 0, [[@LINE]]:12 -> [[@LINE+7]]:2 = #0
                                 // CHECK-NEXT: File 0, [[@LINE+1]]:18 -> [[@LINE+1]]:24 = (#0 + #1)
  for(int i = 0; i < 10; ++i) {  // CHECK-NEXT: File 0, [[@LINE]]:26 -> [[@LINE]]:29 = #1
    bar();                       // CHECK-NEXT: File 0, [[@LINE-1]]:31 -> [[@LINE+1]]:4 = #1
  }
  static_func();
  return 0;
}
예제 #3
0
int main(int argc, const char *argv[]) {
  simple_loops();
  conditionals();
  early_exits();
  jumps();
  switches();
  big_switch();
  boolean_operators();
  boolop_loops();
  do_fallthrough();
  static_func();
  return 0;
}
 static void z2(){
   static_func();  // expected-warning {{use of identifier 'static_func' found via unqualified lookup into dependent bases of class templates is a Microsoft extension}}
   func(); // expected-warning {{use of identifier 'func' found via unqualified lookup into dependent bases of class templates is a Microsoft extension}} expected-error {{call to non-static member function without an object argument}}
 }
예제 #5
0
파일: main.cpp 프로젝트: tok41/gcc_samples
int main() {
  static_func();
}
예제 #6
0
파일: main.cpp 프로젝트: ak-ambi/CMake
void test_functions()
{
  file1_sq_func(static_func(42));
}
예제 #7
0
int notmain_add(void) {
    return static_func() + main_func();
}
예제 #8
0
int main() {
  func(1);
  static_func(2);
}
예제 #9
0
 static void static_job()
 {
     LOG<<"Doing static job ...";
     static_func();
 }