From 3d082a32f22c3982cefb1ccae2da2df7f989438d Mon Sep 17 00:00:00 2001 From: Daniel Campora <dcampora@cern.ch> Date: Mon, 28 Aug 2023 08:05:09 +0200 Subject: [PATCH] Added missing dim3 json conversions. --- stream/gear/src/Property.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 stream/gear/src/Property.cpp diff --git a/stream/gear/src/Property.cpp b/stream/gear/src/Property.cpp new file mode 100644 index 00000000000..eeb186ab169 --- /dev/null +++ b/stream/gear/src/Property.cpp @@ -0,0 +1,12 @@ +#include <Property.cuh> + +void from_json(const nlohmann::json& j, dim3& d) +{ + const auto ar = j.get<std::array<unsigned, 3>>(); + d = {ar[0], ar[1], ar[2]}; +} + +void to_json(nlohmann::json& j, const dim3& d) +{ + j = nlohmann::json{ d.x, d.y, d.z }; +} -- GitLab