Skip to content
Snippets Groups Projects
Commit ab902aea authored by Houssem ROUIS's avatar Houssem ROUIS Committed by Maxence Naud
Browse files

add python binding for ArithmeticOperator

parent c328e30f
No related branches found
No related tags found
2 merge requests!105version 0.2.0,!65[Add] broadcasting for Arithmetic Operators
/********************************************************************************
* Copyright (c) 2024 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 <pybind11/pybind11.h>
#include "aidge/backend/OperatorImpl.hpp"
#include "aidge/operator/ArithmeticOperator.hpp"
#include "aidge/operator/Operator.hpp"
#include <pybind11/stl.h>
namespace py = pybind11;
namespace Aidge {
void init_ArithmeticOperator(py::module& m){
py::class_<ArithmeticOperator, std::shared_ptr<ArithmeticOperator>, Operator>(m, "ArithmeticOperator")
.def("get_output", &ArithmeticOperator::getOutput, py::arg("outputIdx"))
.def("get_input", &ArithmeticOperator::getInput, py::arg("inputIdx"))
.def("output_dims_forwarded", &ArithmeticOperator::outputDimsForwarded)
;
}
}
......@@ -17,6 +17,7 @@ namespace Aidge {
void init_Data(py::module&);
void init_Tensor(py::module&);
void init_OperatorImpl(py::module&);
void init_ArithmeticOperator(py::module&);
void init_Attributes(py::module&);
void init_Operator(py::module&);
void init_OperatorTensor(py::module&);
......@@ -73,6 +74,7 @@ void init_Aidge(py::module& m){
init_OpArgs(m);
init_Connector(m);
init_ArithmeticOperator(m);
init_OperatorImpl(m);
init_Attributes(m);
init_Operator(m);
......
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