dougbinks / enkiTS

A permissively licensed C and C++ Task Scheduler for creating parallel programs. Requires C++11 support.
zlib License
1.74k stars 145 forks source link

Minor fixes #92

Closed pr0g closed 1 year ago

pr0g commented 1 year ago

This is a simple PR with some minor fixes I spotted while reading through the source code.

(The change does not include switching .cpp files to use nullptr instead of NULL, but I would happily do that 🙂 It also looks like RotateLeft is unused and could be removed).

I also am not sure what the comment...

// check if have tasks inside threadState change but before waiting

on line 1164 of TaskScheduler.cpp means exactly, if this could be rephrased in a separate change that would be great!

I won't be offended at all if you aren't interested in the changes (they're pretty much all superficial) or if you'd rather implement them yourself and not merge this PR that's also fine. I just thought I might as well share it in case it was useful as I was noodling around with this in my fork.

Thanks!

dougbinks commented 1 year ago

This is a lot in one PR so may take me some time to consider.

Note that cassert on windows includes yvals_core.h which is 2000 lines long on top of assert.h. cstdint is better, but still adds many more lines so I'm not in favour of swapping unless there's good reason to do so.

pr0g commented 1 year ago

I can split it up and only include one part at a time, so don't worry about going through the whole thing right now. I'll close this one for now and open a separate one with only 1 set of changes per PR.