DotPPar.hs 209 Bytes
Newer Older
rl@cse.unsw.edu.au's avatar
rl@cse.unsw.edu.au committed
1
2
3
4
5
6
7
8
9
module DotPPar where

import Data.Array.Parallel.Unlifted
import Data.Array.Parallel.Unlifted.Parallel

dotp :: UArr Double -> UArr Double -> Double
{-# NOINLINE dotp #-}
dotp v w = sumUP (zipWithUP (*) v w)