diff options
author | Tom Smeding <tom@tomsmeding.com> | 2024-06-17 13:08:13 +0200 |
---|---|---|
committer | Tom Smeding <tom@tomsmeding.com> | 2024-06-17 13:08:13 +0200 |
commit | 9b0651bf19e889dfb28ba81b6ada25b27b0e6071 (patch) | |
tree | 53dafa55d48d9b73f148426ba5a308cc8cfa6410 /src/Data/Array/Mixed/XArray.hs | |
parent | 3d48baae00c066f43fa2205b22f0357f069888f2 (diff) |
sumAllPrim
Diffstat (limited to 'src/Data/Array/Mixed/XArray.hs')
-rw-r--r-- | src/Data/Array/Mixed/XArray.hs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Data/Array/Mixed/XArray.hs b/src/Data/Array/Mixed/XArray.hs index 08295cd..fa753bb 100644 --- a/src/Data/Array/Mixed/XArray.hs +++ b/src/Data/Array/Mixed/XArray.hs @@ -240,8 +240,8 @@ transpose2 ssh1 ssh2 (XArray arr) , let n1 = ssxLength ssh1 = XArray (S.transpose (ssxIotaFrom n1 ssh2 ++ ssxIotaFrom 0 ssh1) arr) -sumFull :: (Storable a, NumElt a) => XArray sh a -> a -sumFull (XArray arr) = +sumFull :: (Storable a, NumElt a) => StaticShX sh -> XArray sh a -> a +sumFull _ (XArray arr) = S.unScalar $ numEltSum1Inner (SNat @0) $ S.fromVector [product (S.shapeL arr)] $ |