OpenWalnut  1.5.0dev
Public Member Functions | Private Attributes | List of all members
WMHARDIToSphericalHarmonics::HARDICalculation Class Reference

Functor that does multithreaded spherical harmonic fitting. More...

+ Inheritance diagram for WMHARDIToSphericalHarmonics::HARDICalculation:
+ Collaboration diagram for WMHARDIToSphericalHarmonics::HARDICalculation:

Public Member Functions

 HARDICalculation (WSphericalHarmonicsCoefficientsThread<>::ThreadParameter threadParams, bool multiThreaded, std::shared_ptr< WGrid > grid, std::vector< WVector3d > const &gradients)
 Constructor. More...
 
 ~HARDICalculation ()
 Destructor. More...
 
template<typename T >
result_type operator() (WValueSet< T > const *) const
 Allocate shared memory and construct and run threads, construct output datasets. More...
 

Private Attributes

WSphericalHarmonicsCoefficientsThread ::ThreadParameter m_parameter
 The parameters that will be forwarded to the threads. More...
 
bool m_multiThreaded
 If more than 1 thread should be used. More...
 
std::shared_ptr< WGridm_grid
 The grid of the data. More...
 
std::vector< WVector3d > const & m_gradients
 The gradients of the hardi data. More...
 

Detailed Description

Functor that does multithreaded spherical harmonic fitting.

This functor provides a template operator() that has the type of the values stored in the valueset as a template parameter. WValueSet's applyFunction will call the version with the correct type.

Definition at line 207 of file WMHARDIToSphericalHarmonics.h.

Constructor & Destructor Documentation

◆ HARDICalculation()

WMHARDIToSphericalHarmonics::HARDICalculation::HARDICalculation ( WSphericalHarmonicsCoefficientsThread<>::ThreadParameter  threadParams,
bool  multiThreaded,
std::shared_ptr< WGrid grid,
std::vector< WVector3d > const &  gradients 
)

Constructor.

Parameters
threadParamsThe partially initialised thread parameter struct that will be forwarded to the worker threads.
multiThreadedIf true, the maximum number of threads should be used.
gridThe grid of the input data.
gradientsThe gradients of the hardi data.

Definition at line 377 of file WMHARDIToSphericalHarmonics.cpp.

◆ ~HARDICalculation()

WMHARDIToSphericalHarmonics::HARDICalculation::~HARDICalculation ( )

Destructor.

Definition at line 387 of file WMHARDIToSphericalHarmonics.cpp.

Member Function Documentation

◆ operator()()

template<typename T >
WMHARDIToSphericalHarmonics::HARDICalculation::result_type WMHARDIToSphericalHarmonics::HARDICalculation::operator() ( WValueSet< T > const *  ) const

Allocate shared memory and construct and run threads, construct output datasets.

Template Parameters
TThe integral type of values in the valueset.
Returns
result value

Definition at line 253 of file WMHARDIToSphericalHarmonics.h.

References m_multiThreaded, m_parameter, and WThreadedRunner::run().

+ Here is the call graph for this function:

Member Data Documentation

◆ m_gradients

std::vector< WVector3d > const& WMHARDIToSphericalHarmonics::HARDICalculation::m_gradients
private

The gradients of the hardi data.

Definition at line 248 of file WMHARDIToSphericalHarmonics.h.

◆ m_grid

std::shared_ptr< WGrid > WMHARDIToSphericalHarmonics::HARDICalculation::m_grid
private

The grid of the data.

Definition at line 245 of file WMHARDIToSphericalHarmonics.h.

◆ m_multiThreaded

bool WMHARDIToSphericalHarmonics::HARDICalculation::m_multiThreaded
private

If more than 1 thread should be used.

Definition at line 242 of file WMHARDIToSphericalHarmonics.h.

Referenced by operator()().

◆ m_parameter

WSphericalHarmonicsCoefficientsThread ::ThreadParameter WMHARDIToSphericalHarmonics::HARDICalculation::m_parameter
private

The parameters that will be forwarded to the threads.

Definition at line 239 of file WMHARDIToSphericalHarmonics.h.

Referenced by operator()().


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