Hi, I’m new to CUDA, so pls. excuse the ‘newbie’ query. I’m trying to decide on the best way to parallelise this problem.
Suppose I have two sets of data, these are essentially key/value pairs. The keys are almost always the same,
but I can have keys that may be in one set and not the other:
a = [ (“1D”, 2.1) ( “2D”, 2.2), (“1M”, 2.4) ]
b = [ (“1D”, 2.2) ( “2D”, 2.3), (“6M”, 3.1) ]
The strings “1D” etc… are atomised, so are stored as ints.
I can have large input sets, hence the goal to put on the GPU and parallelise an (a-b).
The output would be a-b, would be: (“1D”,-0.1), (“2D”, -0.1), (“1M”, 2.4), (“6M”, -3.1)
Any ideas on the best approach to this problem? In particular I’m not sure how (or if I can) parcel up sections of the list for each thread to work on …
Its basically parallelising this bit of F# code:
let irdelta =
let tenors = union (List.unzip a |> fst) (List.unzip b |> fst)
let a’ = Map.ofList a
let b’ = Map.ofList b
List.zip tenors ( List.map (fun x -> overlay (a’.TryFind x) (b’.TryFind x) ) tenors)
i.e. Is there an efficient way around createing the maps, key - value pairs??