
Thanks a lot Ben!
Shame on me, I've really forgotten that PRAGMA line, but now everything
works as it should...
[]s
João Paulo Pizani Flor
joaopizani@gmail.com
Computer Science - 2007
Federal University of Santa Catarina - Brazil
On Wed, Sep 29, 2010 at 4:27 AM, Ben Lippmeier
Has someone been able to successfully compile and run this example code?? If so, what am I doing wrong? Is there some obvious error I'm incurring in? :D
It's because you didn't add {-# OPTIONS -fvectorise #-} when compiling the DPHVectMul.hs module. The GHC vectoriser rewrites calls to fromPArrayP to the real implementations in its back-end library, but if the vectoriser doesn't run you get the default implementation which is just "undefined". I agree its an atrocious error message. It should have a real one in the head / GHC 7.0
You can also add -fvectorise on the command line, but I prefer using the OPTIONS pragma because it's less easy to forget.
Ben.