Skip to content
Snippets Groups Projects
Commit 41ce4bd7 authored by Grégoire Kubler's avatar Grégoire Kubler
Browse files

fix: missing arg in OperatorImpl call & format

parent 4c8346ef
No related branches found
No related tags found
2 merge requests!50version 0.2.0,!42feat/operator_globalAveragePooling
......@@ -20,37 +20,36 @@
#include "aidge/utils/Registrar.hpp"
#include "aidge/utils/Types.h"
namespace Aidge
{
// class GlobalAveragePooling_Op;
class GlobalAveragePoolingImplForward_cpu
: public Registrable<GlobalAveragePoolingImplForward_cpu, std::tuple<DataType, DataType>, void(const std::vector<DimSize_t> &, const void *, void *)>
{
};
class GlobalAveragePoolingImplBackward_cpu
: public Registrable<GlobalAveragePoolingImplBackward_cpu, std::tuple<DataType, DataType>, void(const std::vector<DimSize_t> &, const void *, void *)>
{
};
// Then we declare the Impl class for the operator
class GlobalAveragePoolingImpl_cpu : public OperatorImpl
{
public:
GlobalAveragePoolingImpl_cpu(const GlobalAveragePooling_Op &op) : OperatorImpl(op) {}
static std::unique_ptr<GlobalAveragePoolingImpl_cpu> create(const GlobalAveragePooling_Op &op)
{
return std::make_unique<GlobalAveragePoolingImpl_cpu>(op);
}
void forward() override;
};
// Finally we create the Registrar for the operator implementation in which we specify the backend cpu
namespace
{
static Registrar<GlobalAveragePooling_Op> registrarGlobalAveragePoolingImpl_cpu("cpu", Aidge::GlobalAveragePoolingImpl_cpu::create);
}
namespace Aidge {
// class GlobalAveragePooling_Op;
class GlobalAveragePoolingImplForward_cpu
: public Registrable<
GlobalAveragePoolingImplForward_cpu, std::tuple<DataType, DataType>,
void(const std::vector<DimSize_t> &, const void *, void *)> {};
class GlobalAveragePoolingImplBackward_cpu
: public Registrable<
GlobalAveragePoolingImplBackward_cpu, std::tuple<DataType, DataType>,
void(const std::vector<DimSize_t> &, const void *, void *)> {};
class GlobalAveragePoolingImpl_cpu : public OperatorImpl {
public:
GlobalAveragePoolingImpl_cpu(const GlobalAveragePooling_Op &op)
: OperatorImpl(op, "cpu") {}
static std::unique_ptr<GlobalAveragePoolingImpl_cpu>
create(const GlobalAveragePooling_Op &op) {
return std::make_unique<GlobalAveragePoolingImpl_cpu>(op);
}
void forward() override;
};
namespace {
static Registrar<GlobalAveragePooling_Op> registrarGlobalAveragePoolingImpl_cpu(
"cpu", Aidge::GlobalAveragePoolingImpl_cpu::create);
}
} // namespace Aidge
#endif /* _AIDGE_CPU_OPERATOR_GLOBALAVERAGEPOOLINGIMPL_H_ */
\ No newline at end of file
#endif /* _AIDGE_CPU_OPERATOR_GLOBALAVERAGEPOOLINGIMPL_H_ */
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