Profile
Pastes: 71896
Members: 1383

Paste

Plain view | Edit code: here. | Add this to your website. | Report abuse.

Short URL: N/A

Pasted as Haskell by joaopizani on Tuesday, September 28th, 2010 12:00am ( 4 years ago )

  1. module Main where
  2.  
  3. import System.Random (newStdGen)
  4. import Data.Array.Parallel.PArray (PArray, randomRs)
  5. import Data.Array.Parallel.Prelude
  6. import DPHVecMul (dotp)
  7.  
  8.  
  9. main = do gen1 <- newStdGen
  10.    gen2 <- newStdGen
  11.  
  12.    let n = 10000
  13.        r = (-100, 100)
  14.  
  15.    let v = randomRs n r gen1 :: PArray Double
  16.        w = randomRs n r gen2 :: PArray Double
  17.  
  18.    print $ fromPArrayP v
  19.    print "\n\n\n"
  20.    print $ fromPArrayP w

Revise this Paste
Your Name:
Code Language:
 
Security Image:
Text seen in Image:
Comments

Nothing has been added as yet. Post a comment.