ENH: additional constructors for IjkField

This commit is contained in:
Mark Olesen
2019-02-27 08:01:19 +01:00
parent eae53be0c7
commit 90ff1dfa5c
3 changed files with 30 additions and 11 deletions

View File

@ -36,7 +36,8 @@ template<class T>
Ostream& print(const IjkField<T>& fld)
{
Info<< static_cast<const Field<T>&>(fld).size()
<< " " << fld.sizes() << ' ' << flatOutput(fld);
<< " addr:" << long(fld.cdata()) << ' ' << fld.sizes() << ' '
<< flatOutput(fld);
return Info;
}
@ -102,6 +103,11 @@ int main(int argc, char *argv[])
Info<< "/= operator: "; print(field1) << nl;
IjkField<scalar> field3(std::move(field2));
Info<< "Move construct: "; print(field2) << nl;
print(field3) << nl;
// Field operations are still limited, but we can bypass things too
{