module Data.Array.Parallel.Base.TracePrim
( tracePrim
, TracePrim(..))
where
import Data.Array.Parallel.Base.Config
import qualified Debug.Trace
tracePrim :: TracePrim -> a -> a
tracePrim tr x
| tracePrimEnabled = Debug.Trace.trace (Prelude.show tr) x
| otherwise = x
data TracePrim
= TraceReplicate { traceCount :: Int}
| TraceRepeat { traceCount :: Int, traceSrcLength :: Int }
| TraceIndex { traceIndex :: Int, traceSrcLength :: Int }
| TraceExtract { traceStart :: Int, traceSliceLength :: Int, traceSrcLength :: Int }
| TraceDrop { traceCount :: Int, traceSrcLength :: Int }
| TracePermute { traceSrcLength :: Int }
| TraceBPermuteDft { traceSrcLength :: Int }
| TraceBPermute { traceSrcLength :: Int }
| TraceMBPermute { traceSrcLength :: Int }
| TraceUpdate { traceSrcLength :: Int, traceModLength :: Int }
| TraceAppend { traceDstLength :: Int }
| TraceInterleave { traceDstLength :: Int }
| TracePack { traceSrcLength :: Int }
| TraceCombine { traceSrcLength :: Int }
| TraceCombine2 { traceSrcLength :: Int }
| TraceMap { traceSrcLength :: Int }
| TraceFilter { traceSrcLength :: Int, traceDstLength :: Int }
| TraceZipWith { traceSrc1Length :: Int, traceSrc2Length :: Int }
| TraceFold { traceSrcLength :: Int }
| TraceFold1 { traceSrcLength :: Int }
| TraceAnd { traceSrcLength :: Int }
| TraceSum { traceSrcLength :: Int }
| TraceScan { traceSrcLength :: Int }
| TraceIndexed { traceSrcLength :: Int }
| TraceEnumFromTo { traceDstLength :: Int }
| TraceEnumFromThenTo { traceDstLength :: Int }
| TraceEnumFromStepLen { traceDstLength :: Int }
| TraceEnumFromStepLenEach { traceDstLength :: Int }
| TraceMkSel2 { traceSrcLength :: Int }
| TraceTagsSel2 { traceDstLength :: Int }
| TraceIndicesSel2 { traceDstLength :: Int }
| TraceElementsSel2_0 { traceSrcLength :: Int }
| TraceElementsSel2_1 { traceSrcLength :: Int }
| TraceMkSelRep2 { traceSrcLength :: Int }
| TraceIndicesSelRep2 { traceSrcLength :: Int }
| TraceElementsSelRep2_0 { traceSrcLength :: Int }
| TraceElementsSelRep2_1 { traceSrcLength :: Int }
| TraceReplicate_s { traceSrcLength :: Int }
| TraceReplicate_rs { traceCount :: Int, traceSrcLength :: Int }
| TraceAppend_s { traceDstLength :: Int }
| TraceFold_s { traceSrcLength :: Int }
| TraceFold1_s { traceSrcLength :: Int }
| TraceFold_r { traceSrcLength :: Int }
| TraceSum_r { traceSrcLength :: Int }
| TraceIndices_s { traceDstLength :: Int }
deriving Prelude.Show