Jump to content
Sign in to follow this  
shixnazar

Where is the error in Parallel.for?

Recommended Posts

begin
  h := 1 / (n - 1);              x[1]:= 0;            y[1]:= 0;
  for I := 2 to n do
  begin
    x:=x[i-1]+h;            y:=y[i-1]+h;
  end;

      for j := 1 to n do
          for I := 2 to n do
              p0[j]:=1;
//TParallel.For(1,nt,procedure(jt:Int64; i:Int64; j:Int64)
for jt := 1 to nt do
  begin
    t[jt]:=jt*tau;
    for j := 1 to n do

      for I := 1 to n do
           pt[j]:=exp(-2*x*y[j]*t[jt]);

     //TParallel.For(2,trunc(n/2+1),procedure(j:Int64; i:Int64)
     for j := 2 to trunc(n/2+1) do
         begin
           TParallel.For(2, n-1,procedure(i:Int64; j:Int64)
           //for i := 2 to n-1 do
             begin
              a:=1;
                          c:=1;
                          b:=2+2*h*h/tau;
                          ff:=h*h*(-2*(2*t[jt]*t[jt]*(x*x+y[j]*y[j])+x*y[j])*exp(-2*x*y[j]*t[jt]));
                          d:=2*h*h/tau*p0[j]+(p0[j-1]-2*p0[j]+p0[j+1])+ff;
             end);

end;

end;

end;

end;
 

 

 

Error: E2250 There is no overloaded version of 'For' that can be called with these arguments.

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  
×