v2.0.0
Loading...
Searching...
No Matches
FWDLIB::FwdThreadArg Class Reference

Thread-local arguments for parallel forward field computation (source range, coils, result buffer). More...

#include <fwd_thread_arg.h>

Public Types

typedef std::unique_ptr< FwdThreadArgUPtr

Public Member Functions

 FwdThreadArg ()
 ~FwdThreadArg ()

Static Public Member Functions

static FwdThreadArg::UPtr create_eeg_multi_thread_duplicate (FwdThreadArg &one, bool bem_model)
static FwdThreadArg::UPtr create_meg_multi_thread_duplicate (FwdThreadArg &one, bool bem_model)

Public Attributes

Eigen::MatrixXf * res
Eigen::MatrixXf * res_grad
int off
fwdFieldFunc field_pot
fwdVecFieldFunc vec_field_pot
fwdFieldGradFunc field_pot_grad
FwdCoilSetcoils_els
void * client
MNELIB::MNESourceSpaces
bool fixed_ori
int comp
int stat
std::function< void()> client_free

Detailed Description

Thread-local arguments for parallel forward field computation (source range, coils, result buffer).

Implements a Forward Thread Argument (Replaces *fwdThreadArg,fwdThreadArgRec; struct of MNE-C compute_forward.c).

Definition at line 88 of file fwd_thread_arg.h.

Member Typedef Documentation

◆ UPtr

typedef std::unique_ptr<FwdThreadArg> FWDLIB::FwdThreadArg::UPtr

Unique pointer type for FwdThreadArg.

Definition at line 91 of file fwd_thread_arg.h.

Constructor & Destructor Documentation

◆ FwdThreadArg()

FwdThreadArg::FwdThreadArg ( )

Constructs the Forward Thread Argument

Definition at line 60 of file fwd_thread_arg.cpp.

◆ ~FwdThreadArg()

FwdThreadArg::~FwdThreadArg ( )

Destroys the Forward Thread Argument

Definition at line 78 of file fwd_thread_arg.cpp.

Member Function Documentation

◆ create_eeg_multi_thread_duplicate()

FwdThreadArg::UPtr FwdThreadArg::create_eeg_multi_thread_duplicate ( FwdThreadArg & one,
bool bem_model )
static

Create a thread-safe duplicate for EEG parallel forward computation.

Parameters
[in]oneTemplate thread argument to duplicate.
[in]bem_modelWhether to duplicate the BEM model sub-object.
Returns
Thread-safe duplicate.

Definition at line 86 of file fwd_thread_arg.cpp.

◆ create_meg_multi_thread_duplicate()

FwdThreadArg::UPtr FwdThreadArg::create_meg_multi_thread_duplicate ( FwdThreadArg & one,
bool bem_model )
static

Create a thread-safe duplicate for MEG parallel forward computation.

Parameters
[in]oneTemplate thread argument to duplicate.
[in]bem_modelWhether to duplicate the BEM model sub-object.
Returns
Thread-safe duplicate.

Definition at line 104 of file fwd_thread_arg.cpp.

Member Data Documentation

◆ client

void* FWDLIB::FwdThreadArg::client

Client data for the field computation function.

Definition at line 135 of file fwd_thread_arg.h.

◆ client_free

std::function<void()> FWDLIB::FwdThreadArg::client_free

Releases owned client sub-objects.

Definition at line 140 of file fwd_thread_arg.h.

◆ coils_els

FwdCoilSet* FWDLIB::FwdThreadArg::coils_els

The coil definitions.

Definition at line 134 of file fwd_thread_arg.h.

◆ comp

int FWDLIB::FwdThreadArg::comp

Which component to compute for free orientations.

Definition at line 138 of file fwd_thread_arg.h.

◆ field_pot

fwdFieldFunc FWDLIB::FwdThreadArg::field_pot

Computes the field or potential for one dipole orientation.

Definition at line 131 of file fwd_thread_arg.h.

◆ field_pot_grad

fwdFieldGradFunc FWDLIB::FwdThreadArg::field_pot_grad

Computes the gradient of field or potential for one dipole orientation.

Definition at line 133 of file fwd_thread_arg.h.

◆ fixed_ori

bool FWDLIB::FwdThreadArg::fixed_ori

Compute fixed orientation solution?

Definition at line 137 of file fwd_thread_arg.h.

◆ off

int FWDLIB::FwdThreadArg::off

Offset within the result to the first source space vertex solution.

Definition at line 130 of file fwd_thread_arg.h.

◆ res

Eigen::MatrixXf* FWDLIB::FwdThreadArg::res

Destination for the solution (ncoil x nsources).

Definition at line 128 of file fwd_thread_arg.h.

◆ res_grad

Eigen::MatrixXf* FWDLIB::FwdThreadArg::res_grad

Gradient result (ncoil x 3*nsources).

Definition at line 129 of file fwd_thread_arg.h.

◆ s

MNELIB::MNESourceSpace* FWDLIB::FwdThreadArg::s

The source space to process.

Definition at line 136 of file fwd_thread_arg.h.

◆ stat

int FWDLIB::FwdThreadArg::stat

Result status (OK or FAIL).

Definition at line 139 of file fwd_thread_arg.h.

◆ vec_field_pot

fwdVecFieldFunc FWDLIB::FwdThreadArg::vec_field_pot

Computes the field or potential for all dipole orientations.

Definition at line 132 of file fwd_thread_arg.h.


The documentation for this class was generated from the following files: