Remove unnecessary intermediate variable

Co-authored-by: Paul Romano <paul.k.romano@gmail.com>
This commit is contained in:
Gavin Ridley 2021-11-09 13:10:44 -05:00 committed by GitHub
parent 41c8cb4106
commit 15be2e1d06
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -34,9 +34,8 @@ UrrData::UrrData(hid_t group_id)
// contiguity of memory accesses.
const auto n_energy = shape[0];
const auto n_cdf_values = shape[2];
xt::xtensor<double, 2>::shape_type new_shape = {n_energy, n_cdf_values};
cdf_values_.resize(new_shape);
xs_values_.resize(new_shape);
cdf_values_.resize({n_energy, n_cdf_values});
xs_values_.resize({n_energy, n_cdf_values});
// Now fill in the values. Using manual loops here since we might
// not have fancy xtensor slicing code written for GPU tensors.