diff --git a/include/aidge/operator/Erf.hpp b/include/aidge/operator/Erf.hpp index a0db65d45f6e1522a946f2ce6d5cb9d3b36d2dfa..6395756f3b08c5838d390ab45d38fa9c03cb91cb 100644 --- a/include/aidge/operator/Erf.hpp +++ b/include/aidge/operator/Erf.hpp @@ -29,7 +29,7 @@ namespace Aidge { class Erf_Op : public OperatorTensor, public Registrable<Erf_Op, std::string, std::unique_ptr<OperatorImpl>(const Erf_Op&)> { public: - static constexpr const char* Type = "Erf"; + static const std::string Type; Erf_Op() : OperatorTensor(Type, 1, 0, 1) {} diff --git a/include/aidge/operator/Gather.hpp b/include/aidge/operator/Gather.hpp index ba7d745faf3322a9bd870ee9ae3d78198a2e8a54..f8276222811f6cc02c062d85e7ae99d72edead7a 100644 --- a/include/aidge/operator/Gather.hpp +++ b/include/aidge/operator/Gather.hpp @@ -36,7 +36,7 @@ class Gather_Op : public OperatorTensor, public StaticAttributes<GatherAttr, int> { public: - static constexpr const char* Type = "Gather"; + static const std::string Type; Gather_Op() = delete; diff --git a/include/aidge/operator/ReduceMean.hpp b/include/aidge/operator/ReduceMean.hpp index 8d3ed2f7117e7f375471f7c3f0cbe95555640a84..f217df0aec657f6278ff82b747bd198686a54236 100644 --- a/include/aidge/operator/ReduceMean.hpp +++ b/include/aidge/operator/ReduceMean.hpp @@ -34,7 +34,7 @@ class ReduceMean_Op : public OperatorTensor, public StaticAttributes<ReduceMeanAttr, std::array<int, DIM>, DimSize_t> { public: - static constexpr const char *Type = "ReduceMean"; + static const std::string Type; ReduceMean_Op() = delete; diff --git a/include/aidge/operator/Transpose.hpp b/include/aidge/operator/Transpose.hpp index 8bf5f17ab7f81429245ef2f799217a407bad4fea..f111be76cd712265e92e2e4c3e0220f79e13b1f7 100644 --- a/include/aidge/operator/Transpose.hpp +++ b/include/aidge/operator/Transpose.hpp @@ -35,7 +35,7 @@ class Transpose_Op : public OperatorTensor, std::array<DimSize_t, DIM>> { public: - static constexpr const char *Type = "Transpose"; + static const std::string Type; Transpose_Op() = delete; @@ -111,6 +111,10 @@ inline std::shared_ptr<Node> Transpose( static_assert(DIM<=MaxDim,"Too many kernel dimensions required by Transpose, not supported"); return Transpose(to_array(output_dims_order), name); } + +template <DimIdx_t DIM> +const std::string Transpose_Op<DIM>::Type = "Transpose"; + } // namespace Aidge namespace { diff --git a/src/operator/Erf.cpp b/src/operator/Erf.cpp new file mode 100644 index 0000000000000000000000000000000000000000..387af4edf417f8c7ac6ee9b8b2b7069179ad59cb --- /dev/null +++ b/src/operator/Erf.cpp @@ -0,0 +1,16 @@ +/******************************************************************************** + * Copyright (c) 2023 CEA-List + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License 2.0 which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * SPDX-License-Identifier: EPL-2.0 + * + ********************************************************************************/ + +#include <string> + +#include "aidge/operator/Erf.hpp" + +const std::string Aidge::Erf_Op::Type = "Erf"; \ No newline at end of file diff --git a/src/operator/Gather.cpp b/src/operator/Gather.cpp index 26a334bb0be0abf1200aa2c502beb86301db8698..30804994b6084a5a5558f106a38a6087e54471bc 100644 --- a/src/operator/Gather.cpp +++ b/src/operator/Gather.cpp @@ -11,14 +11,15 @@ #include <cassert> #include <cstddef> +#include <string> #include <vector> -#include <utility> -#include "aidge/backend/OperatorImpl.hpp" #include "aidge/operator/Gather.hpp" #include "aidge/utils/Types.h" #include "aidge/utils/ErrorHandling.hpp" +const std::string Aidge::Gather_Op::Type = "Gather"; + void Aidge::Gather_Op::computeOutputDims() { // check inputs have been associated if (!getInput(0) || !getInput(1)) { diff --git a/src/operator/ReduceMean.cpp b/src/operator/ReduceMean.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4460863a6660818923a9f4857c9ccfedc7a8a23f --- /dev/null +++ b/src/operator/ReduceMean.cpp @@ -0,0 +1,16 @@ +/******************************************************************************** + * Copyright (c) 2023 CEA-List + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License 2.0 which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * SPDX-License-Identifier: EPL-2.0 + * + ********************************************************************************/ + +#include <string> + +#include "aidge/operator/ReduceMean.hpp" + +const std::string Aidge::ReduceMean_Op::Type = "ReduceMean"; \ No newline at end of file diff --git a/src/operator/Reshape.cpp b/src/operator/Reshape.cpp index 2464d37a881747b703b76fa3cc617cf30297d483..b0eea3c1f9f7054021b631c85e0f80e7f8845da6 100644 --- a/src/operator/Reshape.cpp +++ b/src/operator/Reshape.cpp @@ -9,18 +9,14 @@ * ********************************************************************************/ -#include <cassert> #include <cstddef> #include <string> #include <vector> -#include <utility> -#include "aidge/backend/OperatorImpl.hpp" #include "aidge/operator/Reshape.hpp" #include "aidge/utils/Types.h" #include "aidge/utils/ErrorHandling.hpp" - const std::string Aidge::Reshape_Op::Type = "Reshape"; void Aidge::Reshape_Op::computeOutputDims() {