Giter VIP home page Giter VIP logo

Comments (2)

sebjameswml avatar sebjameswml commented on May 18, 2024

Yes, up to the user. In the applications that have been written to date (ABRG-Models/BarrelEmerge, sebjameswml/RetinoTectal, ABRG-Models/Tesselations, stuartwilson/SelfOrganisingMaps) the usual approach is to compute a timestep of a simulation or model in each iteration of a main loop and then to update/render the visual model at every Nth loop. Depending on the sim, that might be every single loop, every 10th, 100th or whatever suits. We haven't used multithreading to run a simulation/model in one thread with a second thread used for visualisation. I personally make use of multithreading within my simulations, using OpenMP pragmas - I find that's the best way to get the most out of multi-core CPUs.

What makes you think that the Vector class is not thread safe?

from morphologica.

niclar avatar niclar commented on May 18, 2024

Yes, keeping threading external makes sense. In my case it's a real-time visualization of high frequency data so keeping a separate render loop is more appropriate.
-The underlying data structure of the Vector class is a std::array which if misaligned is subject to write tearing.
(Further the atomic read/write assumption (guaranteed on x86/x64 for the fundamental datatypes, int, double..) should probably be asserted if the Vector was to be used in a multi threaded context)

from morphologica.

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.