Changes between Version 15 and Version 16 of openmp_programming


Ignore:
Timestamp:
May 23, 2008, 12:02:13 PM (16 years ago)
Author:
rider
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • openmp_programming

    v15 v16  
    111111{{{
    112112
    113 PROGRAM HELLO //Program_Name: HELLO
     113PROGRAM HELLO //Program_Name: HELLO   // OpenMP Directives
    114114
    115115       INTEGER VAR1, VAR2, VAR3
     
    123123       Specify variable scoping
    124124
    125 !$OMP PARALLEL PRIVATE(VAR1, VAR2) SHARED(VAR3)
     125!$OMP PARALLEL PRIVATE(VAR1, VAR2) SHARED(VAR3)   // OpenMP Directives
    126126
    127127       Parallel section executed by all threads
    128128             .
    129              .
     129             .                                       // Parallel Region
    130130             .
    131131
    132132       All threads join master thread and disband
    133133
    134 !$OMP END PARALLEL
     134!$OMP END PARALLEL   // OpenMP Directives
    135135
    136136       Resume serial code
     
    147147{{{
    148148
    149 #include <omp.h>
     149#include <omp.h>   //include the OpenMP header
    150150
    151151main ()  {
     
    161161Specify variable scoping
    162162
    163 #pragma omp parallel private(var1, var2) shared(var3)
     163#pragma omp parallel private(var1, var2) shared(var3)   // OpenMP Directives
    164164  {
    165165
    166166  Parallel section executed by all threads
    167         .
    168         .
     167        . 
     168        .                                          // Parallel Region
    169169        .
    170170