Guest User

Untitled

a guest
Mar 13th, 2018
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.51 KB | None | 0 0
  1. #include <cmath>
  2. int main()
  3. {
  4. const int size = 256;
  5. double sinTable[size];
  6.  
  7. #pragma omp parallel for
  8. for(int n=0; n<size; ++n)
  9. sinTable[n] = std::sin(2 * M_PI * n / size);
  10.  
  11. // the table is now initialized
  12. }
  13.  
  14. ld: library not found for -lgomp
  15. clang: error: linker command failed with exit code 1 (use -v to see invocation)
  16.  
  17. brew install llvm
  18. brew install libomp
  19.  
  20. /usr/local/Cellar/llvm/(llvm version)/bin/clang
  21. -fopenmp=libomp ~/openmp_program.c
Add Comment
Please, Sign In to add comment