| Safe Haskell | None |
|---|
Data.Yarr.Utils.Primitive
Documentation
Mainly used to fight against GHC simplifier, which gives no chance to LLVM to perform Global Value Numbering optimization.
Copied from repa, see
http://hackage.haskell.org/packages/archive/repa/3.2.3.1/doc/html/Data-Array-Repa-Eval.html
Methods
The function intented to be passed as 3rd parameter
to unrolled- functions in Shape class
and dim2BlockFill.
If your loading operation is strictly local by elements
(in most cases), use noTouch instead of this function.
class PrimitiveOrd a whereSource
GHC simplifier tends to float numeric comparsions as high in execution graph as possible, which in conjunction with loop unrolling sometimes leads to dramatic code bloat.
I'm not sure -M functions work at all,
but strict versions defenitely keep comparsions unfloated.
Methods
Maybe sequential min.
Definetely sequential min.
Maybe sequential max.
Definetely sequential max.
Arguments
| :: a | Min bound |
| -> a | Max bound |
| -> a | Value to clamp |
| -> IO a | Value in bounds |
Maybe sequential clamp.
Arguments
| :: a | Min bound |
| -> a | Max bound |
| -> a | Value to clamp |
| -> IO a | Value in bounds |
Definetely sequential clamp.