On Don Syme's WebLog on F# and Other Research Projects , there are several interesting recent entries

By on 4/19/2007 10:51 AM ()

Andrew Phillips ' Stochastic Pi Simulator (SPiM) is implemented in F# (and also OCaml) and has been gaining

By on 4/17/2007 3:48 AM ()

Quick and dirty mod to support parralel array processing

note: I seperated the thread processing type into its own module

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
open System
open Utility
open ThreadProcessor

module parrallelArray =
begin

let filter (func:'a -> bool) (arr:'a array) = 
    //let arr = lst |> List.to_array in
    let proc:ThreadProcessor.ThreadProcessor<'a, bool> = new ThreadProcessor.ThreadProcessor<'a, bool>(ThreadProcessor.threadcount, arr, func) in
    let ret = proc.Results |> Utility.list_fold_lefti ( fun i acc v -> 
      match v with | true -> (arr.[i])::acc | false -> acc ) [] in
    proc.Stop();
    ret |> Array.of_list

  let map (func:'a -> 'b) (arr:'a array) =
    //let arr = lst |> List.to_array in
    let proc = new ThreadProcessor.ThreadProcessor<'a, 'b>(ThreadProcessor.threadcount, arr, func) in
    let ret = proc.Results  in
    proc.Stop();
    ret |> Array.of_list
end
By on 4/13/2007 11:06 AM ()

PingBack from [link:sadekdrobi.com]

By on 4/5/2007 3:46 AM ()
IntelliFactory Offices Copyright (c) 2011-2012 IntelliFactory. All rights reserved.
Home | Products | Consulting | Trainings | Blogs | Jobs | Contact Us | Terms of Use | Privacy Policy | Cookie Policy
Built with WebSharper