Advertisement
Guest User

Untitled

a guest
Nov 17th, 2019
136
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.06 KB | None | 0 0
  1. // mp_lab1.cpp : This file contains the 'main' function. Program execution begins and ends there.
  2. //
  3.  
  4. #include "pch.h"
  5. #include <omp.h>
  6. #include <iostream>
  7.  
  8. int main()
  9. {
  10. double start, koniec;
  11. int id;
  12.  
  13. #pragma omp parallel private(id)
  14. {
  15. id = omp_get_thread_num();
  16.  
  17. std::cout << "Id = " << id << std::endl;
  18. }
  19.  
  20. //start = omp_get_wtime();
  21.  
  22. //koniec = omp_get_wtime();
  23.  
  24. //printf("2.3%", koniec - start);
  25.  
  26. }
  27.  
  28. // Run program: Ctrl + F5 or Debug > Start Without Debugging menu
  29. // Debug program: F5 or Debug > Start Debugging menu
  30.  
  31. // Tips for Getting Started:
  32. // 1. Use the Solution Explorer window to add/manage files
  33. // 2. Use the Team Explorer window to connect to source control
  34. // 3. Use the Output window to see build output and other messages
  35. // 4. Use the Error List window to view errors
  36. // 5. Go to Project > Add New Item to create new code files, or Project > Add Existing Item to add existing code files to the project
  37. // 6. In the future, to open this project again, go to File > Open > Project and select the .sln file
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement