Browse files

-

  • Loading branch information...
1 parent 99c9a08 commit eb9bff4500e47b4d30f5146a1f064531c7aa7086 @svenssonjoel committed May 23, 2012
Showing with 12 additions and 12 deletions.
  1. +6 −6 Intel/ArBB/Capture.hs
  2. +6 −6 Test.hs
View
12 Intel/ArBB/Capture.hs
@@ -52,21 +52,21 @@ capture f =
-- Now I should have all parts needed to generate the function.
let (names,tins) = unzip tins'
- liftIO$ putStrLn $ "a1"
+ -- liftIO$ putStrLn $ "a1"
arbbIns <- liftVM$ mapM toArBBType tins
arbbOuts <- liftVM$ mapM toArBBType touts
- liftIO$ putStrLn $ "a2"
+ -- liftIO$ putStrLn $ "a2"
(funMap,_) <- get
fd <- liftVM$ VM.funDef_ fn (concat arbbOuts) (concat arbbIns) $ \ os is ->
do
- lift$ putStrLn $ "a3"
+ -- lift$ putStrLn $ "a3"
vs <- accmBody dag nids vt funMap (zip names is)
-- lift$ putStrLn $ "os :" ++ show os
-- lift$ putStrLn $ "vs :" ++ show vs
- lift$ putStrLn $ "a4"
+ -- lift$ putStrLn $ "a4"
copyAll os vs
- lift$ putStrLn $ "a5"
- liftIO$ putStrLn $ "a6"
+ -- lift$ putStrLn $ "a5"
+ -- liftIO$ putStrLn $ "a6"
addFunction fn fd tins touts
return $ embFun fn f
View
12 Test.hs
@@ -120,12 +120,14 @@ test5 =
v2 = Vector (V.fromList [1.5,1.8,1.9]) (One 3)
-- execute f with inputs v1 and v2
- (Vector dat n) <- execute f (v1 :- v2)
- liftIO$ putStrLn$ show dat
+ r <- execute f (v1 :- v2)
+ liftIO$ putStrLn "result of first execution: "
+ liftIO$ putStrLn$ show r
-- f can be used again and again (jit only once)
- execute f (v2 :- v1)
-
+ liftIO$ putStrLn "executing already JITed function again: "
+ execute f (v1 :- v2)
+
test6 =
withArBB $
@@ -531,8 +533,6 @@ testWhileM =
o1 <- liftIO$ new1D 10000
r <- liftIO$ newIORef 0
- -- execute f
- -- (Vector dat n,i) <- execute f v1
execute2 f v1 (o1 :- r)
(Vector i _) <- liftIO$ freeze o1

0 comments on commit eb9bff4

Please sign in to comment.