Skip to content

Commit d8aa518

Browse files
committed
Comment what's needed too solve a sharing TODO
1 parent 7261574 commit d8aa518

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/HordeAd/Core/CarriersAst.hs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -874,6 +874,10 @@ instance (AstSpan s, GoodScalar r) => OrdH (AstTensor ms s) (TKX sh r) where
874874
instance (AstSpan s, GoodScalar r)
875875
=> EqH (AstTensor ms s) (TKScalar r) where
876876
v ==. u = v <=. u &&* u <=. v
877+
{- TODO: for this to work, booleans have to be first-class:
878+
vUnshared ==. uUnshared = astLetFunNoSimplify vUnshared $ \v ->
879+
astLetFunNoSimplify uUnshared $ \u ->
880+
v <=. u &&* u <=. v -}
877881

878882
instance (AstSpan s, GoodScalar r)
879883
=> EqH (AstTensor ms s) (TKS sh r) where

0 commit comments

Comments
 (0)