Copyright | [2008..2020] The Accelerate Team |
---|---|
License | BSD3 |
Maintainer | Trevor L. McDonell <trevor.mcdonell@gmail.com> |
Stability | experimental |
Portability | non-portable (GHC extensions) |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
Functions for tracing and monitoring execution. These are useful for investigating bugs.
Since: 1.4.0.0
Tracing
The atrace
, atraceArray
, atraceId
, and atraceExp
functions print
messages to an output stream. They are intended for "printf
debugging", that is: tracing the flow of execution and printing
interesting values.
Note that arrays are printed in their internal representation (using
ArraysR
), which causes that tuples
or custom data types are shown differently.
These functions have the same caveats as those defined in Debug.Trace.
atrace :: Arrays a => Text -> Acc a -> Acc a Source #
Outputs the trace message to the console before the Acc
computation
proceeds with the result of the second argument.
atraceArray :: forall a b. (Arrays a, Arrays b, Show a) => Text -> Acc a -> Acc b -> Acc b Source #
Outputs the trace message and the array(s) from the second argument to
the console, before the Acc
computation proceeds with the result of
the third argument.