For me the whole OpenMP approach is really artifical, I don't see a real
use in real world code for it honestly
IMHO, it _would_ be nice to do a matrix multiplication like this (or according to proposal 2 with "parallel for"):

procedure MultMatrix(const mr, m1, m2: TMatrix;);
var ll: integer;

 procedure MultLine (l: integer); parallel;
var i, j: Integer;
   sum: TMatrixElement;
 begin
   for i := 0 to length(m1)-1 do begin
     sum := 0;
     for j := 0 to length(m2)-1 do begin
       sum := sum + m1[l, j] * m2[j, i];
     end;
     mr[l, i] := sum;
   end;
 end;

begin
for l = 0 to length(m1)-1 do begin MultLine(l);
   end;
end;


But as said, I suppose implementation of a compiler that can handle this might be too much work for anybody to start with that project.

-Michael

_______________________________________________
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel

Reply via email to