ddot :: Acc (Vector Double) -> Acc (Vector Double) -> Acc (Scalar Double)
ddot v1 v2 = foreignAcc foreignDPD pureDPD $ lift (v1, v2)
  where foreignDPD = CUDAForeignAcc "cudaDotProductD" cudaDotProductD
        
        pureDPD :: Acc (Vector Double, Vector Double) -> Acc (Scalar Double)
        pureDPD vs = let (u, v) = unlift vs
                     in fold (+) 0 $ zipWith (*) u v
ddot :: Acc (Vector Double) -> Acc (Vector Double) -> Acc (Scalar Double)
ddot v1 v2 = foreignAcc foreignDPD pureDPD $ lift (v1, v2)
  where foreignDPD = CUDAForeignAcc "cudaDotProductD" cudaDotProductD
        
        pureDPD :: Acc (Vector Double, Vector Double) -> Acc (Scalar Double)
        pureDPD vs = let (u, v) = unlift vs
                     in fold (+) 0 $ zipWith (*) u v
ddot v1 v2 = foreignAcc foreignDPD pureDPD $ lift (v1, v2)
  where foreignDPD = CUDAForeignAcc "cudaDotProductD" cudaDotProductD
        
        pureDPD :: Acc (Vector Double, Vector Double) -> Acc (Scalar Double)
        pureDPD vs = let (u, v) = unlift vs
                     in fold (+) 0 $ zipWith (*) u v