Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
aidge_core
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Eclipse Projects
aidge
aidge_core
Commits
a2e77c3a
Commit
a2e77c3a
authored
1 year ago
by
Houssem ROUIS
Browse files
Options
Downloads
Patches
Plain Diff
add python binding for ArithmeticOperator
parent
14995ee6
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
python_binding/operator/pybind_ArithmeticOperator.cpp
+27
-0
27 additions, 0 deletions
python_binding/operator/pybind_ArithmeticOperator.cpp
python_binding/pybind_core.cpp
+2
-0
2 additions, 0 deletions
python_binding/pybind_core.cpp
with
29 additions
and
0 deletions
python_binding/operator/pybind_ArithmeticOperator.cpp
0 → 100644
+
27
−
0
View file @
a2e77c3a
/********************************************************************************
* 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
)
;
}
}
This diff is collapsed.
Click to expand it.
python_binding/pybind_core.cpp
+
2
−
0
View file @
a2e77c3a
...
@@ -17,6 +17,7 @@ namespace Aidge {
...
@@ -17,6 +17,7 @@ namespace Aidge {
void
init_Data
(
py
::
module
&
);
void
init_Data
(
py
::
module
&
);
void
init_Tensor
(
py
::
module
&
);
void
init_Tensor
(
py
::
module
&
);
void
init_OperatorImpl
(
py
::
module
&
);
void
init_OperatorImpl
(
py
::
module
&
);
void
init_ArithmeticOperator
(
py
::
module
&
);
void
init_Attributes
(
py
::
module
&
);
void
init_Attributes
(
py
::
module
&
);
void
init_Operator
(
py
::
module
&
);
void
init_Operator
(
py
::
module
&
);
void
init_OperatorTensor
(
py
::
module
&
);
void
init_OperatorTensor
(
py
::
module
&
);
...
@@ -73,6 +74,7 @@ void init_Aidge(py::module& m){
...
@@ -73,6 +74,7 @@ void init_Aidge(py::module& m){
init_OpArgs
(
m
);
init_OpArgs
(
m
);
init_Connector
(
m
);
init_Connector
(
m
);
init_ArithmeticOperator
(
m
);
init_OperatorImpl
(
m
);
init_OperatorImpl
(
m
);
init_Attributes
(
m
);
init_Attributes
(
m
);
init_Operator
(
m
);
init_Operator
(
m
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment