On Thu, 2 Jul 2020, Damian McGuckin wrote:

The domain of 'a' and 'b' are the same. So I should be able to write:

         proc dot(const ref a : [?asize] ?T, ref b :[asize] T) : T
         {
                 var s = 0.0:T;

                 for (ai, bi) in zip(a, b) do
                 {
                        s += ai * bi;
                 }
                 return s;
         }

Chapel complains vehemently.  Why?

Sorry, I should clarify.

        chpl --fast

will compile it cleanly. Without --fast, the compiler complains.

Regards - Damian

Pacific Engineering Systems International, 277-279 Broadway, Glebe NSW 2037
Ph:+61-2-8571-0847 .. Fx:+61-2-9692-9623 | unsolicited email not wanted here
Views & opinions here are mine and not those of any past or present employer


_______________________________________________
Chapel-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/chapel-developers

Reply via email to