mirror of
https://github.com/ivabus/pantry
synced 2024-11-25 09:55:06 +03:00
c9d90972b3
* package & test * display-name * maybe find * modified: projects/openmp.llvm.org/package.yml
14 lines
No EOL
321 B
C++
14 lines
No EOL
321 B
C++
#include <omp.h>
|
|
#include <array>
|
|
int main (int argc, char** argv) {
|
|
std::array<size_t,2> arr = {0,0};
|
|
#pragma omp parallel num_threads(2)
|
|
{
|
|
size_t tid = omp_get_thread_num();
|
|
arr.at(tid) = tid + 1;
|
|
}
|
|
if(arr.at(0) == 1 && arr.at(1) == 2)
|
|
return 0;
|
|
else
|
|
return 1;
|
|
} |