5 template<
unsigned int Nunmod,
class Unmod,
unsigned int Nsplit,
class Split>
13 TinyVector<int,Nsplit> splitshape;
14 for(
int i=0; i<int(Nsplit); i++) splitshape(i)=indata.extent(i);
16 TinyVector<int,Nunmod> outshape;
17 for(
int i=0; i<int(Nunmod); i++) outshape(i)=indata.extent(Nsplit+i);
19 ODINLOG(odinlog,normalDebug) <<
"indata.shape()/outshape/splitshape=" << indata.shape() <<
"/" << outshape <<
"/" << splitshape << STD_endl;
22 TinyVector<int,Nsplit+Nunmod> outshape_padded=1;
23 for(
unsigned int i=0; i<Nunmod; i++) outshape_padded(Nsplit+i)=outshape(i);
28 TinyVector<int,Nsplit+Nunmod> lowin=0;
29 TinyVector<int,Nsplit+Nunmod> uppin=outshape_padded-1;
31 TinyVector<int,Nsplit+Nunmod> lowout=0;
32 TinyVector<int,Nsplit+Nunmod> uppout=outshape_padded-1;
35 RectDomain<Nsplit+Nunmod> outdomain(lowout,uppout);
41 for(
int isplit=0; isplit<product(splitshape); isplit++) {
44 TinyVector<int,Nsplit> splitindex=index2extent(splitshape, isplit);
47 for(
unsigned int i=0; i<Nsplit; i++) lowin(i)=uppin(i)=splitindex(i);
50 RectDomain<Nsplit+Nunmod> indomain(lowin,uppin);
51 outdata_padded(outdomain)=indata(indomain);
53 outdata_padded.convert_to(outdata);
58 Split::modify(RecoIndex::separate, rdout.
coord());
59 Split::set_index(splitindex, rdout.
coord());
61 if(!execute_next_step(rdout,controller))
return false;
RecoData & copy_meta(const RecoData &rd)
ComplexData< 1 > & data(Rank< 1 >) const
chansplit, repsplit: Split data in one or more dimensions