Hi,

The following compiles:

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

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

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?

I cannot see what I am doing wrong.

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