Skip to content
Snippets Groups Projects

Draft: Change ReduceMean attribute 'axes' from static array to dynamic vector

Closed Grégoire Kubler requested to merge (removed):feat/operator_squeeze_unsqueeze into master
Files
6
/********************************************************************************
* 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
*
********************************************************************************/
#ifndef AIDGE_CPU_OPERATOR_UNSQUEEZEIMPL_H_
#define AIDGE_CPU_OPERATOR_UNSQUEEZEIMPL_H_
#include <memory>
#include <vector>
#include "aidge/backend/OperatorImpl.hpp"
#include "aidge/operator/Unsqueeze.hpp"
#include "aidge/utils/Registrar.hpp"
#include "aidge/utils/Types.h"
namespace Aidge {
// class Unsqueeze_Op;
class UnsqueezeImplForward_cpu
: public Registrable<
UnsqueezeImplForward_cpu, std::tuple<DataType, DataType>,
void(const Unsqueeze_Op::Attrs &, const std::vector<DimSize_t> &,
const void *, void *)> {};
class UnsqueezeImplBackward_cpu
: public Registrable<
UnsqueezeImplBackward_cpu, std::tuple<DataType, DataType>,
void(const Unsqueeze_Op::Attrs &, const std::vector<DimSize_t> &,
const void *, void *)> {};
class UnsqueezeImpl_cpu : public OperatorImpl {
public:
UnsqueezeImpl_cpu(const Unsqueeze_Op &op) : OperatorImpl(op, "cpu") {}
static std::unique_ptr<UnsqueezeImpl_cpu> create(const Unsqueeze_Op &op) {
return std::make_unique<UnsqueezeImpl_cpu>(op);
}
void forward() override;
};
namespace {
static Registrar<Unsqueeze_Op>
registrarUnsqueezeImpl_cpu("cpu", Aidge::UnsqueezeImpl_cpu::create);
}
} // namespace Aidge
#endif /* _AIDGE_CPU_OPERATOR_UNSQUEEZEIMPL_H_ */
Loading