OpendTect-6_4
6.4
|
Go to the source code of this file.
Classes | |
class | ParallelTask |
Generalization of a task that can be run in parallel. More... | |
Macros | |
#define | mDeclareParallelCalcStd(uimsg) |
#define | mDefParallelCalcNoPars(clss, uimsg) |
#define | mDefParallelCalc1Par(clss, uimsg, T1, v1) |
#define | mDefParallelCalc2Pars(clss, uimsg, T1, v1, T2, v2) |
#define | mDefParallelCalc3Pars(clss, uimsg, T1, v1, T2, v2, T3, v3) |
#define | mDefParallelCalc4Pars(clss, uimsg, T1, v1, T2, v2, T3, v3, T4, v4) |
#define | mDefParallelCalc5Pars(clss, uimsg, T1, v1, T2, v2, T3, v3, T4, v4, T5, v5) |
#define | mDefParallelCalc6Pars(clss, uimsg, T1, v1, T2, v2, T3, v3, T4, v4, T5, v5, T6, v6) |
#define | mDefParallelCalc7Pars(clss, uimsg, T1, v1, T2, v2, T3, v3, T4, v4, T5, v5, T6, v6, T7, v7) |
#define | mDefParallelCalcBody(preop, impl, postop) |
#define mDeclareParallelCalcStd | ( | uimsg | ) |
Macros to define a class to exectute your loop in parallel.
The loop index is 'idx'.
Example:
The original loop was:
for ( int isamp=0; isamp<outnrsamples; isamp++ ) trc.set( isamp, storinterp_->get(blockbuf_,isamp), curcomp );
There are 4 parameters (trc, curcomp, blockbuf_ and storinterp_) to pass to the executing object. You also need to pass a uiString giving the uiMessage if the execution is done with a taskrunner, thus:
mDefParallelCalc4Pars( SEGYSampleInterpreter, od_static_tr("SEGYSampleInterpreter","Copying trace information"), SeisTrc&,trc, int,curcomp, unsigned char*,blockbuf, const TraceDataInterpreter*,storinterp) mDefParallelCalcBody( * No initializations *\, trc_.set( idx, storinterp_->get(blockbuf_,idx), curcomp_ ); , * No post-operations *)
SEGYSampleInterpreter interp( trc.size(), trc, curcomp, blockbuf_, storinterp_); interp.execute();
#define mDefParallelCalc1Par | ( | clss, | |
uimsg, | |||
T1, | |||
v1 | |||
) |
#define mDefParallelCalc2Pars | ( | clss, | |
uimsg, | |||
T1, | |||
v1, | |||
T2, | |||
v2 | |||
) |
#define mDefParallelCalc3Pars | ( | clss, | |
uimsg, | |||
T1, | |||
v1, | |||
T2, | |||
v2, | |||
T3, | |||
v3 | |||
) |
#define mDefParallelCalc4Pars | ( | clss, | |
uimsg, | |||
T1, | |||
v1, | |||
T2, | |||
v2, | |||
T3, | |||
v3, | |||
T4, | |||
v4 | |||
) |
#define mDefParallelCalc5Pars | ( | clss, | |
uimsg, | |||
T1, | |||
v1, | |||
T2, | |||
v2, | |||
T3, | |||
v3, | |||
T4, | |||
v4, | |||
T5, | |||
v5 | |||
) |
#define mDefParallelCalc6Pars | ( | clss, | |
uimsg, | |||
T1, | |||
v1, | |||
T2, | |||
v2, | |||
T3, | |||
v3, | |||
T4, | |||
v4, | |||
T5, | |||
v5, | |||
T6, | |||
v6 | |||
) |
#define mDefParallelCalc7Pars | ( | clss, | |
uimsg, | |||
T1, | |||
v1, | |||
T2, | |||
v2, | |||
T3, | |||
v3, | |||
T4, | |||
v4, | |||
T5, | |||
v5, | |||
T6, | |||
v6, | |||
T7, | |||
v7 | |||
) |
#define mDefParallelCalcBody | ( | preop, | |
impl, | |||
postop | |||
) |
#define mDefParallelCalcNoPars | ( | clss, | |
uimsg | |||
) |
Generated at for the OpendTect seismic interpretation project. Copyright (C): dGB Beheer B. V. 2019