File tree Expand file tree Collapse file tree 10 files changed +33
-14
lines changed Expand file tree Collapse file tree 10 files changed +33
-14
lines changed Original file line number Diff line number Diff line change 44:m - ArrayFire
55import qualified ArrayFire as A
66:set -laf
7+ :set -isrc:test
Original file line number Diff line number Diff line change 55* ~
66/ctags
77cabal.project.local
8- tags
8+ tags
9+ /.stack-work /
Original file line number Diff line number Diff line change 1+ cabal-version : 3.0
12name : arrayfire
2- version : 0.6 .0.0
3+ version : 0.7 .0.0
34synopsis : Haskell bindings to the ArrayFire general-purpose GPU library
45homepage : https://github.com/arrayfire/arrayfire-haskell
5- license : BSD3
6+ license : BSD-3-Clause
67license-file : LICENSE
78author : David Johnson
89maintainer : djohnson.m@gmail.com
9- copyright : David Johnson (c) 2018-2020
10+ copyright : David Johnson (c) 2018-2023
1011category : Math
1112build-type : Custom
1213extra-source-files : CHANGELOG.md
13- cabal-version : >= 1.10
1414description : High-level Haskell bindings to the ArrayFire General-purpose GPU library
1515 .
1616 <<https://user-images.githubusercontent.com/875324/59819388-9ff83f00-92f5-11e9-9ac0-51eef200c716.png>>
@@ -75,8 +75,8 @@ library
7575 ArrayFire.Internal.Types
7676 ArrayFire.Internal.Util
7777 ArrayFire.Internal.Vision
78- build-tools :
79- hsc2hs
78+ build-tool-depends :
79+ hsc2hs :hsc2hs
8080 extra-libraries :
8181 af
8282 c-sources :
Original file line number Diff line number Diff line change 33let
44 pkg = pkgs . haskellPackages . callCabal2nix "arrayfire" ./. {
55 af = null ;
6- quickcheck-classes = pkgs . haskellPackages . quickcheck-classes_0_6_4_0 ;
76 } ;
87in
98 pkg
Original file line number Diff line number Diff line change 1111 ${ pkgs . haskellPackages . ghcid . bin } /bin/ghcid -c 'cabal v1-repl lib:arrayfire'
1212 };
1313 function test-runner () {
14- ${ pkgs . ag } /bin/ag -l | \
14+ ${ pkgs . silver-searcher } /bin/ag -l | \
1515 ${ pkgs . entr } /bin/entr sh -c \
1616 'cabal v1-configure --enable-tests && \
1717 cabal v1-build test && dist/build/test/test'
1818 }
1919 function doctest-runner () {
20- ${ pkgs . ag } /bin/ag -l | \
20+ ${ pkgs . silver-searcher } /bin/ag -l | \
2121 ${ pkgs . entr } /bin/entr sh -c \
2222 'cabal v1-configure --enable-tests && \
2323 cabal v1-build doctests && dist/build/doctests/doctests src/ArrayFire/Algorithm.hs'
Original file line number Diff line number Diff line change 1+ resolver :
2+ url : https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/lts/19/25.yaml
3+
4+ packages :
5+ - .
Original file line number Diff line number Diff line change 1+ # This file was autogenerated by Stack.
2+ # You should not edit this file by hand.
3+ # For more information, please see the documentation at:
4+ # https://docs.haskellstack.org/en/stable/lock_files
5+
6+ packages: []
7+ snapshots:
8+ - completed:
9+ size: 619403
10+ url: https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/lts/19/25.yaml
11+ sha256: 1ecad1f0bd2c27de88dbff6572446cfdf647c615d58a7e2e2085c6b7dfc04176
12+ original:
13+ url: https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/lts/19/25.yaml
Original file line number Diff line number Diff line change 6363 A. product (A. vector @ Double 10 [1 .. ]) 0 `shouldBe` 3628800.0
6464 A. product (A. vector @ (A. Complex Double ) 10 (repeat (1 A. :+ 1 ))) 0 `shouldBe` A. scalar (0.0 A. :+ 32.0 )
6565 A. product (A. vector @ (A. Complex Float ) 10 (repeat (1 A. :+ 1 ))) 0 `shouldBe` A. scalar (0.0 A. :+ 32.0 )
66- A. product (A. vector @ A. CBool 10 (repeat 1 )) 0 `shouldBe` 10 -- FIXME: This is a bug, should be 0
66+ A. product (A. vector @ A. CBool 10 (repeat 1 )) 0 `shouldBe` 1 -- FIXED in 3.8.2, vector product along 0-axis is 1 for vector size 10 of all 1's.
6767 A. product (A. vector @ A. CBool 10 (repeat 0 )) 0 `shouldBe` 0
6868 it " Should product a default value to replace NaN" $ do
6969 A. productNaN (A. vector @ Float 10 [1 .. ]) 0 1.0 `shouldBe` 3628800.0
@@ -100,7 +100,7 @@ spec =
100100 it " Should get sum all elements" $ do
101101 A. sumAll (A. vector @ Int 5 (repeat 2 )) `shouldBe` (10 ,0 )
102102 A. sumAll (A. vector @ Double 5 (repeat 2 )) `shouldBe` (10.0 ,0 )
103- -- A.sumAll (A.vector @A.CBool 3800 (repeat 1)) `shouldBe` (3800,0) -- causes strange behavior
103+ A. sumAll (A. vector @ A. CBool 3800 (repeat 1 )) `shouldBe` (3800 ,0 )
104104 A. sumAll (A. vector @ (A. Complex Double ) 5 (repeat (2 A. :+ 0 ))) `shouldBe` (10.0 ,0 )
105105 it " Should get sum all elements" $ do
106106 A. sumNaNAll (A. vector @ Double 2 [10 , acos 2 ]) 1 `shouldBe` (11.0 ,0 )
Original file line number Diff line number Diff line change 2020 it " Should find the variance" $ do
2121 var (vector @ Double 8 [1 .. 8 ]) False 0
2222 `shouldBe`
23- 6.0
23+ 5.25
2424 it " Should find the weighted variance" $ do
2525 varWeighted (vector @ Double 8 [1 .. ]) (vector @ Double 8 (repeat 1 )) 0
2626 `shouldBe`
Original file line number Diff line number Diff line change 3131 A. getSizeOf (Proxy @ (Complex Double )) `shouldBe` 16
3232 it " Should get version" $ do
3333 x <- A. getVersion
34- x `shouldBe` (3 ,6 , 4 )
34+ x `shouldBe` (3 ,8 , 2 )
3535 it " Should get revision" $ do
3636 x <- A. getRevision
3737 x `shouldSatisfy` (not . null )
You can’t perform that action at this time.
0 commit comments