IAP GITLAB

Skip to content
Snippets Groups Projects
Commit a5e71bef authored by Maximilian Reininghaus's avatar Maximilian Reininghaus :vulcan:
Browse files

better template according to boost::histogram user guide

parent 778963c7
No related branches found
No related tags found
No related merge requests found
...@@ -19,11 +19,12 @@ namespace corsika { ...@@ -19,11 +19,12 @@ namespace corsika {
* Note that this function makes a temporary, dense copy of the histogram, which could * Note that this function makes a temporary, dense copy of the histogram, which could
* be an issue for huge sizes (e.g. for high dimensions) * be an issue for huge sizes (e.g. for high dimensions)
*/ */
template <typename hist_type> template <class Axes, class Storage>
void save_hist(hist_type const& h, std::string const& filename) { void save_hist(boost::histogram::histogram<Axes, Storage> const& h,
auto const rank = h.rank(); std::string const& filename) {
auto const size = h.size(); int const rank = h.rank();
using value_type = typename hist_type::value_type; int const size = h.size();
using value_type = typename boost::histogram::histogram<Axes, Storage>::value_type;
std::vector<size_t> axes_dims; std::vector<size_t> axes_dims;
axes_dims.reserve(rank); axes_dims.reserve(rank);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment