diff options
| author | Tom Smeding <tom@tomsmeding.com> | 2025-10-30 15:56:35 +0100 |
|---|---|---|
| committer | Tom Smeding <tom@tomsmeding.com> | 2025-10-30 15:56:35 +0100 |
| commit | 4d456e4d34b1e4fb3725051d1b8a0c376b704692 (patch) | |
| tree | 1385217efcc0b58ddb028e707e6a5a36b884ed65 /src/Language.hs | |
| parent | 0e8e59c5f9af547cf1b79b9bae892e32700ace56 (diff) | |
Implement reshape
Diffstat (limited to 'src/Language.hs')
| -rw-r--r-- | src/Language.hs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/Language.hs b/src/Language.hs index 4e6d604..d3c38d6 100644 --- a/src/Language.hs +++ b/src/Language.hs @@ -130,6 +130,9 @@ maximum1i e = NEMaximum1Inner e minimum1i :: ScalIsNumeric t ~ True => NExpr env (TArr (S n) (TScal t)) -> NExpr env (TArr n (TScal t)) minimum1i e = NEMinimum1Inner e +reshape :: SNat n -> NExpr env (Tup (Replicate n TIx)) -> NExpr env (TArr m t) -> NExpr env (TArr n t) +reshape = NEReshape + const_ :: KnownScalTy t => ScalRep t -> NExpr env (TScal t) const_ x = let ty = knownScalTy |
