Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
tnl-dev
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Model registry
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
TNL
tnl-dev
Commits
2f43de15
There was an error fetching the commit references. Please try again later.
Commit
2f43de15
authored
5 years ago
by
Jakub Klinkovský
Committed by
Tomáš Oberhuber
5 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Fixed Python bindings for StaticVector
parent
322770e9
No related branches found
No related tags found
1 merge request
!32
Expression templates 2
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/Python/pytnl/tnl/StaticVector.h
+8
-7
8 additions, 7 deletions
src/Python/pytnl/tnl/StaticVector.h
src/TNL/Containers/StaticVectorExpressions.h
+135
-134
135 additions, 134 deletions
src/TNL/Containers/StaticVectorExpressions.h
with
143 additions
and
141 deletions
src/Python/pytnl/tnl/StaticVector.h
+
8
−
7
View file @
2f43de15
...
@@ -6,20 +6,20 @@ namespace py = pybind11;
...
@@ -6,20 +6,20 @@ namespace py = pybind11;
#include
"../tnl_indexing.h"
#include
"../tnl_indexing.h"
// needed for discovery of operator<< for tnlStaticArray
#include
<TNL/Containers/StaticArray.h>
template
<
typename
VectorType
,
typename
Scope
>
template
<
typename
VectorType
,
typename
Scope
>
void
export_StaticVector
(
Scope
&
scope
,
const
char
*
name
)
void
export_StaticVector
(
Scope
&
scope
,
const
char
*
name
)
{
{
using
RealType
=
typename
VectorType
::
RealType
;
using
RealType
=
typename
VectorType
::
RealType
;
auto
vector
=
py
::
class_
<
VectorType
>
(
scope
,
name
)
auto
vector
=
py
::
class_
<
VectorType
>
(
scope
,
name
)
.
def
(
py
::
init
<
typename
VectorType
::
RealType
>
())
.
def
(
py
::
init
<
RealType
>
())
.
def
(
py
::
init
<
VectorType
>
())
.
def
(
py
::
init
<
VectorType
>
())
.
def_static
(
"getType"
,
&
VectorType
::
getType
)
.
def_static
(
"getType"
,
&
VectorType
::
getType
)
.
def
(
"getSize"
,
&
VectorType
::
getSize
)
.
def
(
"getSize"
,
&
VectorType
::
getSize
)
.
def
(
"assign"
,
&
VectorType
::
operator
=
)
// operator=
.
def
(
"assign"
,
[](
VectorType
&
vector
,
const
VectorType
&
other
)
->
VectorType
&
{
return
vector
=
other
;
})
.
def
(
py
::
self
==
py
::
self
)
.
def
(
py
::
self
==
py
::
self
)
.
def
(
py
::
self
!=
py
::
self
)
.
def
(
py
::
self
!=
py
::
self
)
.
def
(
"setValue"
,
&
VectorType
::
setValue
)
.
def
(
"setValue"
,
&
VectorType
::
setValue
)
...
@@ -28,10 +28,11 @@ void export_StaticVector( Scope & scope, const char* name )
...
@@ -28,10 +28,11 @@ void export_StaticVector( Scope & scope, const char* name )
// .def(py::self_ns::str(py::self))
// .def(py::self_ns::str(py::self))
.
def
(
py
::
self
+=
py
::
self
)
.
def
(
py
::
self
+=
py
::
self
)
.
def
(
py
::
self
-=
py
::
self
)
.
def
(
py
::
self
-=
py
::
self
)
.
def
(
py
::
self
*=
typename
VectorType
::
RealType
())
.
def
(
py
::
self
*=
RealType
())
.
def
(
py
::
self
/=
RealType
())
.
def
(
py
::
self
+
py
::
self
)
.
def
(
py
::
self
+
py
::
self
)
.
def
(
py
::
self
-
py
::
self
)
.
def
(
py
::
self
-
py
::
self
)
.
def
(
py
::
self
*
typename
VectorType
::
RealType
())
.
def
(
py
::
self
*
RealType
())
.
def
(
py
::
self
*
py
::
self
)
.
def
(
py
::
self
*
py
::
self
)
.
def
(
py
::
self
<
py
::
self
)
.
def
(
py
::
self
<
py
::
self
)
.
def
(
py
::
self
>
py
::
self
)
.
def
(
py
::
self
>
py
::
self
)
...
...
This diff is collapsed.
Click to expand it.
src/TNL/Containers/StaticVectorExpressions.h
+
135
−
134
View file @
2f43de15
This diff is collapsed.
Click to expand it.
Jakub Klinkovský
@klinkovsky
mentioned in issue
#34 (closed)
·
5 years ago
mentioned in issue
#34 (closed)
mentioned in issue #34
Toggle commit list
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