This original mail asked something in addition:


What is the difference between

        for k in j+1..n
        {
                a[k][j] *= aijmax;
        }
and
        [k in j+1..n] a[k][j] *= aijmax;

The first is a serial for loop while the second is a parallel forall loop. '[<ind> in <iter>]' is essentially shorthand for "forall <ind> in <iter>" in Chapel.


        a[j+1..n][j] *= aijmax;

... The last says

u.chpl:69: error: halt reached - array index out of bounds: (1)

This one touches on the response I just sent you.  Think of this as
being similar to:

        var b: [j+1..n] a.eltType = a[j+1..n];
        b[j] *= aijmax;

-Brad



------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Chapel-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/chapel-developers

Reply via email to