Git Product home page Git Product logo

Comments (3)

dougbinks avatar dougbinks commented on May 18, 2024

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.

dougbinks avatar dougbinks commented on May 18, 2024

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.

dougbinks avatar dougbinks commented on May 18, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.