Skip to content

Instantly share code, notes, and snippets.

@josesoyo
Created November 28, 2016 16:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save josesoyo/e788e303907a54fe598ea5b019dfa217 to your computer and use it in GitHub Desktop.
Save josesoyo/e788e303907a54fe598ea5b019dfa217 to your computer and use it in GitHub Desktop.
#time
// CPU
[|0..1000|] |>
Array.iter(fun _ ->
(A1 ,A2) ||> Array.map2(fun old t -> old+(DoStuff( t, amplitudes, phases, frequencies))
) |> ignore
)
// OpenCL
[|0..1000|] |>
Array.iter(fun _ -> <@ (DoStuffOpenCL A1 A2 amplitudes phases frequencies ws) @>.Run() |> ignore )
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment