-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Read and write Repa arrays in various formats. -- -- Read and write Repa arrays in various formats. @package repa-io @version 3.2.3.2 -- | Timing utilities used for benchmarks in the repa-examples -- package. module Data.Array.Repa.IO.Timing -- | Abstract representation of process time. data Time milliseconds :: TimeUnit microseconds :: TimeUnit cpuTime :: TimeUnit -> Time -> Integer wallTime :: TimeUnit -> Time -> Integer -- | Time some IO action. Make sure to deepseq the result before returning -- it from the action. If you don't do this then there's a good chance -- that you'll just pass a suspension out of the action, and the -- computation time will be zero. time :: IO a -> IO (a, Time) -- | Subtract second time from the first. minus :: Time -> Time -> Time -- | Add two times. plus :: Time -> Time -> Time -- | Show a time as a string, in milliseconds. showTime :: Time -> String -- | Pretty print the times, in milliseconds. prettyTime :: Time -> String -- | Read and write vectors as ASCII text files. -- -- The file format is like: -- --
--   VECTOR			-- header
--   100			-- length of vector
--   1.23 1.56 1.23 ...	-- data, separated by whitespace
--   ....
--   
module Data.Array.Repa.IO.Vector -- | Read a vector from a text file. -- -- readVectorFromTextFile :: (Num e, Read e, Unbox e) => FilePath -> IO (Array U DIM1 e) -- | Write a vector as a text file. writeVectorToTextFile :: (Show e, Source r e) => Array r DIM1 e -> FilePath -> IO () -- | Read and write matrices as ASCII text files. -- -- The file format is like: -- --
--   MATRIX			-- header
--   100 100			-- width and height
--   1.23 1.56 1.23 ...	-- data, separated by whitespace
--   ....
--   
module Data.Array.Repa.IO.Matrix -- | Read a matrix from a text file. -- -- readMatrixFromTextFile :: (Num e, Read e, Unbox e) => FilePath -> IO (Array U DIM2 e) -- | Write a matrix as a text file. writeMatrixToTextFile :: (Show e, Source r e) => FilePath -> Array r DIM2 e -> IO () -- | Reading and writing arrays as uncompressed 24 or 32 bit Windows BMP -- files. module Data.Array.Repa.IO.BMP -- | Read RGB components from a BMP file. readImageFromBMP :: FilePath -> IO (Either Error (Array U DIM2 (Word8, Word8, Word8))) -- | Write RGB components to a BMP file. writeImageToBMP :: FilePath -> Array U DIM2 (Word8, Word8, Word8) -> IO () -- | Reading and writing Repa arrays as binary files. module Data.Array.Repa.IO.Binary -- | Read an array from a file. Data appears in host byte order. If the -- file size does match the provided shape then error. readArrayFromStorableFile :: (Shape sh, Storable a) => FilePath -> sh -> IO (Array F sh a) -- | Write an array to a file. Data appears in host byte order. writeArrayToStorableFile :: (Shape sh, Source r a, Storable a) => FilePath -> Array r sh a -> IO ()