OpenWalnut
1.5.0dev
|
Functor that does multithreaded spherical harmonic fitting. More...
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< WGrid > | m_grid |
The grid of the data. More... | |
std::vector< WVector3d > const & | m_gradients |
The gradients of the hardi data. More... | |
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.
WMHARDIToSphericalHarmonics::HARDICalculation::HARDICalculation | ( | WSphericalHarmonicsCoefficientsThread<>::ThreadParameter | threadParams, |
bool | multiThreaded, | ||
std::shared_ptr< WGrid > | grid, | ||
std::vector< WVector3d > const & | gradients | ||
) |
Constructor.
threadParams | The partially initialised thread parameter struct that will be forwarded to the worker threads. |
multiThreaded | If true, the maximum number of threads should be used. |
grid | The grid of the input data. |
gradients | The gradients of the hardi data. |
Definition at line 377 of file WMHARDIToSphericalHarmonics.cpp.
WMHARDIToSphericalHarmonics::HARDICalculation::~HARDICalculation | ( | ) |
Destructor.
Definition at line 387 of file WMHARDIToSphericalHarmonics.cpp.
WMHARDIToSphericalHarmonics::HARDICalculation::result_type WMHARDIToSphericalHarmonics::HARDICalculation::operator() | ( | WValueSet< T > const * | ) | const |
Allocate shared memory and construct and run threads, construct output datasets.
T | The integral type of values in the valueset. |
Definition at line 253 of file WMHARDIToSphericalHarmonics.h.
References m_multiThreaded, m_parameter, and WThreadedRunner::run().
|
private |
The gradients of the hardi data.
Definition at line 248 of file WMHARDIToSphericalHarmonics.h.
|
private |
The grid of the data.
Definition at line 245 of file WMHARDIToSphericalHarmonics.h.
|
private |
If more than 1 thread should be used.
Definition at line 242 of file WMHARDIToSphericalHarmonics.h.
Referenced by operator()().
|
private |
The parameters that will be forwarded to the threads.
Definition at line 239 of file WMHARDIToSphericalHarmonics.h.
Referenced by operator()().