 |
OpendTect
6.6
|
Go to the documentation of this file.
25 template <
class fT,
class ArrT >
37 if ( !inp.isEmpty() && inp[0] )
38 totalnr_ = inp[0]->info().getTotalSz();
46 for (
int iarr=1; iarr<inp_.size(); iarr++ )
51 if ( inp_[iarr]->info().getTotalSz() > totalnr_ )
52 totalnr_ = inp_[iarr]->info().getTotalSz();
55 out_.setSize( totalnr_ );
56 if ( !
out_.getData() )
58 msg_ =
"Cannot stack this type of object";
68 fT* outarr =
out_.getData();
70 for (
od_int64 idx=start; idx<=stop; idx++ )
72 fT& outval = outarr[idx];
73 for (
int iarr=0; iarr<inp_.size(); iarr++ )
75 if ( !inp_[iarr] )
continue;
76 const fT* inparr = inp_[iarr]->getData();
78 idx >= inp_[iarr]->info().getTotalSz() )
81 const fT val = inparr[idx];
89 if ( normalize_ && count )
97 void doNormalize(
bool normalize ) { normalize_ = normalize; }
98 const char*
errMsg()
const {
return msg_.str(); }
void doNormalize(bool normalize)
Definition: arrayndstacker.h:97
Gently stacks ArrayND by summation along the secondary axis Currently implemented only 1D,...
Definition: arrayndstacker.h:27
#define mIsUdf(val)
Use mIsUdf to check for undefinedness of simple types.
Definition: undefval.h:289
#define od_int64
Definition: plftypes.h:35
FixedString msg_
Definition: arrayndstacker.h:106
bool doPrepare(int nrthreads)
Definition: arrayndstacker.h:41
bool normalize_
Definition: arrayndstacker.h:105
#define mClass(module)
Definition: commondefs.h:181
ArrT & out_
Definition: arrayndstacker.h:104
OD::String that holds an existing text string.
Definition: fixedstring.h:29
bool doWork(od_int64 start, od_int64 stop, int threadidx)
Definition: arrayndstacker.h:66
od_int64 totalnr_
Definition: arrayndstacker.h:102
Generalization of a task that can be run in parallel.
Definition: paralleltask.h:66
const char * errMsg() const
Definition: arrayndstacker.h:98
Array1DStacker(const ObjectSet< ArrT > &inp, ArrT &out)
Definition: arrayndstacker.h:30
const ObjectSet< ArrT > & inp_
Definition: arrayndstacker.h:103
od_int64 nrIterations() const
Definition: arrayndstacker.h:96
out_[idx]
Definition: arrayndalgo.h:1709
Generated at
for the OpendTect
seismic interpretation project.
Copyright (C): dGB Beheer B.V. 1995-2021