Commit 9504a3d7 authored by Sreekanth Arikatla's avatar Sreekanth Arikatla
Browse files

DOC: Add documentation for Parallel support

parent 5a4f3a41
......@@ -7,7 +7,7 @@
iMSTK is a free & open source software toolkit written in C++
iMSTK is a free and open source software toolkit written in C++
that aids rapid prototyping of interactive multi-modal surgical
simulations. It provides a highly modular and easy to use framework that
can be extended and be interfaced with other third-party libraries for
......@@ -960,6 +960,34 @@ An example code on how to instantiate a haptic device is shown below
Paralle Support
iMSTK allows CPU based shared memory parallelization using Intel TBB library.
:code:`imstk::ParallelUtils` features utilities that allows users to explot loop-based
Below is the sample usage of the paralle for loop in the :code:`PointSetToCapsuleCD`
static function since collision computation can be run independently on each point in the set.
void PointSetToCapsuleCD::computeCollisionData()
ParallelUtils::parallelFor(static_cast<unsigned int>(m_pointSet->getVertexPositions().size()),
[&](const unsigned int idx)
const auto& point = m_pointSet->getVertexPosition(idx);
NarrowPhaseCD::pointToCapsule(point, idx, m_capsule.get(), m_colData);
Additional utility functions are available in the same namespace that allow
parallel execution of computational kernel over nested indices in 2D and 3D with
options to parallelize over a dimension of choice.
Miscellaneous Topics
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment