repa-3.4.1.3: High performance, regular, shape polymorphic parallel arrays.

Safe HaskellNone
LanguageHaskell98

Data.Array.Repa.Repr.Vector

Synopsis

Documentation

data V Source #

Arrays represented as boxed vectors.

This representation should only be used when your element type doesn't have an Unbox instsance. If it does, then use the Unboxed U representation will be faster.

Instances

Source V a Source #

Read elements from a boxed vector array.

Associated Types

data Array V sh a :: * Source #

Methods

extent :: Shape sh => Array V sh a -> sh Source #

index :: Shape sh => Array V sh a -> sh -> a Source #

unsafeIndex :: Shape sh => Array V sh a -> sh -> a Source #

linearIndex :: Shape sh => Array V sh a -> Int -> a Source #

unsafeLinearIndex :: Shape sh => Array V sh a -> Int -> a Source #

deepSeqArray :: Shape sh => Array V sh a -> b -> b Source #

Target V e Source #

Filling of boxed vector arrays.

Associated Types

data MVec V e :: * Source #

Methods

newMVec :: Int -> IO (MVec V e) Source #

unsafeWriteMVec :: MVec V e -> Int -> e -> IO () Source #

unsafeFreezeMVec :: sh -> MVec V e -> IO (Array V sh e) Source #

deepSeqMVec :: MVec V e -> a -> a Source #

touchMVec :: MVec V e -> IO () Source #

(Read sh, Read e) => Read (Array V sh e) Source # 

Methods

readsPrec :: Int -> ReadS (Array V sh e) #

readList :: ReadS [Array V sh e] #

readPrec :: ReadPrec (Array V sh e) #

readListPrec :: ReadPrec [Array V sh e] #

(Show sh, Show e) => Show (Array V sh e) Source # 

Methods

showsPrec :: Int -> Array V sh e -> ShowS #

show :: Array V sh e -> String #

showList :: [Array V sh e] -> ShowS #

data Array V Source # 
data Array V = AVector !sh !(Vector a)
data MVec V Source # 
data MVec V = MVector (IOVector e)

computeVectorS :: Load r1 sh e => Array r1 sh e -> Array V sh e Source #

Sequential computation of array elements.

  • This is an alias for compute with a more specific type.

computeVectorP :: (Load r1 sh e, Monad m) => Array r1 sh e -> m (Array V sh e) Source #

Parallel computation of array elements.

fromListVector :: Shape sh => sh -> [a] -> Array V sh a Source #

O(n). Convert a list to a boxed vector array.

  • This is an alias for fromList with a more specific type.

fromVector :: sh -> Vector e -> Array V sh e Source #

O(1). Wrap a boxed vector as an array.

toVector :: Array V sh e -> Vector e Source #

O(1). Unpack a boxed vector from an array.