Name | Last modified | Size | Description | |
---|---|---|---|---|
Parent Directory | - | |||
atomic/ | 2016-10-20 12:32 | - | ||
barrier/ | 2016-10-20 12:42 | - | ||
critical/ | 2016-10-20 12:32 | - | ||
firstlastprivate/ | 2016-10-20 12:32 | - | ||
for/ | 2016-10-21 10:27 | - | ||
pi/ | 2016-10-21 10:32 | - | ||
reduction/ | 2016-10-21 10:37 | - | ||
saxpy/ | 2016-10-21 10:42 | - | ||
schedule/ | 2016-10-21 10:44 | - | ||
section/ | 2016-10-21 10:44 | - | ||
hello: helloworld.c: hello world program. hello.c: hello world program, print thread id.
for: one-loop-1.c: parallelize one loop using parallel and for constructs. one-loop-2.c: parallelize one loop using combined parallel for constructs. two-loops-1.c: parallelize two loops using parallel and for constructs. two-loops-2.c: parallelize two loops using combined parallel for constructs.
saxpy: saxpy.c: a serial code to compute s=a*x+y. saxpy_omp.c: a parallel code, use parallel for construct, shared and private clauses.
firstlastprivate: firstlastprivate.c: to demonstrate firstprivate and lastprivate clauses.
barrier: barrier.c: to demonstrate barrier construct.
section: two-functions.c: use section construct to compute two functions parallelly.
critical: misorder_output.c: an exmaple for disordered print. order_output.c: use critical construct to print in order. sum_serical.c: a serial code to calculate the sum of a vector. sum_race.c: an example of data race. sum_critical.c: avoid data race using critical construct.
atomic: These examples are for calculating the sum of a vector. sum_atomic_slow.c : improperly use atomic construct, which results in bad performance. sum_atomic.c : a correct example to avoid data race using atomic construct.
redcution: This example is for calculating the sum of a vector. sum_reduction.c: use reduction clause to avoid data race.
pi: pi_serial.c: a serial code to calculate the value of pi. pi_omp.c: a good parallel code, use reduction clause to avoid data race. pi_omp1.c: a bad parallel code, improperly use atomic construct, which results in bad performance.
schedule: schedule.c: to demonstrate the schedule clause.
** Fortran codes have the same names of corresponding C codes.