colin
b16316b75b
Driver: remove the unecessary `Box`ing of `RenderedStimulus`
...
no obvious perf diff one way or the other, yet
2022-08-23 23:33:22 -07:00
colin
3326acd125
Driver: update TODOs
2022-08-23 01:27:03 -07:00
colin
3c30ac33aa
Driver: replace the other ThreadPool with a JobPool
...
as a bonus we can remove the threadpool dep :-)
2022-08-23 00:03:58 -07:00
colin
7586bc8ff2
JobPool: implement buffering
...
this does give a little perf bump
2022-08-22 23:38:23 -07:00
colin
31726abb99
Driver: stimulus: use our own JobPool abstraction
...
this one leverages crossbeam.
it does appear to schedule jobs faster than the rust-threadpool.
curiously, the `recv` impl seems to be slower.
maybe that's because of the (inadvertent, unecessary) switch from mpsc
to mppc. worth trying to just insert a buffer.
2022-08-22 20:09:59 -07:00
colin
7bce17f56b
driver: more precisely measure stimuli "prep"
...
i'm beginning to think the `threadpool` library is actually just kinda
slow.
2022-08-22 02:32:58 -07:00
colin
4df6e19abe
Driver: slightly better instrumentation
2022-08-22 02:17:59 -07:00
colin
532dd26e22
driver: optimization: don't memcopy the RenderedStimulus across threads
2022-08-22 01:49:35 -07:00
colin
b0bedd1efa
Driver: fix a bug where we might step more than the user wanted
2022-08-22 01:23:41 -07:00
colin
82af4b100d
driver: optimize the `step_multiple` step count calculation
...
this was using a stupid amount of compute.
we still have about 7% time unaccounted for. down from 12-15%.
2022-08-22 01:07:27 -07:00
colin
e5c8bcff95
Driver: remove dead `add_classical_boundary_explicit` function
2022-08-22 00:51:53 -07:00
colin
ff13a1e96c
driver: address a TODO
2022-08-22 00:43:07 -07:00
colin
24b82037b4
Stimulus: parameterize over R.
...
this saves us from a `mem::transmute` in the sim code to get
`Fields<R>`.
2022-08-22 00:37:34 -07:00
colin
527e2746ed
driver: TODO about optimization
2022-08-21 19:25:20 -07:00
colin
6c9a6e1ffa
driver: all the user to configure the number of steps to go between stimulus application
2022-08-21 18:22:11 -07:00
colin
a38734a1ed
diagnostics: instrument the stimulus and stimulus blocked time
2022-08-21 18:10:09 -07:00
colin
18dd66530a
driver: evaluate stimulus in a background thread
...
this boosts fps from 920 to roughly 1150
2022-08-21 16:20:46 -07:00
colin
7b848bcd16
driver: hide more behind the StimAccess type
2022-08-20 19:08:15 -07:00
colin
c5cede6c6e
driver: hide the stimulus stuff behind a wrapper
...
this will making prefetch cleaner to implement
2022-08-20 18:58:31 -07:00
colin
053943df01
add `Stimulus::render()` and use it inside the driver and SpirvSim
2022-08-20 17:36:23 -07:00
colin
4f229a51b1
rename `RenderedVectorField` -> `RenderedStimulus`
2022-08-20 17:08:26 -07:00
colin
cd2917c8a5
driver, sim: use RenderedVectorField to simplify/optimize sim-internal rendering
2022-08-20 17:07:25 -07:00
colin
77124fcdaf
driver: implement an optimized stimulus adapter over ModulatedVectorField
...
this boosts perf from 520fps -> 632fps.
it does some uneccessary clones.
but it looks like the bulk of the inefficiency resides inside
the sim/spirv/ code though.
it might be that this is nearly memory-bottlenecked.
if so, backgrounding it might be sensible.
2022-08-19 03:54:43 -07:00
colin
35dbdffda7
driver: lay some scaffolding to allow us to optimize the stimulus in future
2022-08-18 22:19:50 -07:00
colin
570f058ee1
rename `AbstractStimulus` -> `Stimulus`
2022-08-18 15:27:18 -07:00
colin
bbb8b2b9ae
driver: better APIs around list-based stimuli
2022-08-13 03:51:01 -07:00
colin
858e787c19
driver: allow preserving the Stimuli as a concrete List
2022-08-12 18:03:10 -07:00
colin
a74e7fa9a0
Driver: parameterize over the Stimulus type
2022-08-12 14:47:45 -07:00
colin
e141047bec
Driver: simplify the StimuliAdapter
...
it was basically dead code.
2022-08-12 14:42:56 -07:00
colin
ae1eb861be
instrument the stimulus evaluation in our sim
...
... stimulus evaluation accounts for like 80% of the execution time 🤦
2022-08-11 22:57:43 -07:00
colin
e7cc78a947
diagnostics: split into their own file
2022-08-11 22:31:05 -07:00
colin
aa8f474f52
driver: Diagnostics: clean up the impl a bit
2022-08-11 19:04:12 -07:00
colin
4a33912164
driver: abstract the render time measurements behind a Diagnostics api
2022-08-11 18:58:22 -07:00
colin
f7b72a72be
driver: abstract the `step` diagnostics measurements
2022-08-11 18:41:41 -07:00
colin
a413a4d391
driver: move last_diag_time out of the Diagnostics object
2022-08-11 18:38:36 -07:00
colin
0c9f04981a
driver: relegate more diagnostics formatting to the Diagnostics impl
2022-08-11 18:36:35 -07:00
colin
6f1e1557b3
driver: diagnostics: track the actual number of frames stepped
...
this allows fps-related diagnostics to be meaningful after
serialization / restarts.
2022-08-11 18:29:58 -07:00
colin
e85d38d415
driver: split the Diagnostics out into their own object
...
more diagnostic refactoring to come
2022-08-11 18:27:30 -07:00
colin
4361167f99
stim: strongly-type the return type of AbstractSim::at with a `Fields` struct
...
this will help me not mix up the E and H fields.
2022-07-30 17:17:17 -07:00
colin
604f368f0d
SerializeRenderer: render to `GenericSim`, not `StaticSim`
2022-07-29 13:27:05 -07:00
colin
56f74e6b4a
AbstractSim: remove the Send bound
2022-07-28 23:49:45 -07:00
colin
4f2345f608
rename GenericSim -> AbstractSim
2022-07-28 23:41:42 -07:00
colin
3104c06d95
fold MaterialSim into GenericSim trait
2022-07-28 22:31:47 -07:00
colin
71ab89c4c9
de-virtualize GenericSim
...
this should let us fold the GenericSim and MaterialSim traits together.
2022-07-28 22:22:07 -07:00
colin
2d1a15eabc
AbstractMeasurement: remove the DynClone requirement
2022-07-28 21:49:28 -07:00
colin
5c4b8d86f2
measurements: store to disk *after* evaluating them
...
i'm hoping to simplify a lot of serialization code with this
2022-07-28 21:43:48 -07:00
colin
32d1a70d15
driver: remove `dyn_state`
2022-07-28 19:19:57 -07:00
colin
6206569f4a
Fold SampleableSim and MaterialSim into one
2022-07-28 16:41:32 -07:00
colin
45d2de29c6
rename 'coremem_types' -> 'coremem_cross' to better reflect its purpose
2022-07-28 15:40:23 -07:00
colin
15fc7b91dc
driver: TODO: split diagnostics into their own struct
2022-07-28 02:06:34 -07:00