src/lib/ranges/dynamic_range.cc: warning (no error) if ranges different, check meta instead (preliminary solution)
This commit is contained in:
parent
ac5b74c57a
commit
e3a1b87200
1 changed files with 12 additions and 3 deletions
|
@ -180,9 +180,18 @@ namespace MultiArrayTools
|
||||||
const std::string& iname = inames[i];
|
const std::string& iname = inames[i];
|
||||||
const std::string smeta = (iname.find_first_of("=") != std::string::npos) ? iname.substr(iname.find_first_of("=")+1) : "";
|
const std::string smeta = (iname.find_first_of("=") != std::string::npos) ? iname.substr(iname.find_first_of("=")+1) : "";
|
||||||
if(sIMap.count(iname) != 0){
|
if(sIMap.count(iname) != 0){
|
||||||
MA_ASSERT(this->range()->sub(i) == sIMap.at(iname)->range(),
|
auto thisr = this->range()->sub(i);
|
||||||
std::string("range of index at position ")+std::to_string(i)+
|
auto mapr = sIMap.at(iname)->range();
|
||||||
|
if(thisr != mapr){
|
||||||
|
MA_WARNING(std::string("range of index at position ")+std::to_string(i)+
|
||||||
" is different from range of index with name "+iname);
|
" is different from range of index with name "+iname);
|
||||||
|
MA_ASSERT(thisr->size() == mapr->size(),
|
||||||
|
"different size!");
|
||||||
|
for(size_t jj = 0; jj != thisr->size(); ++jj){
|
||||||
|
MA_ASSERT(thisr->stringMeta(jj) == mapr->stringMeta(jj),
|
||||||
|
"different meta");
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
sIMap[iname] = this->range()->sub(i)->aindex();
|
sIMap[iname] = this->range()->sub(i)->aindex();
|
||||||
|
|
Loading…
Reference in a new issue