diff options
author | Tom Smeding <tom@tomsmeding.com> | 2025-06-18 10:10:50 +0200 |
---|---|---|
committer | Tom Smeding <tom@tomsmeding.com> | 2025-06-18 10:10:50 +0200 |
commit | 58f68a4d077c2d58c3974ad12853207512277a33 (patch) | |
tree | fbd08cdc677a26a6edbfa850ec8604eda51797e7 /src/CHAD.hs | |
parent | 3db7d00b3248d746aa99f57b117d5722cbe90df0 (diff) |
Put smart accumulator redirection behind config flag
Diffstat (limited to 'src/CHAD.hs')
-rw-r--r-- | src/CHAD.hs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/CHAD.hs b/src/CHAD.hs index 9fa7f9a..3399de2 100644 --- a/src/CHAD.hs +++ b/src/CHAD.hs @@ -1310,7 +1310,8 @@ drevScoped des accumMap argty argsto argids sd expr = case argsto of SENo sub' -> RetScoped e0 (subenvConcat (SENo @(D1 a) SETop) subtape) e1 sub' SpAbsent (EPair ext e2 (ENil ext)) SAccum - | Just (VIArr i _) <- argids + | chcSmartWith ?config + , Just (VIArr i _) <- argids , Just (Some (VarMap.TypedIdx foundTy idx)) <- VarMap.lookup i accumMap , Just Refl <- testEquality foundTy (STAccum (d2M argty)) , Ret e0 (subtape :: Subenv _ tapebinds) e1 sub e2 <- drev (des `DPush` (argty, argids, argsto)) (VarMap.sink1 accumMap) sd expr |