From 5ca0774a466b2b14f197dc40488a733bce030208 Mon Sep 17 00:00:00 2001 From: Ana Gainaru Date: Tue, 11 Jun 2024 08:07:17 -0400 Subject: [PATCH] Patch for when both xrootd and derived variables are activated (#4200) Co-authored-by: Greg Eisenhauer (cherry picked from commit 8cd2d9481997a463e21d625f9f77abb343d69523) --- source/adios2/toolkit/derived/Function.cpp | 4 ++++ source/adios2/toolkit/derived/Function.h | 5 +---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/source/adios2/toolkit/derived/Function.cpp b/source/adios2/toolkit/derived/Function.cpp index da64e37f60..7cb032f750 100644 --- a/source/adios2/toolkit/derived/Function.cpp +++ b/source/adios2/toolkit/derived/Function.cpp @@ -12,6 +12,10 @@ namespace adios2 { namespace derived { +std::map OpFunctions = { + {adios2::detail::ExpressionOperator::OP_ADD, {AddFunc, SameDimsFunc}}, + {adios2::detail::ExpressionOperator::OP_CURL, {Curl3DFunc, CurlDimsFunc}}, + {adios2::detail::ExpressionOperator::OP_MAGN, {MagnitudeFunc, SameDimsFunc}}}; DerivedData AddFunc(std::vector inputData, DataType type) { diff --git a/source/adios2/toolkit/derived/Function.h b/source/adios2/toolkit/derived/Function.h index d41aab6581..7554916851 100644 --- a/source/adios2/toolkit/derived/Function.h +++ b/source/adios2/toolkit/derived/Function.h @@ -34,10 +34,7 @@ T linear_interp(T *data, size_t index, size_t count, size_t stride = 1); Dims SameDimsFunc(std::vector input); Dims CurlDimsFunc(std::vector input); -const std::map OpFunctions = { - {adios2::detail::ExpressionOperator::OP_ADD, {AddFunc, SameDimsFunc}}, - {adios2::detail::ExpressionOperator::OP_CURL, {Curl3DFunc, CurlDimsFunc}}, - {adios2::detail::ExpressionOperator::OP_MAGN, {MagnitudeFunc, SameDimsFunc}}}; +extern std::map OpFunctions; template T *ApplyOneToOne(std::vector inputData, size_t dataSize,