b0bedd1efa
Driver: fix a bug where we might step more than the user wanted
2022-08-22 01:23:41 -07:00
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
e5c8bcff95
Driver: remove dead add_classical_boundary_explicit
function
2022-08-22 00:51:53 -07:00
ff13a1e96c
driver: address a TODO
2022-08-22 00:43:07 -07:00
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
e32d500f8c
real: add sin
, cos
and ln2
functions
2022-08-22 00:37:19 -07:00
f0fc324188
Stimulus: remove unused eval_into
trait method
2022-08-21 21:41:27 -07:00
c02e5427d4
spirv tests: port to R32
...
this gives better debug info
2022-08-21 20:46:57 -07:00
29e78c74fe
real: implement std::iter::Sum
2022-08-21 20:46:43 -07:00
527e2746ed
driver: TODO about optimization
2022-08-21 19:25:20 -07:00
75a5041ed6
diagnostics: nicer formatting
2022-08-21 19:18:42 -07:00
98d6a5b34f
spirv: instrument the device read/write operations
2022-08-21 18:51:51 -07:00
6c9a6e1ffa
driver: all the user to configure the number of steps to go between stimulus application
2022-08-21 18:22:11 -07:00
a414bd77d4
diagnostics: break out a variable to make this code cleaner
2022-08-21 18:12:31 -07:00
850a7e773f
diagnostics: rename time_spent_{foo}
-> time_{foo}
2022-08-21 18:11:03 -07:00
a38734a1ed
diagnostics: instrument the stimulus and stimulus blocked time
2022-08-21 18:10:09 -07:00
18dd66530a
driver: evaluate stimulus in a background thread
...
this boosts fps from 920 to roughly 1150
2022-08-21 16:20:46 -07:00
7b848bcd16
driver: hide more behind the StimAccess type
2022-08-20 19:08:15 -07:00
c5cede6c6e
driver: hide the stimulus stuff behind a wrapper
...
this will making prefetch cleaner to implement
2022-08-20 18:58:31 -07:00
053943df01
add Stimulus::render()
and use it inside the driver and SpirvSim
2022-08-20 17:36:23 -07:00
d662ef24d3
SimMeta: implement PartialEq
2022-08-20 17:35:41 -07:00
4f229a51b1
rename RenderedVectorField
-> RenderedStimulus
2022-08-20 17:08:26 -07:00
cd2917c8a5
driver, sim: use RenderedVectorField to simplify/optimize sim-internal rendering
2022-08-20 17:07:25 -07:00
69a603920f
add a RenderedVectorField
. maybe more accurately called a rendered stimulus?
...
used to represent a stimulus which has been rendered for a specific time with specific simulation parameters.
2022-08-20 17:05:58 -07:00
69ee2070c8
DimSlice: impl Default
2022-08-20 17:04:56 -07:00
ff4209ce78
SpirvSim: remove a Vec copy from the stimulus evaluation
...
this boosts perf from 562 fps -> 900-ish for the multi-core-inverter
```
t=2.73e-9 frame 141700 fps: 901.93 (sim: 154.0s, stim: 30.6s, [render: 92.7s], blocked: 0.0s, render_prep: 0.7s, other: 2.5s)
```
we're now spending more CPU time rendering the measurements
than computing the stimulus
2022-08-19 04:55:50 -07:00
87c24c739c
spirv: call Stimulus::at
instead of Stimulus::eval_into
...
this *lowers* perf from 595 fps -> 562 fps
2022-08-19 04:49:18 -07:00
570917cae5
stim: Gated: no longer a Stimulus
2022-08-19 04:34:20 -07:00
8df001773f
eval_into: remove the scale
parameter
...
this actually seems to drop perf from 637 -> 595 ish?
i suppose the compiler was able to fold the time multiplier in with the
scale multipler? idk, somewhat surprised.
2022-08-19 04:26:58 -07:00
ad5f064584
stim: Simplify the Exp implementation. it's no longer a Stimulus
2022-08-19 04:14:33 -07:00
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
9f97f474d7
cross: DimSlice: allow the underlying data to be a Vec
2022-08-19 03:54:01 -07:00
35dbdffda7
driver: lay some scaffolding to allow us to optimize the stimulus in future
2022-08-18 22:19:50 -07:00
ffda00b796
stim: convert CurlStimulus to a CurlVectorField and use ModulatedVectorField
...
this opens the door to caching the vector field stuff.
2022-08-18 20:47:36 -07:00
478db86b75
multi-core-inverter: remove the List shenanigans
2022-08-18 20:02:09 -07:00
9461cc7781
stim: introduce a VectorField trait which we'll use to build a more structured approach to Stimulus
2022-08-18 17:08:44 -07:00
cf2d21f975
Stimulus: change at
method to accept feat_size: f32, loc: Index
2022-08-18 16:21:21 -07:00
0fa8cb0d20
cross: DimSlice: add into_inner
method
2022-08-18 16:04:15 -07:00
6750feef8d
stim: remove TimeVarying3
...
`TimeVarying`(1) is enough for what we want.
2022-08-18 15:51:54 -07:00
570f058ee1
rename AbstractStimulus
-> Stimulus
2022-08-18 15:27:18 -07:00
60e44d6d4d
rename Stimulus
-> RegionGated
2022-08-18 15:22:28 -07:00
eb406ea46f
UniformStimulus: use Fields
internally
2022-08-18 15:19:22 -07:00
6e7ae48d86
stim: remove the extra norm
call in CurlStimulus application
...
we call `with_mag` after, making it redundant.
2022-08-18 14:28:33 -07:00
454307325b
stim: add a scale
parameter to AbstractStimulus::eval_into
...
this boosts perf from 571fps -> 620-ish.
2022-08-18 04:33:00 -07:00
e72c0ec11d
cross: DimSlice: add dim/offset accessors
2022-08-18 04:32:43 -07:00
fb9d982545
multi-core-inverter: test an alternate Vec-based stimulus
...
it's about 0.5% slower. not much.
2022-08-18 04:12:57 -07:00
b9581b79b2
sim: add AbstractStimulus::eval_into
for bulk evaluation
2022-08-18 04:11:04 -07:00
07fa4042a3
cross: list: add IntoVec
trait
2022-08-18 04:00:41 -07:00
a3b15bd7e7
cross: DimSlice: add as_ref
, as_mut
methods to re-borrow the data with a different lifetime
...
we can't use the actual AsRef, AsMut trait because we aren't returning a
reference but a new type with an inner reference.
2022-08-18 03:25:52 -07:00
300c11f5ca
stim: use a Visitor instead of a FoldOp for eval
...
boosts perf from 420 -> 530 fps
2022-08-18 02:52:57 -07:00