Skip to content

Instantly share code, notes, and snippets.

@GINK03
Created July 24, 2017 15:59
Show Gist options
  • Save GINK03/609c6149cda37bccfc21173a841af975 to your computer and use it in GitHub Desktop.
Save GINK03/609c6149cda37bccfc21173a841af975 to your computer and use it in GitHub Desktop.
openmp

install clang

$ sudo apt install clang

install openmp-dev

$ sudo apt install libomp-dev

C lang

//test.c
#include "omp.h"
#include <stdio.h>

int main(void) {
  #pragma omp parallel
  printf("thread %d\n", omp_get_thread_num());
}
$ clang test.c -fopenmp
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment