Permalink
Browse files

Tweaks to localsearch

  • Loading branch information...
1 parent 2d2417d commit 7bae5d1ebbdc0f97c881e4bb980f6fdda9469be0 @rrnewton rrnewton committed Jul 8, 2014
@@ -0,0 +1,16 @@
+Name: localsearch-cuda
+Version: 0.0.0.1
+Build-type: Simple
+Cabal-version: >=1.10
+
+Executable bench-localsearch-cuda
+ Default-Language: Haskell2010
+ main-is: Main.hs
+ hs-source-dirs: ../common
+ ghc-options: -O2 -threaded -rtsopts
+ cpp-options: -DACCBACKEND=Data.Array.Accelerate.Cilk
+ build-depends: base >= 4.7
+ , time, array >= 0.4, random
+ , accelerate-backend-kit >= 0.15.0.4
+ , accelerate-icc-opencl >= 0.15.0.0
+ , accelerate >= 0.15.0.0
@@ -45,9 +45,10 @@ import Foreign.CUDA.Driver (initialise)
-- Parmeters
--------------------------------------------------------------------------------
-bitstringSize = 20
-bitstringNum = 1000
-searchIters = 100
+default_bitstringSize = 20
+default_bitstringNum = 1000
+-- default_searchIters = 100
+default_searchIters = 10
numRangeLow = -20
numRangeHigh = 20
@@ -63,12 +64,12 @@ main = do
#endif
args <- getArgs
- (n) <- case args of
- [] -> do putStrLn "Using default size for input."
- return bitstringNum
- [n] -> do putStrLn$ "bitstring pop size on command line: N="++ show n
- return $ read n
- env <- getEnvironment
+ let [searchIters, bitstringNum, bitstringSize] =
+ P.map read args ++
+ P.take (3 - length args) [default_searchIters, default_bitstringNum, default_bitstringSize]
+ putStrLn$ "Got "++show (length args)++" command line args."
+ putStrLn$ " Params (searchIters, bitstringNum, bitstringSize) = "++show (searchIters, bitstringNum, bitstringSize)
+
tBegin <- getCurrentTime
performGC
tEnd <- getCurrentTime
@@ -0,0 +1,17 @@
+Name: localsearch-cuda
+Version: 0.0.0.1
+Build-type: Simple
+Cabal-version: >=1.10
+
+Executable bench-localsearch-cuda
+ Default-Language: Haskell2010
+ main-is: Main.hs
+ hs-source-dirs: ../common
+ ghc-options: -O2 -threaded -rtsopts
+ cpp-options: -DACCBACKEND=Data.Array.Accelerate.CUDA
+ cpp-options: -DNOSIMPLE
+ build-depends: base >= 4.7
+ , time, array >= 0.4, random
+ , accelerate-backend-kit >= 0.15.0.4
+ , accelerate-cuda >= 0.15.0.0
+ , accelerate >= 0.15.0.0

0 comments on commit 7bae5d1

Please sign in to comment.