$include_dir="/home/hyper-archives/boost-users/include"; include("$include_dir/msg-header.inc") ?>
From: Craig Glasgow (glasgow.craig_at_[hidden])
Date: 2006-02-20 04:42:30
Hi,
I'm trying to write serialization load and save methods for multi-array. For
the load method I have a function with
the prototype:
template<class Archive, class T, std::size_t NumDims>
inline void load(Archive& ar, boost::multi_array<T, NumDims>& arr,
const unsigned int file_version)
This function gets called when the array is serialized and should populate
the multi-array arr. However this requires re-sizing arr which apparently
can only be done using the extents construct e.g.
arr.resize(boost::extents[3][4][2]),
but I want to be able to do this for an arbitray number of dims as with
reshape.
Any idea how this can be done?
Regards
Craig