Comments (2)
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.
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)
- Updating a visual model containing text can fail if GLFW context is not available HOT 1
- Make find_package for Qt optional not required HOT 1
- Does CartGridVisual needs its template arg T? HOT 1
- Move freetype_init from VisualResources to Visual HOT 3
- Fix GraphVisual to accept morph::vec and std::array containers of data for graphing HOT 2
- This project can run under Windows with msys2 and gcc HOT 7
- how to use this library under wxWidgets HOT 72
- Get rid of new and delete in Random.h
- wrong links in the homepage README.md file HOT 1
- How to draw 3D coordinates grid HOT 42
- key value issue in wx/keycodes.h HOT 1
- GridVisual should have axis labels, like GraphVisual
- Get rid of new and delete in morph/gl/shaders.h HOT 1
- Make a 3D graph class
- Remove new and delete from VisualResources HOT 1
- Remove new and delete from VisualModel/VisualTextModel HOT 2
- Remove new/delete from GraphVisual
- Remove new/delete from a batch of less significant files HOT 2
- Write opencv out of morph/Mnist.h
- Segmentation fault in morph::GridVisual::initializeVerticesRectsInterpolated when running grid_image example HOT 3
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 morphologica.