module Data.Vector.Dense.Class.Copying (
newCopyVector,
copyVector,
swapVector,
unsafeCopyVector,
unsafeSwapVector,
) where
import BLAS.C( BLAS1 )
import qualified BLAS.C as BLAS
import BLAS.Internal( checkBinaryOp )
import BLAS.Tensor
import Data.Vector.Dense.Class.Internal
copyVector :: (BLAS1 e, WriteVector y m, ReadVector x m) =>
y n e -> x n e -> m ()
copyVector y x = checkBinaryOp (shape x) (shape y) $ unsafeCopyVector y x
swapVector :: (BLAS1 e, WriteVector y m) =>
y n e -> y n e -> m ()
swapVector x y = checkBinaryOp (shape x) (shape y) $ unsafeSwapVector x y