gomp-discuss
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gomp-discuss] The primitives


From: Biagio Lucini
Subject: [Gomp-discuss] The primitives
Date: Mon, 10 Feb 2003 19:21:29 +0000 (GMT)

I've missed so much of the "real time" discussion today that I don't know
exactly who I should quote here - sorry!

I agree with Scott that perhaps the best thing to do for a start is to get
the simplest program work. However, I am not sure if I agree on the
observation that we don't need the library routines. One thing we will
need at some point is some function that will get the number of the CPU's
available to the system: the correct execution of the "hello" example
depend on the fact that the compiler must know how many CPU's the system
contains. 

For the common set of primitives, it seems to me that everything reduces
to a fork with a more-or-less complicated control instruction. E.g.

#pragma omp parallel -> fork n-1 processes if n is the number of the CPU
(the master process is still there)

#pragma omp for -> on each forked process manipulate according to the
clauses the index of the loop

#pragma omp sections -> whatch how to fork the section directives

#pragma omp section -> put it just in one thread (it does not matter which
one)

#pragma omp master -> this is not forked, must be executed just on the
master thread

Perhaps we tree is simpler than it seems at first sight or am I too naive
and indeducated in CS?

Then, a separate chapter are the synchronisation statements (barrier,
critical, flush), which probably require "wait" and "lock".

Biagio





reply via email to

[Prev in Thread] Current Thread [Next in Thread]