Skip to content
Snippets Groups Projects
Commit 152cd114 authored by Houssem ROUIS's avatar Houssem ROUIS
Browse files

minor cleanups

parent 878de316
No related branches found
No related tags found
2 merge requests!59Improvements and fixes,!47Vit operators
......@@ -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) {}
......
......@@ -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;
......
......@@ -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;
......
......@@ -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 {
......
/********************************************************************************
* 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
......@@ -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)) {
......
/********************************************************************************
* 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
......@@ -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() {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment