Psst.. new poll here.
Psst.. new forums here.
Microsoft is blocking us again (TY IP Reputation!) so dont bother with any of their useless mail servers here and just use oauth login instead. Thank the nice Russians for causing that. :)
Paste
Pasted as Haskell by joaopizani ( 16 years ago )
{-# LANGUAGE PArr, ParallelListComp #-}
module DPHVecMul (dotp,
dotp_pure) where
import qualified Prelude
import Data.Array.Parallel.Prelude
import Data.Array.Parallel.Prelude.Double
dotp_pure :: [:Double:] -> [:Double:] -> Double
dotp_pure xs ys = sumP [: x * y | x <- xs | y <- ys :]
dotp :: PArray Double -> PArray Double -> Double
{-# NOINLINE dotp #-}
dotp v w = dotp_pure (fromPArrayP v) (fromPArrayP w)
Revise this Paste