fork download
  1. #include <stdio.h>
  2. #include <omp.h>
  3.  
  4. char mt[769];
  5.  
  6. int main(void)
  7. {
  8. omp_set_num_threads(64);
  9.  
  10. #pragma omp parallel
  11. {
  12. int n, ofst;
  13.  
  14. n = omp_get_thread_num();
  15. ofst = n/32*384 + n/8%4*12 + n%8*48;
  16. snprintf(mt+ofst, 12, "%d x %d = %2d",
  17. n/8+2, n%8+2, (n/8+2)*(n%8+2));
  18. mt[ofst+10] = n==31?'\n':' ';
  19. mt[ofst+11] = n/8%4==3?'\n':' ';
  20. }
  21.  
  22. mt[768] = '\0';
  23. printf("%s\n", mt);
  24.  
  25. return 0;
  26. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.c: In function ‘main’:
prog.c:10:0: warning: ignoring #pragma omp parallel [-Wunknown-pragmas]
 #pragma omp parallel
 
/home/80Mq7f/ccRaEELl.o: In function `main':
prog.c:(.text.startup+0x17): undefined reference to `omp_set_num_threads'
prog.c:(.text.startup+0x1c): undefined reference to `omp_get_thread_num'
collect2: error: ld returned 1 exit status
stdout
Standard output is empty