diff options
Diffstat (limited to 'src/ForwardAD.hs')
-rw-r--r-- | src/ForwardAD.hs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/ForwardAD.hs b/src/ForwardAD.hs index e867d66..af35f91 100644 --- a/src/ForwardAD.hs +++ b/src/ForwardAD.hs @@ -85,6 +85,10 @@ tanScalars (STScal STF64) x = [x] tanScalars (STScal STBool) _ = [] tanScalars STAccum{} _ = error "Accumulators not allowed in input program" +tanEScalars :: SList STy env -> SList Value (TanE env) -> [Double] +tanEScalars SNil SNil = [] +tanEScalars (t `SCons` ts) (Value x `SCons` xs) = tanScalars t x ++ tanEScalars ts xs + unzipDN :: STy t -> Rep (DN t) -> (Rep t, Rep (Tan t)) unzipDN STNil _ = ((), ()) unzipDN (STPair a b) (d1, d2) = |