Marc Weustink wrote:
Steve Williams wrote:
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.
"Not native". Well, I would have prefered the term "darn ugly". :)
procedure a1(n: Integer; a: PSingleArray; b: PSingleArray);
var
i: Integer;
begin
for i := 1 to n - 1 do
parallel
b^[i] := (a^[i] + a^[i - 1]) / 2.0;
end;
end;
Yes, this idea looks *much* nicer. And much more Pascalish.
Vinzent.
_______________________________________________
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal