HaskellWorks.Data.Vector.Storable

hw-prim-0.6.3.2: Primitive functions and data types

Safe Haskell | None
Language | Haskell2010

HaskellWorks.Data.Vector.Storable

Synopsis

- padded :: Int -> Vector Word8 -> Vector Word8
- foldMap :: (Storable a, Monoid m) => (a -> m) -> Vector a -> m
- mapAccumL :: forall a b c. (Storable b, Storable c) => (a -> b -> (a, c)) -> a -> Vector b -> (a, Vector c)
- mmap :: Storable a => FilePath -> IO (Vector a)
- constructSI :: Storable a => Int -> (Int -> s -> (s, a)) -> s -> (s, Vector a)
- construct2N :: (Storable b, Storable c) => Int -> (forall s. a -> MVector s b -> ST s Int) -> Int -> (forall s. a -> MVector s c -> ST s Int) -> [a] -> (Vector b, Vector c)
- construct64UnzipN :: Int -> [(ByteString, ByteString)] -> (Vector Word64, Vector Word64)
- unzipFromListN2 :: (Storable a, Storable b) => Int -> [(a, b)] -> (Vector a, Vector b)

# Documentation

padded :: Int -> Vector Word8 -> Vector Word8 #

foldMap :: (Storable a, Monoid m) => (a -> m) -> Vector a -> m #

mapAccumL :: forall a b c. (Storable b, Storable c) => (a -> b -> (a, c)) -> a -> Vector b -> (a, Vector c) #

mmap :: Storable a => FilePath -> IO (Vector a) #

MMap the file as a storable vector. If the size of the file is not a multiple of the element size in bytes, then the last few bytes of the file will not be included in the vector.

constructSI :: Storable a => Int -> (Int -> s -> (s, a)) -> s -> (s, Vector a) #

Construct a vector statefully with index

construct2N :: (Storable b, Storable c) => Int -> (forall s. a -> MVector s b -> ST s Int) -> Int -> (forall s. a -> MVector s c -> ST s Int) -> [a] -> (Vector b, Vector c) #

construct64UnzipN :: Int -> [(ByteString, ByteString)] -> (Vector Word64, Vector Word64) #

unzipFromListN2 :: (Storable a, Storable b) => Int -> [(a, b)] -> (Vector a, Vector b) #