Safe Haskell | None |
---|---|
Language | Haskell98 |
- class Touchable a where
- noTouch :: a -> IO ()
- class PrimitiveOrd a where
Documentation
class Touchable a where Source #
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
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 where Source #
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.
minM :: a -> a -> IO a Source #
Maybe sequential min
.
minM' :: a -> a -> IO a Source #
Definetely sequential min
.
maxM :: a -> a -> IO a Source #
Maybe sequential max
.
maxM' :: a -> a -> IO a Source #
Definetely sequential max
.
clampM :: a -> a -> a -> IO a Source #
Maybe sequential clamp.
clampM' :: a -> a -> a -> IO a Source #
Definetely sequential clamp.