4 template<
unsigned int Nin,
class In,
unsigned int Ncoll,
class Coll,
bool use_numof>
8 TinyVector<int,Ncoll> index;
9 Coll::create_index(rd.
coord(), index);
11 TinyVector<int,Ncoll> shape;
12 Coll::create_shape(rd.
coord(), shape);
15 TinyVector<int,Ncoll+Nin> collshape;
16 for(
int i=0; i<int(Ncoll); i++) collshape(i)=shape(i);
17 for(
int i=0; i<int(Nin); i++) collshape(Ncoll+i)=rd.
data(
Rank<Nin>()).extent(i);
18 ODINLOG(odinlog,normalDebug) <<
"index/shape/collshape=" << index <<
"/" << shape <<
"/" << collshape << STD_endl;
19 if(!product(collshape)) {
20 ODINLOG(odinlog,errorLog) <<
"Zero-size shape " << collshape << STD_endl;
25 modify_coord(rd.
coord());
32 TinyVector<int,Ncoll+Nin> lowin=0;
33 TinyVector<int,Ncoll+Nin> uppin=0;
35 TinyVector<int,Ncoll+Nin> lowdst=0;
36 TinyVector<int,Ncoll+Nin> uppdst=0;
38 for(
int i=0; i<int(Ncoll); i++) lowdst(i)=uppdst(i)=index(i);
39 for(
int i=0; i<int(Nin); i++) uppin(Ncoll+i)=uppdst(Ncoll+i)=rd.
data(
Rank<Nin>()).extent(i)-1;
40 ODINLOG(odinlog,normalDebug) <<
"lowin/uppin=" << lowin <<
"/" << uppin << STD_endl;
41 ODINLOG(odinlog,normalDebug) <<
"lowdst/uppdst=" << lowdst <<
"/" << uppdst << STD_endl;
43 RectDomain<Ncoll+Nin> indomain(lowin,uppin);
44 RectDomain<Ncoll+Nin> dstdomain(lowdst,uppdst);
49 if(dataref.shape()!=collshape) {
50 dataref.resize(collshape);
51 dataref=STD_complex(0.0);
53 dataref(dstdomain)=dataref(dstdomain)+indata(indomain);
56 unsigned int numof_count=0;
57 if(use_numof) numof_count=product(shape);
59 if( completed(rd.
coord(),numof_count) ) {
60 ODINLOG(odinlog,normalDebug) <<
" data " << collshape <<
" complete" << STD_endl;
64 typename DataMap::iterator it=datamap.find(rd.
coord());
70 if(!execute_next_step(rd,controller))
return false;
78 template<
unsigned int Nin,
class In,
unsigned int Ncoll,
class Coll,
bool use_numof>
82 if(context.mode==RecoQueryContext::prep) {
85 modify_coord(outmask);
86 if(!calculate_count(context, context.
coord, outmask))
return false;
Data< T2, N_rank2 > & convert_to(Data< T2, N_rank2 > &dst, bool autoscale=true) const
averagecoll, chancoll, chanrepcoll, chanrepslicecoll, cyclecoll, driftcoll, echocoll,...
ComplexData< 1 > & data(Rank< 1 >) const
virtual bool query(RecoQueryContext &context)