Skip to content

Instantly share code, notes, and snippets.

@sethhillbrand
Created March 1, 2018 16:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sethhillbrand/45dfb50e5a1865ad65bda1d6522778c5 to your computer and use it in GitHub Desktop.
Save sethhillbrand/45dfb50e5a1865ad65bda1d6522778c5 to your computer and use it in GitHub Desktop.
Quick OpenMP test
#include <stdlib.h>
#include <stdio.h>
#include <omp.h>
int main()
{
#pragma omp parallel num_threads(4)
{
printf("Hello from thread %d, nthreads %d\\n", omp_get_thread_num(), omp_get_num_threads());
}
return EXIT_SUCCESS;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment