| Safe Haskell | Safe-Inferred | 
|---|---|
| Language | Haskell2010 | 
Data.Repa.Eval.Generic.Seq
Description
Generic sequential array computation operators.
Synopsis
- fillLinear :: (Int# -> a -> IO ()) -> (Int# -> a) -> Int# -> IO ()
 - fillBlock2 :: (Int# -> a -> IO ()) -> (Int# -> Int# -> a) -> Int# -> Int# -> Int# -> Int# -> Int# -> IO ()
 - fillCursoredBlock2 :: Elt a => (Int# -> a -> IO ()) -> (Int# -> Int# -> cursor) -> (Int# -> Int# -> cursor -> cursor) -> (cursor -> a) -> Int# -> Int# -> Int# -> Int# -> Int# -> IO ()
 - foldAll :: (Int# -> a) -> (a -> a -> a) -> a -> Int# -> a
 - foldRange :: (Int# -> a) -> (a -> a -> a) -> a -> Int# -> Int# -> a
 - foldInner :: (Int# -> a -> IO ()) -> (Int# -> a) -> (a -> a -> a) -> a -> Int# -> Int# -> IO ()
 
Filling
Arguments
| :: (Int# -> a -> IO ()) | Update function to write into result buffer.  | 
| -> (Int# -> a) | Function to get the value at a given index.  | 
| -> Int# | Number of elements to fill.  | 
| -> IO () | 
Fill something sequentially.
- The array is filled linearly from start to finish.
 
Arguments
| :: (Int# -> a -> IO ()) | Update function to write into result buffer.  | 
| -> (Int# -> Int# -> a) | Function to get the value at an (x, y) index.  | 
| -> Int# | Width of the whole array.  | 
| -> Int# | x0 lower left corner of block to fill.  | 
| -> Int# | y0  | 
| -> Int# | w0 width of block to fill  | 
| -> Int# | h0 height of block to fill  | 
| -> IO () | 
Fill a block in a rank-2 array, sequentially.
- Blockwise filling can be more cache-efficient than linear filling for rank-2 arrays.
 - The block is filled in row major order from top to bottom.
 
Arguments
| :: Elt a | |
| => (Int# -> a -> IO ()) | Update function to write into result buffer.  | 
| -> (Int# -> Int# -> cursor) | Make a cursor to a particular element from an (x, y) index.  | 
| -> (Int# -> Int# -> cursor -> cursor) | Shift the cursor by an (x, y) offset.  | 
| -> (cursor -> a) | Function to evaluate an element at the given index.  | 
| -> Int# | Width of the whole array.  | 
| -> Int# | x0 lower left corner of block to fill.  | 
| -> Int# | y0  | 
| -> Int# | w0 width of block to fill  | 
| -> Int# | h0 height of block to fill  | 
| -> IO () | 
Fill a block in a rank-2 array, sequentially.
- Blockwise filling can be more cache-efficient than linear filling for rank-2 arrays.
 - Using cursor functions can help to expose inter-element indexing computations to the GHC and LLVM optimisers.
 - Coordinates given are of the filled edges of the block.
 - The block is filled in row major order from top to bottom.
 - We need the 
Eltconstraint so that we can use itstouchfunction to provide an order of evaluation ammenable to the LLVM optimiser. You should compile your Haskell program with-fllvm -optlo-O3to enable LLVM's Global Value Numbering optimisation. 
Reduction
Arguments
| :: (Int# -> a) | Function to get an element from the source.  | 
| -> (a -> a -> a) | Binary associative combining function.  | 
| -> a | Neutral starting value.  | 
| -> Int# | Number of elements.  | 
| -> a | 
Sequential reduction of all the elements in an array.
Arguments
| :: (Int# -> a) | Function to get an element from the source.  | 
| -> (a -> a -> a) | Binary associative combining function.  | 
| -> a | Neutral starting value.  | 
| -> Int# | Starting index.  | 
| -> Int# | Ending index.  | 
| -> a | 
Sequentially reduce values between the given indices.
Arguments
| :: (Int# -> a -> IO ()) | Function to write into the result buffer.  | 
| -> (Int# -> a) | Function to get an element from the source.  | 
| -> (a -> a -> a) | Binary associative combination function.  | 
| -> a | Neutral starting value.  | 
| -> Int# | Total length of source.  | 
| -> Int# | Inner dimension (length to fold over).  | 
| -> IO () | 
Sequential reduction of a multidimensional array along the innermost dimension.