for(int j=0; j < s1.size1(); ++j) for(int i=0; i < s1.size2(); ++i) { std::ostringstream ost; if (Layout::primaryNode()) ost << s << "[" << i << "][" << j << "]"; write(nml, ost.str(), s1[i][j]); } return nml;
for(int j=0; j < d.size2(); ++j) for(int i=0; i < d.size1(); ++i) write(bin, d[j][i]);  return bin;
NmlWriter& write(NmlWriter& nml, const string& s, const multi2d<T>& s1){  for(int j=0; j < s1.size1(); ++j)    for(int i=0; i < s1.size2(); ++i)    {      std::ostringstream ost;      if (Layout::primaryNode()) 	ost << s << "[" << i << "][" << j << "]";      write(nml, ost.str(), s1[i][j]);    }  return nml;}