repa-flow-4.2.2.1: Data-parallel data flows.

Safe HaskellNone
LanguageHaskell98

Data.Repa.Flow.Chunked.IO

Contents

Description

Input and Output for Chunked Flows.

Most functions in this module are re-exports of the ones from Data.Repa.Flow.Generic.IO, but using the Sources and Sinks type synonyms for chunked flows.

Synopsis

Sourcing

sourceRecords Source

Arguments

:: BulkI l Bucket 
=> Integer

Size of chunk to read in bytes.

-> (Word8 -> Bool)

Detect the end of a record.

-> IO ()

Action to perform if we can't get a whole record.

-> Array l Bucket

File handles.

-> IO (Sources Int IO N (Array F Word8)) 

Like fileSourceRecords, but taking an existing file handle.

sourceChars :: BulkI l Bucket => Integer -> Array l Bucket -> IO (Sources Int IO F Char) Source

Read 8-bit ASCII characters from some files, using the given chunk length.

sourceBytes :: BulkI l Bucket => Integer -> Array l Bucket -> IO (Sources Int IO F Word8) Source

Read data from some files, using the given chunk length.

Sinking

sinkChars :: BulkI l Bucket => Array l Bucket -> IO (Sinks Int IO F Char) Source

Write 8-bit ASCII characters to the given file handles.

sinkBytes :: BulkI l Bucket => Array l Bucket -> IO (Sinks Int IO F Word8) Source

Write chunks of data to the given file handles.