-
Notifications
You must be signed in to change notification settings - Fork 46
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add component checking. #25
Conversation
Thanks! LGTM - waiting for a test before merging. I think it would be best to have a separate Maybe something like:
...and have some entities ping-pong between system 0 and system 1 a few times. |
I'm working on the test at the moment, but I seem to have come across a problem. When attempting to use |
@sgodwincs: it is, good catch! As you may have noticed my tests weren't very thorough. |
Well, I've written a test, but I seem to be getting some weird behavior. I'll have to look more into tomorrow, but I'll paste it here in case you notice any small mistakes. The implementation of
|
I do get an assertion when I try to run your test: ./test/test.ecst.has_component
entity storage: dynamic (initial: 500)
multithreading: disallows inner parallelism
time: 8.55855ms
entity storage: fixed (capacity: 100)
multithreading: disallows inner parallelism
time: 5.44788ms
**entity storage: dynamic (initial: 500)
multithreading: allows inner parallelism
ASSERTION FAILED**
[file: "../include/./ecst/./inner_parallelism/./utils/execute_split.hpp"]
[line: 54]
split_count > 0
**split_count = 0**
0 = 0
(0 > 0) == false
0) Skip this assertion.
1) Skip all assertions.
_) Terminate the program. This means that the chosen inner parallelism results in 0 splits. Why? This is the chosen strategy: constexpr auto test_p = ips::split_every_n::v(sz_v<entity_count / 8>); It basically means: "split a system into an additional subtask every This can be solved by composing inner parallelism strategies: constexpr auto test_p =
ipc::none_below_threshold::v(ecst::sz_v<10>,
ips::split_evenly_fn::v_cores()); The above strategy means: "do not use inner parallelism if there are less than 10 entities in the system, otherwise split evenly between the number of hardware cores". The test now compiles and passes! I am merging and manually adding the test. Thanks a lot! |
Good to know it was something simple! Though strange how I never actually got an assertion when I ran the test. Also, don't forget to fix the |
bf751c9 should take care of it. I've also fixed another broken test |
Here's my attempt at #24
I wasn't sure where the tests should be added, maybe in the defer_fns.cpp test?