Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
xerus
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
40
Issues
40
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
xerus
xerus
Commits
14095cf9
Commit
14095cf9
authored
May 11, 2017
by
Ben Huber
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed compilation of the python wrapper
parent
7fab3b64
Pipeline
#715
passed with stages
in 8 minutes and 8 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
1 deletion
+7
-1
doc/optimization.md
doc/optimization.md
+6
-0
src/xerus/python/python.cpp
src/xerus/python/python.cpp
+1
-1
No files found.
doc/optimization.md
View file @
14095cf9
...
...
@@ -15,6 +15,12 @@ functions, but once you have established, that your code works as expected you m
used by your project with one compiled with the
`-D XERUS_DISABLE_RUNTIME_CHECKS`
flag.
## Use c++ instead of Python
The interface between the languages python and c++ makes it necessary to perform operations for the sole purpose of compatibility
between the otherwise incompatible languages. Often this includes copies of vectors of integers (whenever dimensions are specified
or queried) and sometimes even deep copies of whole tensors (
`.from_ndarray()`
and
`.to_ndarray()`
). The only way to get rid of
this overhead is to write your appliation in c++ instead of python. Most instructions that
`xerus`
offers for python look very
similar in c++, so a transition might be simpler than you think. Simply check out the rest of the tutorials to compare the code
snippets.
## Compiling Xerus with High Optimizations
Per default the library already compiles with high optimization settings (corresponding basically to
`-O3`
) as there is rarely
...
...
src/xerus/python/python.cpp
View file @
14095cf9
...
...
@@ -487,7 +487,7 @@ BOOST_PYTHON_MODULE(xerus) {
"value : int"
)
.
def
(
"remove_slate"
,
&
Tensor
::
remove_slate
,
(
(
arg
(
"mode"
),
arg
(
"pos"
)),
(
arg
(
"mode"
),
arg
(
"pos"
)),
"Removes a single slate from the Tensor, reducing dimension[mode] by one."
parametersDocstr
"mode : int
\n
"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment