February 6th, 2015, 11:33 am
QuoteOriginally posted by: outrunwhy don't you use the one I've written and sumitted to boost? thread. It's fast, high quality, and offers a C++11 random engine interface. It's e.g. been used for "massively parallelized lattice Quantum Chromodynamics simulations", somepone ported it to R also ..Maybe because of the useless boost dependency?If you want speed then you'll need to worry about memory layout and cache hits. I'll bet you get *very* different performance if you have threads t0..t7 write to consecutive elements like thisV[t0, t1, t2, ... t7, t0, t1, t2, ... t7, ...]compared to thisV[t0, t0, t0, ... , t1,t1,t1,... ..., t7,t7,t7, ...]My model case is QuoteLet's say we want to generate a (large) matrix of random numbers. It's got to be done in parallel somehow. So, how to do it with a good speedup and no race conditions?How do I do it, really? QuoteIf you want speed then you'll need to worry about memory layout and cache hitsLet's worry about that when I get some running code whose speedup can be measured.I have some experience with the sitmo when I wrapped it in C#. However, it is not clear to me how to use it with OpenMP or C++11 Concurrency, for example.
Last edited by
Cuchulainn on February 5th, 2015, 11:00 pm, edited 1 time in total.