Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <string>
- #include <vector>
- #include <omp.h>
- using namespace std;
- int main()
- {
- setlocale(LC_ALL, "Russian");
- vector<int> arr(10);
- #pragma omp parallel shared(arr)
- {
- arr[omp_get_thread_num()] = omp_get_thread_num();
- }
- for (int i = 0; i < arr.size(); ++i)
- cout << arr[i] << " ";
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement