Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
amfe
Manage
Activity
Members
Labels
Plan
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Aerospace and Mechanical Engineering
amfe
Commits
c11ff6ee
Commit
c11ff6ee
authored
5 months ago
by
Adrien Crovato
Browse files
Options
Downloads
Plain Diff
Merge remote-tracking branch 'origin/master' into adri
parents
fd05e80c
88d1502e
No related branches found
No related tags found
1 merge request
!11
amfe v1.0.7
Pipeline
#50474
passed
4 months ago
Changes
4
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
fwk/_src/fwkw.i
+5
-0
5 additions, 0 deletions
fwk/_src/fwkw.i
run.py
+0
-0
0 additions, 0 deletions
run.py
tbox/_src/tboxw.i
+0
-1
0 additions, 1 deletion
tbox/_src/tboxw.i
tbox/tests/stdvec.py
+38
-0
38 additions, 0 deletions
tbox/tests/stdvec.py
with
43 additions
and
1 deletion
fwk/_src/fwkw.i
+
5
−
0
View file @
c11ff6ee
...
@@ -43,6 +43,11 @@ threads="1"
...
@@ -43,6 +43,11 @@ threads="1"
%
include
"
fwkw.swg
"
%
include
"
fwkw.swg
"
// Instantiate some std templates
namespace
std
{
%template(std_vector_double) std::vector<double>;
}
%
include
"
fwk.h
"
%
include
"
fwk.h
"
//%#define SHARED_PTR_DISOWN $disown
//%#define SHARED_PTR_DISOWN $disown
...
...
This diff is collapsed.
Click to expand it.
run.py
100644 → 100755
+
0
−
0
View file @
c11ff6ee
File mode changed from 100644 to 100755
This diff is collapsed.
Click to expand it.
tbox/_src/tboxw.i
+
0
−
1
View file @
c11ff6ee
...
@@ -59,7 +59,6 @@ threads="1"
...
@@ -59,7 +59,6 @@ threads="1"
// Instantiate some std templates
// Instantiate some std templates
namespace
std
{
namespace
std
{
%template(std_vector_int) std::vector<int>;
%template(std_vector_int) std::vector<int>;
%template(std_vector_double) std::vector<double>;
%template(std_vector_vector_double) std::vector<std::vector<double>>;
%template(std_vector_vector_double) std::vector<std::vector<double>>;
%template(std_vector_string) std::vector<std::string>;
%template(std_vector_string) std::vector<std::string>;
}
}
...
...
This diff is collapsed.
Click to expand it.
tbox/tests/stdvec.py
0 → 100644
+
38
−
0
View file @
c11ff6ee
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Copyright 2020 University of Liège
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# basic test of std::vector<double> binding
# note:
# std_vector_double was defined in tbox.i, but now it is now defined in fwk.i.
# This is because std::vector<double> is a type seen by swig in fwk.
# In version <4.2.0, swig was able to understand that std::vector<double> in fwk
# was the same as std::vector<double> in tbox where the bindings were
# instanciated by the %template command. From 4.2.0, swig fails to understand
# that link and the __setitem__ generates cast failure.
import
fwk
v
=
fwk
.
std_vector_double
()
v
.
push_back
(
1.0
)
v
.
push_back
(
2.0
)
# next command fails with swig >4.2.0 if std_vector_double is
# instanciated (%template) in tbox.i:
print
(
'
v[0] =
'
,
v
[
0
])
v
[
1
]
=
3.0
print
(
'
vector length =
'
,
v
.
size
())
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