Skip to content

Instantly share code, notes, and snippets.

@mvgolom
Created March 12, 2020 17:42
Show Gist options
  • Save mvgolom/28bf722fb4d01e1efbb1cdc917fbed4a to your computer and use it in GitHub Desktop.
Save mvgolom/28bf722fb4d01e1efbb1cdc917fbed4a to your computer and use it in GitHub Desktop.
paradigma comput paralela
#include <stdio.h>
#ifdef _OPENMP
#include <omp.h>
#else
#define omp_get_thread_num() 0
#endif
int main(){
#pragma omp parallel
{
int id_omp = omp_get_thread_num();
long int id_sys = (long int) pthread_self();
printf("Thread[%d,%lu]:Hello World!!!\n",id_omp,id_sys);
}
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment