v2.0.0
Loading...
Searching...
No Matches
fwd_thread_arg.h File Reference

Per-thread work packet (dipole range, coil set, output column) consumed by the parallel forward-solution dipole loop. More...

#include "fwd_global.h"
#include "fwd_types.h"
#include <Eigen/Core>
#include <functional>
#include <memory>
Include dependency graph for fwd_thread_arg.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  FWDLIB::FwdThreadArg
 Per-thread work packet carrying the dipole-index range, coil set, field/grad callback and write-back view into the shared lead-field matrix — unit of work for the parallel source-space dipole loop. More...

Namespaces

namespace  MNELIB
 Core MNE data structures (source spaces, source estimates, hemispheres).
namespace  FWDLIB
 Forward modelling — BEM solver, spherical models, sensor/coil definitions and the lead-field assembly that links current dipoles to MEG/EEG sensor readings.

Detailed Description

Per-thread work packet (dipole range, coil set, output column) consumed by the parallel forward-solution dipole loop.

SPDX-License-Identifier: BSD-3-Clause Copyright (c) 2017-2026 MNE-CPP Authors

Author
Christoph Dinh chris.nosp@m.toph.nosp@m..dinh.nosp@m.@mne.nosp@m.-cpp..nosp@m.org; Lorenz Esch loren.nosp@m.z.es.nosp@m.ch@tu.nosp@m.-ilm.nosp@m.enau..nosp@m.de; Gabriel Motta gabri.nosp@m.elbe.nosp@m.nmott.nosp@m.a@gm.nosp@m.ail.c.nosp@m.om
Since
0.1.0
Date
March 2017

Building the lead-field matrix G is embarrassingly parallel along the source dimension: each dipole's column of G is independent of every other dipole's column. FwdThreadArg packages everything one worker thread needs to compute a slice of those columns — the source-space pointer and the index range it owns, the coil set in the right coordinate frame, the field/grad callback to invoke, and a write-back view into the shared output matrix — so the dispatcher can hand it straight to a QThreadPool::start() and recover linear speed-up on multi-core hosts.

Refactored from fwdThreadArgRec in MNE-C compute_forward.c.

Definition in file fwd_thread_arg.h.