repa-array-4.0.0.2: Bulk array representations and operators.

Safe HaskellNone
LanguageHaskell98

Data.Repa.IO.Array

Synopsis

Documentation

hGetArray :: Handle -> Int -> IO (Array F Word8) Source

Get data from a file, up to the given number of bytes.

  • Data is read into foreign memory without copying it through the GHC heap.

hGetArrayPre :: Handle -> Int -> Array F Word8 -> IO (Array F Word8) Source

Get data from a file, up to the given number of bytes, also copying the given data to the front of the new buffer.

  • Data is read into foreign memory without copying it through the GHC heap.

hPutArray :: Handle -> Array F Word8 -> IO () Source

Write data into a file.

  • Data is written to file directly from foreign memory, without copying it through the GHC heap.

hGetArrayFromCSV :: Handle -> IO (Array N (Array N (Array F Char))) Source

Read a CSV file as a nested array. We get an array of rows:fields:characters.

hPutArrayAsCSV :: (BulkI l1 (Array l2 (Array l3 Char)), BulkI l2 (Array l3 Char), BulkI l3 Char, Unpack (Array l3 Char) t) => Handle -> Array l1 (Array l2 (Array l3 Char)) -> IO () Source

Write a nested array as a CSV file. The array contains rows:fields:characters.