Comments (3)
The approach I use is to make the range iterate over multiple values. So if you want to iterate over 500 objects but want 50 or so to be computed per thread, then set the the set size to be 50 and have an inner loop going over 10 values. You'll need to add a check to ensure you don't go beyond the last value in your actual data set.
I'm considering adding a minimum range size to the interface which should make this easier in the future.
from enkits.
I have a development branch C++11 Grainsize which lets you specify the minimum size you'd like to split tasks into. This also uses a revised partitioning scheme which should be better for CPUs with larger numbers of hardware threads.
This is work in progress and I expect to improve on the partitioning, but I'd appreciate feedback on the branch if you are able to try it out. See the comments for details as I've not yet added documentation to the readme nor any examples for this.
from enkits.
The new grain size feature is now merged with the main branches. I've not heard back from you since the issue was submitted, so I'll close this as I believe it is resolved with the new functionality.
from enkits.
Related Issues (20)
- Macro redefinition for WIN32_LEAN_AND_MEAN HOT 1
- Conversion warnings HOT 1
- Wrong asserts used HOT 1
- Suggestions for propagating user data into tasks? Client+Server in same exe HOT 3
- Rejecting a task and adding it back to the queue? HOT 8
- Add soname to shared library HOT 1
- Put header files in a subdirectory HOT 3
- Put header files in a subdirectory in the main repository HOT 2
- Where is the proper position to add PreRun and PostRun? HOT 2
- Race Condition? HOT 3
- The threads responsible for executing the tasks HOT 2
- CMake version HOT 2
- Address Sanitizer finding HOT 1
- Deadlock with WaitForNewPinnedTasks and WaitforAllAndShutdown HOT 4
- Feature Request: Shutdown HOT 7
- Make gtl_threadNum invalid by default. HOT 9
- Run all tasks of given priority (or higher) HOT 3
- Deadlock in SemaphoreWait (macOS) HOT 16
- More platforms supported in enki::GetNumHardwareThreads HOT 5
- Stuttering on Intel hybrid CPUs HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from enkits.