If somebody is looking for a discussion to have around the coffee machine:
Consider a computation like
var s = + reduce [i in 1..n] x[i] * y[i];
Is this likely to produce optimal vector code, if not now, into the
future when there is a native compiler.
Or does the language need extra features to achieve things like
dot(-product), e.g. dot(x[1..n], y[1..n])
or
sum
separate from (and simpler than) a reduction to achieve this.
There are probably a heap of issues that this raises, including (say) the
(automatic) blocking to get the best out of a vector unit. Details. I am
not sure even Intel's C++ compiler solves that transparently and Intel
suggests that programmers need to do the blocking by themselves. Search
Intel C++ Array Notation
and see the discussion in several of the documents that it pulls up.
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
------------------------------------------------------------------------------
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