intel-aes 0.2.1.0 → 0.2.1.1
raw patch · 2 files changed
+8/−3 lines, 2 files
Files
- System/Random/AES/Tests.hs +6/−2
- intel-aes.cabal +2/−1
System/Random/AES/Tests.hs view
@@ -1,4 +1,4 @@-{-# LANGUAGE BangPatterns, ScopedTypeVariables, ForeignFunctionInterface #-}+{-# LANGUAGE BangPatterns, ScopedTypeVariables, ForeignFunctionInterface, CPP #-} {- | A simple script to do some very basic timing of 'System.Random.RandomGen's. @@ -164,9 +164,11 @@ type Kern = Int -> Ptr Int -> IO () -- [2011.01.28] Changing this to take "count" and "accumulator ptr" as arguments:+#ifdef CTEST foreign import ccall "cbits/c_test.c" blast_rands :: Kern foreign import ccall "cbits/c_test.c" store_loop :: Kern-foreign import ccall unsafe "stdlib.hs" rand :: IO Int+#endif+foreign import ccall unsafe "" rand :: IO Int loop2 :: IORef Int -> IO () loop2 !counter = @@ -347,8 +349,10 @@ when (not$ NoC `elem` opts) $ do putStrLn$ " Comparison to C's rand():"+#ifdef CTEST time_c2 th freq "ptr store in C loop" store_loop time_c2 th freq "rand/store in C loop" blast_rands+#endif time_c2 th freq "rand in Haskell loop" (\n ptr -> forM_ [1..n]$ \_ -> rand ) time_c2 th freq "rand/store in Haskell loop" (\n ptr -> forM_ [1..n]$ \_ -> do n <- rand; poke ptr n ) return ()
intel-aes.cabal view
@@ -1,9 +1,10 @@ Name: intel-aes-Version: 0.2.1.0+Version: 0.2.1.1 -- 0.1.2.4 -- minor bump for David (dmpots) Mac OS support -- 0.2.0.0 -- major bump for API reorg -- 0.2.1.0 -- include prebuilts and tested with 6.12, 7.0, 7.2+-- 0.2.1.1 -- removed deps on c_test.c License: BSD3 License-file: LICENSE