repa-stream-4.0.0.1: Stream functions not present in the vector library.

Safe HaskellNone
LanguageHaskell98

Data.Repa.Vector.Generic

Contents

Description

Converting Streams and Chains to and from generic Vectors.

  • NOTE: Support for streams of unknown length is not complete.

Synopsis

Stream functions

unstreamToVector2 Source

Arguments

:: (PrimMonad m, Vector v a, Vector v b) 
=> Stream m (Maybe a, Maybe b)

Source data.

-> m (v a, v b)

Resulting vectors.

Unstream some elements to two separate vectors.

Nothing values are ignored.

unstreamToMVector2 Source

Arguments

:: (PrimMonad m, MVector v a, MVector v b) 
=> Stream m (Maybe a, Maybe b)

Source data.

-> m (v (PrimState m) a, v (PrimState m) b)

Resulting vectors.

Unstream some elements to two separate mutable vectors.

Nothing values are ignored.

Chain functions

chainOfVector :: (Monad m, Vector v a) => v a -> Chain m Int a Source

Produce a chain from a generic vector.

unchainToVector :: (PrimMonad m, Vector v a) => Chain m s a -> m (v a, s) Source

Compute a chain into a generic vector.

unchainToMVector :: (PrimMonad m, MVector v a) => Chain m s a -> m (v (PrimState m) a, s) Source

Compute a chain into a generic mutable vector.