57954 Slajd7 (27)

57954 Slajd7 (27)




Implicit Threading

np. Open MP, Intel Threading Builaing Blocks (TBB)

static long num_rects = lOOOOO;

int main(int argc, char* argv[])    {

double mid, height, width, sum = 0.0/ int i/

double area/

width = 1.0/(double) num_rects;

#pragma omp parallel for private(mid, height) reduction(+: sum) for (i = 0/ i < num_rects/ i++)    {

mid = (i + 0.5) * width/ height = 4.0/(1.0 + mid * mid)/ sum += height/

}

area = width * sum/

printf("Computed pi = %f\n", area)/ return 0/

}

Zmienna środowiskowa ompjntjm threads określa liczbę wątków.

T2-2 - Modele obliczeń rozproszonych Marek Nowak 7


Wyszukiwarka

Podobne podstrony:
Slajd8 (27) Explicit Threadingnp. P0$1X threads (Pthreads), Windows Threads ttinclude <stdio.h>
56157 sa 27 Strength Maker Standard Chart course of 25 les-sons in Long Bar-Bell, Sliort Bar-Bell an
Effect Of Dividends On Stock Prices 15 Table 5.3: Fixed Effect Model MP =1833.7+27.4CD-7.5SD+1.3RR-4
v = ^j?r =    5-8315-723    = 1Q g9? Mp 27,49 ■ 0,9943 • 105
10 naprężacze 10. THREAD TENSION COMPONENTS 27 28 Ref. No. Part
THIEM WOJCIECH handlowiec — ur. 27. III. 1891. Poznań, ul. W. Garbary 50. Należał do 3 ko>mp
OPEN PL 27.07.2018 godz.19:00 TARNOBRZEG Mimi2, Piłsudskiego 5 KASIA SKIBA i JA
14026 Scan0019 2.5 Zadania 27 • reguła dowodzenia MP (modus ponens): A, A=> B B ‘ W systemie Hilb
BEADED AMULET PURSES • PROJECT FIVE 27 To create the fringe. Take the thread out through the top out
"Workers and Firms in Global Production Networks:Policy Implications" 27-28.05.2021 (oniin
applications window menu Applications 0"8] Local >* VisualVM Open Ó Remo Snapsi Thread Dump

więcej podobnych podstron