module Examples.Simple.Trace where import qualified Prelude import Feldspar import Feldspar.Vector import Feldspar.Compiler --- | Example showing the application of tracing function. --- Creating three tracing point for each loop cycle, --- tracing two inputs and result of '+' operation. traceExample :: Data [Int32] -> Data Int32 traceExample xs = fold (\x y -> trace 3 $ trace 1 x + trace 2 y) 0 $ thawVector' 255 xs