Skip to content

Commit 85ab6df

Browse files
authored
Constrain BLAS functions on AFType. (#47)
1 parent e267400 commit 85ab6df

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

src/ArrayFire/BLAS.hs

+10-5
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,8 @@ import ArrayFire.Internal.Types
5555
-- 7.0000 15.0000
5656
-- 10.0000 22.0000
5757
matmul
58-
:: Array a
58+
:: AFType a
59+
=> Array a
5960
-- ^ 2D matrix of Array a, left-hand side
6061
-> Array a
6162
-- ^ 2D matrix of Array a, right-hand side
@@ -75,7 +76,8 @@ matmul arr1 arr2 prop1 prop2 = do
7576
-- [1 1 1 1]
7677
-- 385.0000
7778
dot
78-
:: Array a
79+
:: AFType a
80+
=> Array a
7981
-- ^ Left-hand side input
8082
-> Array a
8183
-- ^ Right-hand side input
@@ -93,7 +95,8 @@ dot arr1 arr2 prop1 prop2 =
9395
-- >>> dotAll (vector @Double 10 [1..]) (vector @Double 10 [1..]) None None
9496
-- 385.0 :+ 0.0
9597
dotAll
96-
:: Array a
98+
:: AFType a
99+
=> Array a
97100
-- ^ Left-hand side array
98101
-> Array a
99102
-- ^ Right-hand side array
@@ -126,7 +129,8 @@ dotAll arr1 arr2 prop1 prop2 = do
126129
-- 5.0000 6.0000
127130
--
128131
transpose
129-
:: Array a
132+
:: AFType a
133+
=> Array a
130134
-- ^ Input matrix to be transposed
131135
-> Bool
132136
-- ^ Should perform conjugate transposition
@@ -155,7 +159,8 @@ transpose arr1 (fromIntegral . fromEnum -> b) =
155159
-- 3.0000 4.0000
156160
--
157161
transposeInPlace
158-
:: Array a
162+
:: AFType a
163+
=> Array a
159164
-- ^ Input matrix to be transposed
160165
-> Bool
161166
-- ^ Should perform conjugate transposition

0 commit comments

Comments
 (0)