Forked from
Eclipse Projects / aidge / aidge_backend_cpu
783 commits behind the upstream repository.
-
laurent soulier authored
[fix/rawPtr][MIN][DSGN] encapsulating raw pointer access into an helper function in order to make it easier to change implementation related to aidge_core#21 and related to aidge_core!41 (which will get easier to merge threafter)
laurent soulier authored[fix/rawPtr][MIN][DSGN] encapsulating raw pointer access into an helper function in order to make it easier to change implementation related to aidge_core#21 and related to aidge_core!41 (which will get easier to merge threafter)
Code owners
Assign users and groups as approvers for specific file changes. Learn more.
ScalingImpl.hpp 1.73 KiB
/********************************************************************************
* 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_ScalingIMPL_H__
#define __AIDGE_CPU_OPERATOR_ScalingIMPL_H__
#include "aidge/backend/OperatorImpl.hpp"
#include "aidge/operator/Scaling.hpp"
#include "aidge/utils/Registrar.hpp"
#include "aidge/utils/Types.h"
#include "aidge/backend/cpu/data/GetCPUPtr.h"
#include <memory>
#include <vector>
#include <array>
namespace Aidge {
// class Scaling_Op;
// compute kernel registry for forward and backward
class ScalingImplForward_cpu
: public Registrable<ScalingImplForward_cpu, std::tuple<DataType, DataType>, void(const Scaling_Op::Attrs&, std::size_t, const void*, void*)> {
};
class ScalingImplBackward_cpu
: public Registrable<ScalingImplBackward_cpu, std::tuple<DataType, DataType>, void(const Scaling_Op::Attrs&, std::size_t, const void*, void*)> {
};
class ScalingImpl_cpu : public OperatorImpl {
public:
ScalingImpl_cpu(const Scaling_Op& op) : OperatorImpl(op) {}
static std::unique_ptr<ScalingImpl_cpu> create(const Scaling_Op& op) {
return std::make_unique<ScalingImpl_cpu>(op);
}
NbElts_t getNbRequiredProtected(const IOIndex_t inputIdx) const override final;
void forward() override;
};
namespace {
static Registrar<Scaling_Op> registrarScalingImpl_cpu("cpu", Aidge::ScalingImpl_cpu::create);
}
} // namespace Aidge
#endif /* __AIDGE_CPU_OPERATOR_ScalingIMPL_H__ */