aboutsummaryrefslogtreecommitdiff
path: root/src/Data/Array/Nested/Internal
diff options
context:
space:
mode:
authorTom Smeding <t.j.smeding@uu.nl>2024-05-27 14:10:57 +0200
committerTom Smeding <t.j.smeding@uu.nl>2024-05-27 14:10:57 +0200
commit9e5945120bbcfeff15ee7356398e06ab5ba25561 (patch)
tree9e9432d60b901776ebf552b501724e4c0a7b18f3 /src/Data/Array/Nested/Internal
parente80b2593edc3d216905279ebcfa797593a1efbfc (diff)
Fast (C) Floating ops
Diffstat (limited to 'src/Data/Array/Nested/Internal')
-rw-r--r--src/Data/Array/Nested/Internal/Arith.hs63
1 files changed, 63 insertions, 0 deletions
diff --git a/src/Data/Array/Nested/Internal/Arith.hs b/src/Data/Array/Nested/Internal/Arith.hs
index 07d5d8a..95fcfcf 100644
--- a/src/Data/Array/Nested/Internal/Arith.hs
+++ b/src/Data/Array/Nested/Internal/Arith.hs
@@ -361,12 +361,75 @@ instance NumElt CInt where
class FloatElt a where
floatEltDiv :: SNat n -> RS.Array n a -> RS.Array n a -> RS.Array n a
+ floatEltPow :: SNat n -> RS.Array n a -> RS.Array n a -> RS.Array n a
+ floatEltLogbase :: SNat n -> RS.Array n a -> RS.Array n a -> RS.Array n a
floatEltRecip :: SNat n -> RS.Array n a -> RS.Array n a
+ floatEltExp :: SNat n -> RS.Array n a -> RS.Array n a
+ floatEltLog :: SNat n -> RS.Array n a -> RS.Array n a
+ floatEltSqrt :: SNat n -> RS.Array n a -> RS.Array n a
+ floatEltSin :: SNat n -> RS.Array n a -> RS.Array n a
+ floatEltCos :: SNat n -> RS.Array n a -> RS.Array n a
+ floatEltTan :: SNat n -> RS.Array n a -> RS.Array n a
+ floatEltAsin :: SNat n -> RS.Array n a -> RS.Array n a
+ floatEltAcos :: SNat n -> RS.Array n a -> RS.Array n a
+ floatEltAtan :: SNat n -> RS.Array n a -> RS.Array n a
+ floatEltSinh :: SNat n -> RS.Array n a -> RS.Array n a
+ floatEltCosh :: SNat n -> RS.Array n a -> RS.Array n a
+ floatEltTanh :: SNat n -> RS.Array n a -> RS.Array n a
+ floatEltAsinh :: SNat n -> RS.Array n a -> RS.Array n a
+ floatEltAcosh :: SNat n -> RS.Array n a -> RS.Array n a
+ floatEltAtanh :: SNat n -> RS.Array n a -> RS.Array n a
+ floatEltLog1p :: SNat n -> RS.Array n a -> RS.Array n a
+ floatEltExpm1 :: SNat n -> RS.Array n a -> RS.Array n a
+ floatEltLog1pexp :: SNat n -> RS.Array n a -> RS.Array n a
+ floatEltLog1mexp :: SNat n -> RS.Array n a -> RS.Array n a
instance FloatElt Float where
floatEltDiv = divVectorFloat
+ floatEltPow = powVectorFloat
+ floatEltLogbase = logbaseVectorFloat
floatEltRecip = recipVectorFloat
+ floatEltExp = expVectorFloat
+ floatEltLog = logVectorFloat
+ floatEltSqrt = sqrtVectorFloat
+ floatEltSin = sinVectorFloat
+ floatEltCos = cosVectorFloat
+ floatEltTan = tanVectorFloat
+ floatEltAsin = asinVectorFloat
+ floatEltAcos = acosVectorFloat
+ floatEltAtan = atanVectorFloat
+ floatEltSinh = sinhVectorFloat
+ floatEltCosh = coshVectorFloat
+ floatEltTanh = tanhVectorFloat
+ floatEltAsinh = asinhVectorFloat
+ floatEltAcosh = acoshVectorFloat
+ floatEltAtanh = atanhVectorFloat
+ floatEltLog1p = log1pVectorFloat
+ floatEltExpm1 = expm1VectorFloat
+ floatEltLog1pexp = log1pexpVectorFloat
+ floatEltLog1mexp = log1mexpVectorFloat
instance FloatElt Double where
floatEltDiv = divVectorDouble
+ floatEltPow = powVectorDouble
+ floatEltLogbase = logbaseVectorDouble
floatEltRecip = recipVectorDouble
+ floatEltExp = expVectorDouble
+ floatEltLog = logVectorDouble
+ floatEltSqrt = sqrtVectorDouble
+ floatEltSin = sinVectorDouble
+ floatEltCos = cosVectorDouble
+ floatEltTan = tanVectorDouble
+ floatEltAsin = asinVectorDouble
+ floatEltAcos = acosVectorDouble
+ floatEltAtan = atanVectorDouble
+ floatEltSinh = sinhVectorDouble
+ floatEltCosh = coshVectorDouble
+ floatEltTanh = tanhVectorDouble
+ floatEltAsinh = asinhVectorDouble
+ floatEltAcosh = acoshVectorDouble
+ floatEltAtanh = atanhVectorDouble
+ floatEltLog1p = log1pVectorDouble
+ floatEltExpm1 = expm1VectorDouble
+ floatEltLog1pexp = log1pexpVectorDouble
+ floatEltLog1mexp = log1mexpVectorDouble