OpendTect
7.0
|
Stats computation running in parallel. More...
Public Member Functions | |
ParallelCalc (const CalcSetup &s) | |
ParallelCalc (const CalcSetup &s, const T *data, size_type sz, const T *weights=0) | |
const uiString | errMsg () const |
mUseType (CalcSetup, idx_type) | |
mUseType (CalcSetup, size_type) | |
void | setEmpty () |
void | setValues (const T *inp, size_type sz, const T *wght=0) |
double | variance () const |
double | variance () const override |
Public Member Functions inherited from ParallelTask | |
virtual | ~ParallelTask () |
void | doParallel (bool yn) |
bool | execute () override |
virtual bool | executeParallel (bool parallel) |
std::int64_t | nrDone () const override |
May be -1, i.e. class does not report nrdone. More... | |
std::int64_t | totalNr () const override |
Public Member Functions inherited from ReportingTask | |
virtual | ~ReportingTask () |
void | getProgress (const ReportingTask &) |
Public Member Functions inherited from Task | |
virtual | ~Task () |
virtual void | controlWork (Control) |
virtual void | enableWorkControl (bool=true) |
Must be called before execute() More... | |
virtual uiRetVal | errorWithDetails () const |
virtual Control | getState () const |
virtual uiString | uiMessage () const |
will be message() again in 7.x More... | |
virtual uiString | uiNrDoneText () const |
will be nrDoneText() in 7.x More... | |
bool | workControlEnabled () const |
Public Member Functions inherited from NamedCallBacker | |
NamedCallBacker (const char *nm=0) | |
NamedCallBacker (const NamedCallBacker &) | |
virtual Notifier< NamedCallBacker > & | objectToBeDeleted () const |
bool | operator== (const NamedCallBacker &oth) const |
bool | operator== (const NamedObject &oth) const |
Public Member Functions inherited from CallBacker | |
CallBacker () | |
CallBacker (const CallBacker &) | |
virtual | ~CallBacker () |
bool | attachCB (const NotifierAccess &, const CallBack &, bool onlyifnew=false) const |
bool | attachCB (const NotifierAccess *notif, const CallBack &cb, bool onlyifnew=false) const |
void | detachAllNotifiers () const |
Call from the destructor of your inherited object. More... | |
void | detachCB (const NotifierAccess &, const CallBack &) const |
void | detachCB (const NotifierAccess *notif, const CallBack &cb) const |
virtual bool | isCapsule () const |
bool | isNotifierAttached (const NotifierAccess *) const |
Only for debugging purposes, don't use. More... | |
void | stopReceivingNotifications () const |
virtual CallBacker * | trueCaller () |
Public Member Functions inherited from NamedObject | |
NamedObject (const char *nm=nullptr) | |
NamedObject (const NamedObject &oth) | |
virtual | ~NamedObject () |
virtual BufferString | getName () const |
bool | getNameFromPar (const IOPar &) |
const name_type & | name () const override |
NamedObject & | operator= (const NamedObject &) |
bool | operator== (const NamedObject &oth) const |
virtual void | setName (const char *nm) |
Public Member Functions inherited from ObjectWithName | |
virtual | ~ObjectWithName () |
bool | hasName (const char *nm) const |
bool | hasName (const name_type &nm) const |
void | putNameInPar (IOPar &) const |
Public Member Functions inherited from Stats::BaseCalc< T > | |
virtual | ~BaseCalc () |
double | average () const |
void | clear () |
T | clipVal (float ratio, bool upper) const |
requires sort; 0 <= ratio <= 1 More... | |
size_type | count () const |
T | extreme (idx_type *index_of_extr=0) const |
idx_type | getIndex (Type) const |
only for Median, Min and Max More... | |
double | getValue (Type) const |
bool | hasUndefs () const |
bool | isEmpty () const |
bool | isWeighted () const |
T | max (idx_type *index_of_max=0) const |
T | median (idx_type *index_of_median=0) const |
const T * | medValsArr () const |
T | min (idx_type *index_of_min=0) const |
T | mostFreq () const |
float_complex | mostFreq () const |
mUseType (CalcSetup, idx_type) | |
mUseType (CalcSetup, size_type) | |
double | normvariance () const |
double | rms () const |
const CalcSetup & | setup () const |
size_type | size (bool used=true) const |
T | sqSum () const |
double | stdDev () const |
T | sum () const |
double | variance () const |
Protected Member Functions | |
bool | doFinish (bool) |
bool | doFinish (bool) override |
bool | doPrepare (int) override |
bool | doWork (od_int64, od_int64, int) |
bool | doWork (od_int64, od_int64, int) override |
od_int64 | nrIterations () const override |
const float_complex * | sort (idx_type *idx_of_med) |
const T * | sort (idx_type *index_of_median=nullptr) override |
Protected Member Functions inherited from ParallelTask | |
ParallelTask (const char *nm=0) | |
ParallelTask (const ParallelTask &) | |
void | addToNrDone (std::int64_t increment) |
std::int64_t | calculateThreadSize (std::int64_t totalnr, int nrthreads, int thread) const |
virtual int | maxNrThreads () const |
virtual int | minThreadSize () const |
void | quickAddToNrDone (std::int64_t loopidx) |
void | resetNrDone () |
virtual bool | stopAllOnFailure () const |
Protected Member Functions inherited from ReportingTask | |
ReportingTask (const char *nm=nullptr) | |
void | incrementProgress () |
ProgressMeter * | progressMeter () const |
void | reportProgressFinished () |
void | reportProgressStarted () |
void | resetProgress () |
void | setProgressMeter (ProgressMeter *) override |
Must be called before execute() More... | |
void | updateProgressMeter (bool forced=false, std::int64_t *totalnr=0) |
void | updateReportedName () |
Protected Member Functions inherited from Task | |
Task (const char *nm=nullptr) | |
virtual bool | shouldContinue () |
Protected Member Functions inherited from NamedCallBacker | |
void | sendDelNotif () const |
Protected Member Functions inherited from Stats::BaseCalc< T > | |
BaseCalc (const CalcSetup &s) | |
T | computeMedian (idx_type *index_of_median=nullptr) const |
T | computeWeightedMedian (idx_type *index_of_median=nullptr) const |
bool | isZero (const double &val) const |
bool | isZero (const float &val) const |
bool | isZero (const T &) const |
const float_complex * | sort (idx_type *idx_of_med) |
Protected Attributes | |
Threads::Barrier | barrier_ |
const T * | data_ = nullptr |
uiString | errmsg_ |
T | meanval_ |
T | meanval_w_ |
bool * | udfarr_ = nullptr |
T | variance_ |
T | variance_w_ |
const T * | weights_ = nullptr |
Protected Attributes inherited from Task | |
Control | control_ |
Threads::ConditionVar * | workcontrolcondvar_ |
Protected Attributes inherited from NamedCallBacker | |
Threads::Atomic< bool > | delalreadytriggered_ |
Notifier< NamedCallBacker > | delnotif_ |
Protected Attributes inherited from NamedObject | |
BufferString | name_ |
Protected Attributes inherited from Stats::BaseCalc< T > | |
LargeValVec< idx_type > | clss_ |
LargeValVec< T > | clsswt_ |
bool | issorted_ = false |
idx_type | maxidx_ |
T | maxval_ |
LargeValVec< idx_type > | medidxs_ |
LargeValVec< T > | medvals_ |
LargeValVec< T > | medwts_ |
idx_type | minidx_ |
T | minval_ |
size_type | nradded_ |
Threads::Atomic< size_type > | nrused_ |
CalcSetup | setup_ |
T | sum_w_ |
T | sum_wx_ |
T | sum_wxx_ |
T | sum_x_ |
T | sum_xx_ |
Additional Inherited Members | |
Public Types inherited from Task | |
enum | Control { Run , Pause , Stop } |
Public Types inherited from ObjectWithName | |
typedef OD::String | name_type |
Static Public Member Functions inherited from ParallelTask | |
static uiString | sPosFinished () |
static uiString | sTrcFinished () |
Static Public Member Functions inherited from Task | |
static uiString | stdNrDoneText () |
static uiString | uiStdNrDoneText () |
Static Public Member Functions inherited from CallBacker | |
static void | createReceiverForCurrentThread () |
static void | removeReceiverForCurrentThread () |
Public Attributes inherited from ReportingTask | |
Notifier< ReportingTask > | progressUpdated |
Stats computation running in parallel.
The difference with the running values (Stats::RunCalc) is that you have to pass the entire data array prior to the execution.
It also works with optional weights.
<>
|
inline |
|
inline |
|
inlineprotectedvirtual |
Called after all doWork have finished.
success | indicates whether all doWork returned true. |
Reimplemented from ParallelTask.
|
inlineoverrideprotectedvirtual |
Called after all doWork have finished.
success | indicates whether all doWork returned true. |
Reimplemented from ParallelTask.
|
inlineoverrideprotectedvirtual |
Called once, before any doWork is called.
Reimplemented from ParallelTask.
|
inlineprotected |
|
inlineoverrideprotected |
|
inline |
Stats::ParallelCalc< T >::mUseType | ( | CalcSetup | , |
idx_type | |||
) |
Stats::ParallelCalc< T >::mUseType | ( | CalcSetup | , |
size_type | |||
) |
|
inlineoverrideprotectedvirtual |
Implements ParallelTask.
|
inline |
|
inline |
|
inlineprotectedvirtual |
Reimplemented from Stats::BaseCalc< T >.
|
inlineoverrideprotectedvirtual |
Reimplemented from Stats::BaseCalc< T >.
|
inlinevirtual |
Reimplemented from Stats::BaseCalc< T >.
|
inlineoverridevirtual |
Reimplemented from Stats::BaseCalc< T >.
|
mutableprotected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
Generated at for the OpendTect seismic interpretation project. Copyright (C): dGB Beheer B.V. 1995-2024