summaryrefslogtreecommitdiff
path: root/src/modules/snow
AgeCommit message (Collapse)Author
2019-11-24snow: per-cpu rand_r() seed stateVito Caputo
Snow was already threaded, but used a global seed with rand_r() meaning the CPUs were hammering on the same address. There wasn't any locking or atomics, as it isn't terribly critical when generating white noise if the seed access is racy. But the writes still caused cache lines to ping-pong. This commit gives a ~15.5% speedup in my measurements on an i7-2640M. Note without the padded union, using just an array of ints, zero gain is realized. I used a padding of 256 just to have some headroom, x86 is 64 but other CPUs vary, POWER9 is 128 for example.
2019-11-24rototiller: rototiller_fragmenter_t s/num/number/Vito Caputo
Mechanical change removing abbreviation for consistency
2019-11-23rototiller: pass cpu to .render_fragment()Vito Caputo
Mostly mechanical change, though threads.c needed some jiggering to make the logical cpu id available to the worker threads. Now render_fragment() can easily addresss per-cpu data created by create_context().
2019-11-14snow: add a simple tv snow / white noise moduleVito Caputo
I wanted to add some noise to the rtv module and figured why not just add a snow module and make rtv pass through it briefly when switching modules. It's not interesting by itself, but as more composite/meta modules like rtv get made it might be handy beyond rtv.
© All Rights Reserved