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 @@ ...@@ -20,37 +20,36 @@
#include "aidge/utils/Registrar.hpp" #include "aidge/utils/Registrar.hpp"
#include "aidge/utils/Types.h" #include "aidge/utils/Types.h"
namespace Aidge namespace Aidge {
{ // class GlobalAveragePooling_Op;
// class GlobalAveragePooling_Op;
class GlobalAveragePoolingImplForward_cpu
class GlobalAveragePoolingImplForward_cpu : public Registrable<
: public Registrable<GlobalAveragePoolingImplForward_cpu, std::tuple<DataType, DataType>, void(const std::vector<DimSize_t> &, const void *, void *)> GlobalAveragePoolingImplForward_cpu, std::tuple<DataType, DataType>,
{ void(const std::vector<DimSize_t> &, const void *, void *)> {};
};
class GlobalAveragePoolingImplBackward_cpu class GlobalAveragePoolingImplBackward_cpu
: public Registrable<GlobalAveragePoolingImplBackward_cpu, std::tuple<DataType, DataType>, void(const std::vector<DimSize_t> &, const void *, void *)> : 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 class GlobalAveragePoolingImpl_cpu : public OperatorImpl {
{ public:
public: GlobalAveragePoolingImpl_cpu(const GlobalAveragePooling_Op &op)
GlobalAveragePoolingImpl_cpu(const GlobalAveragePooling_Op &op) : OperatorImpl(op) {} : OperatorImpl(op, "cpu") {}
static std::unique_ptr<GlobalAveragePoolingImpl_cpu> create(const GlobalAveragePooling_Op &op) static std::unique_ptr<GlobalAveragePoolingImpl_cpu>
{ create(const GlobalAveragePooling_Op &op) {
return std::make_unique<GlobalAveragePoolingImpl_cpu>(op); return std::make_unique<GlobalAveragePoolingImpl_cpu>(op);
} }
void forward() override; void forward() override;
}; };
// Finally we create the Registrar for the operator implementation in which we specify the backend cpu namespace {
namespace static Registrar<GlobalAveragePooling_Op> registrarGlobalAveragePoolingImpl_cpu(
{ "cpu", Aidge::GlobalAveragePoolingImpl_cpu::create);
static Registrar<GlobalAveragePooling_Op> registrarGlobalAveragePoolingImpl_cpu("cpu", Aidge::GlobalAveragePoolingImpl_cpu::create); }
}
} // namespace Aidge } // namespace Aidge
#endif /* _AIDGE_CPU_OPERATOR_GLOBALAVERAGEPOOLINGIMPL_H_ */ #endif /* _AIDGE_CPU_OPERATOR_GLOBALAVERAGEPOOLINGIMPL_H_ */
\ No newline at end of file
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