diff options
author | Tom Smeding <tom@tomsmeding.com> | 2025-03-12 23:20:13 +0100 |
---|---|---|
committer | Tom Smeding <tom@tomsmeding.com> | 2025-03-13 09:27:51 +0100 |
commit | ed6acbe5f409aba2fb222693da567ce04b7c4e01 (patch) | |
tree | becbef3f3afeed63c248f057dae6fef0cb6c6147 /src/Data/Array/Mixed/Internal/Arith/Foreign.hs | |
parent | bcda5b7eb20874f948fbdc23b6daa3ebb792ffe0 (diff) |
Implement quot/rem
Diffstat (limited to 'src/Data/Array/Mixed/Internal/Arith/Foreign.hs')
-rw-r--r-- | src/Data/Array/Mixed/Internal/Arith/Foreign.hs | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/Data/Array/Mixed/Internal/Arith/Foreign.hs b/src/Data/Array/Mixed/Internal/Arith/Foreign.hs index fa89766..15fbc79 100644 --- a/src/Data/Array/Mixed/Internal/Arith/Foreign.hs +++ b/src/Data/Array/Mixed/Internal/Arith/Foreign.hs @@ -25,6 +25,12 @@ $(do ,("dotprodinner_" ++ tyn, [t| Int64 -> Ptr Int64 -> Ptr $ttyp -> Ptr Int64 -> Ptr $ttyp -> Ptr Int64 -> Ptr $ttyp -> IO () |]) ] + let importsInt ttyp tyn = + [("ibinary_" ++ tyn ++ "_vv_strided", [t| CInt -> Int64 -> Ptr Int64 -> Ptr $ttyp -> Ptr Int64 -> Ptr $ttyp -> Ptr Int64 -> Ptr $ttyp -> IO () |]) + ,("ibinary_" ++ tyn ++ "_sv_strided", [t| CInt -> Int64 -> Ptr Int64 -> Ptr $ttyp -> $ttyp -> Ptr Int64 -> Ptr $ttyp -> IO () |]) + ,("ibinary_" ++ tyn ++ "_vs_strided", [t| CInt -> Int64 -> Ptr Int64 -> Ptr $ttyp -> Ptr Int64 -> Ptr $ttyp -> $ttyp -> IO () |]) + ] + let importsFloat ttyp tyn = [("fbinary_" ++ tyn ++ "_vv_strided", [t| CInt -> Int64 -> Ptr Int64 -> Ptr $ttyp -> Ptr Int64 -> Ptr $ttyp -> Ptr Int64 -> Ptr $ttyp -> IO () |]) ,("fbinary_" ++ tyn ++ "_sv_strided", [t| CInt -> Int64 -> Ptr Int64 -> Ptr $ttyp -> $ttyp -> Ptr Int64 -> Ptr $ttyp -> IO () |]) @@ -38,5 +44,6 @@ $(do | arithtype <- types , (name, typ) <- imports (conT (atType arithtype)) (atCName arithtype)] decs1 <- generate typesList importsScal - decs2 <- generate floatTypesList importsFloat - return (decs1 ++ decs2)) + decs2 <- generate intTypesList importsInt + decs3 <- generate floatTypesList importsFloat + return (decs1 ++ decs2 ++ decs3)) |