Use n-ary sums and products for NDP's generic representation
authorRoman Leshchinskiy <rl@cse.unsw.edu.au>
Thu, 23 Aug 2007 06:09:45 +0000 (06:09 +0000)
committerRoman Leshchinskiy <rl@cse.unsw.edu.au>
Thu, 23 Aug 2007 06:09:45 +0000 (06:09 +0000)
commita52f14894e48d47e62b5b33f7d7f4b3f2cc88a79
tree03298d375afebcd42046995ee885c97f547443d5
parent88aa9117c3bd185e96a0bdc2e935afe180c6decc
Use n-ary sums and products for NDP's generic representation

Originally, we wanted to only use binary ones, at least initially. But this
would a lot of fiddling with selectors when converting to/from generic
array representations. This is both inefficient and hard to implement.
Instead, we will limit the arity of our sums/product representation to, say,
16 (it's 3 at the moment) and initially refuse to vectorise programs for which
this is not sufficient. This allows us to implement everything in the library.
Later, we can implement the necessary splitting.
compiler/prelude/PrelNames.lhs
compiler/vectorise/VectBuiltIn.hs
compiler/vectorise/VectMonad.hs
compiler/vectorise/VectUtils.hs