Marc Weustink wrote:
Steve Williams wrote:
I would suggest something along the lines of the C/C++ implementation, but using the Pascal form of compiler directives.

Using some of the documented examples in the v2.5 spec:

Example A.1.1:
procedure a1(n: Integer; a: PSingleArray; b: PSingleArray);
var
 i: Integer;
begin
 {$omp parallel for}
 for i := 1 to n - 1 do
   b^[i] := (a^[i] + a^[i - 1]) / 2.0;
end;

Brrr.... using local defines look not native to the language.
Why not something like as (refered in another thread) pascal-fc which uses cobegin..coend or known blocks like asm..end; try..end;

for instance:
  omp..end;
  parralel..end;

One of the pretexts behind OpenMP is that the code will still compile if OpenMP is not available or disabled on a particular compiler. That's the reason behind using compiler directives instead of new keywords. Using compiler directives similar to the C/C++ directives also means that the wealth of information already out there is instantly applicable to the Pascal version.

--
Sly



This message and its attachments may contain legally privileged or confidential 
information. This message is intended for the use of the individual or entity 
to which it is addressed. If you are not the addressee indicated in this 
message, or the employee or agent responsible for delivering the message to the 
intended recipient, you may not copy or deliver this message or its attachments 
to anyone. Rather, you should permanently delete this message and its 
attachments and kindly notify the sender by reply e-mail. Any content of this 
message and its attachments, which does not relate to the official business of 
the sending company must be taken not to have been sent or endorsed by the 
sending company or any of its related entities. No warranty is made that the 
e-mail or attachment(s) are free from computer virus or other defect.
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Reply via email to