edited some comments for clarification
This commit is contained in:
parent
2610d0c94b
commit
fb68830abd
BIN
dist/build/hgraph/hgraph
vendored
BIN
dist/build/hgraph/hgraph
vendored
Binary file not shown.
BIN
dist/build/test-hgraph/test-hgraph
vendored
BIN
dist/build/test-hgraph/test-hgraph
vendored
Binary file not shown.
@ -35,12 +35,14 @@ import Data.Text.Encoding
|
|||||||
import Stream hiding (map)
|
import Stream hiding (map)
|
||||||
import qualified Data.Array.Accelerate as A
|
import qualified Data.Array.Accelerate as A
|
||||||
-- change to Data.Array.Accelerate.CUDA as I and link accelerate-cuda to use GPU instead of CPU
|
-- change to Data.Array.Accelerate.CUDA as I and link accelerate-cuda to use GPU instead of CPU
|
||||||
|
-- depends on accelerate-cuda package in cabal, which needs the installed CUDA-stuff form
|
||||||
|
-- nVidia (nvcc, header-files, ...) and the propriatary driver
|
||||||
import Data.Array.Accelerate.Interpreter as I
|
import Data.Array.Accelerate.Interpreter as I
|
||||||
type Matrix e = A.Array A.DIM2 e
|
type Matrix e = A.Array A.DIM2 e
|
||||||
|
|
||||||
|
|
||||||
-- TODO: Give createGraph a presized Array and no dynamic [Int].
|
-- TODO: Give createGraph a presized Array and no dynamic [Int].
|
||||||
-- should be createGraph :: T.Text -> Either (Matrix Int) T.Text
|
-- should be createGraph :: T.Text -> Either (Vector Int) T.Text
|
||||||
createGraph :: T.Text -> Either [Int] T.Text
|
createGraph :: T.Text -> Either [Int] T.Text
|
||||||
createGraph input = createGraph' input (Left [])
|
createGraph input = createGraph' input (Left [])
|
||||||
where
|
where
|
||||||
@ -57,10 +59,6 @@ createGraph input = createGraph' input (Left [])
|
|||||||
_ -> Right $ T.append (T.pack "cannot parse ") a
|
_ -> Right $ T.append (T.pack "cannot parse ") a
|
||||||
Right errstr ->
|
Right errstr ->
|
||||||
Right errstr
|
Right errstr
|
||||||
--createGraph input = Right $ "Parsing-error in line: " ++ input
|
|
||||||
|
|
||||||
--concatWith :: String -> String -> String -> String
|
|
||||||
--concatWith d a b = a ++ d ++ b
|
|
||||||
|
|
||||||
emptyLine :: T.Text -> Bool
|
emptyLine :: T.Text -> Bool
|
||||||
emptyLine a
|
emptyLine a
|
||||||
|
Loading…
Reference in New Issue
Block a user