Commit 93e23da6 authored by Thibault Hallouin's avatar Thibault Hallouin
Browse files

avoid copies of temporal masks

The template argument defining the type of for temporal masks was not
used in the elements/intermediates/metrics functions, and since a copy
from the user-provided input masks is required to not modify it, it
makes more sense to directly initialise it as an xtensor rather than
propagate a template argument to use pytensor/rtensor.
Showing with 2 additions and 2 deletions
+2 -2
...@@ -27,7 +27,7 @@ namespace evalhyd ...@@ -27,7 +27,7 @@ namespace evalhyd
const XD2& q_obs; const XD2& q_obs;
const XD2& q_prd; const XD2& q_prd;
// members for optional input data // members for optional input data
XB3 t_msk; xt::xtensor<bool, 3> t_msk;
const std::vector<xt::xkeep_slice<int>>& b_exp; const std::vector<xt::xkeep_slice<int>>& b_exp;
// members for dimensions // members for dimensions
......
...@@ -34,7 +34,7 @@ namespace evalhyd ...@@ -34,7 +34,7 @@ namespace evalhyd
const XD2& _q_thr; const XD2& _q_thr;
const xt::xtensor<double, 1>& _c_lvl; const xt::xtensor<double, 1>& _c_lvl;
xtl::xoptional<const std::string, bool> _events; xtl::xoptional<const std::string, bool> _events;
XB4 t_msk; xt::xtensor<bool, 4> t_msk;
const std::vector<xt::xkeep_slice<int>>& b_exp; const std::vector<xt::xkeep_slice<int>>& b_exp;
// member for "reproducible randomness" // member for "reproducible randomness"
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment