Commit d5d625b9 authored by Alejandro E. Rendon's avatar Alejandro E. Rendon
Browse files

Testing Threads

parent 6a6c107a
#include <iostream>
#include <string>
#include <omp.h>
using namespace std;
int main() {
int iam, nt;
#pragma omp parallel default(shared) private(iam,nt)
{
iam = omp_get_thread_num();
nt = omp_get_num_threads();
string out = "I'm Thread -> " + to_string(iam) + "/" + to_string(nt) + " ";
cout << out << endl;
}
return 0;
}
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment