accelerate-1.3.0.0: An embedded language for accelerated array processing
Copyright[2008..2020] The Accelerate Team
LicenseBSD3
MaintainerTrevor L. McDonell <trevor.mcdonell@gmail.com>
Stabilityexperimental
Portabilitynon-portable (GHC extensions)
Safe HaskellSafe-Inferred
LanguageHaskell2010

Data.Array.Accelerate.Debug.Trace

Contents

Description

Functions for tracing and monitoring execution. These are useful for investigating bugs.

Since: 1.4.0.0

Synopsis

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.

atraceId :: (Arrays a, Show a) => Text -> Acc a -> Acc a Source #

Outputs the trace message and the array(s) to the console, before the Acc computation proceeds with the result of that array.

atraceExp :: forall e a. (Elt e, Show e, Arrays a) => Text -> Exp e -> Acc a -> Acc a Source #

Outputs the trace message and a scalar value to the console, before the Acc computation proceeds with the result of the third argument.