Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boxiang Sun
cython
Commits
21ffc32a
Commit
21ffc32a
authored
Dec 04, 2018
by
Boxiang Sun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update test.pyx
parent
41521d00
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
test.pyx
test.pyx
+3
-3
No files found.
test.pyx
View file @
21ffc32a
...
...
@@ -55,7 +55,7 @@ cdef class SomeMemory nogil:
"""
self
.
a
=
self
.
b
cdef
void
foo1
(
self
,
int
a
)
nogil
:
cdef
void
foo1
(
self
,
double
a
)
nogil
:
"""
It is possible to define native C/Cython methods
that release the GIL (cool...)
...
...
@@ -79,7 +79,7 @@ cdef class SomeMemory nogil:
# cdef bar(): # it is currently impossible to release GIL
cdef
int
bar
()
nogil
:
# yet this is what we would like to
cdef
double
bar
()
nogil
:
# yet this is what we would like to
"""
This is a pure "cython method" which we would like to
be able to declare with nogil option but this requires
...
...
@@ -88,7 +88,7 @@ cdef int bar() nogil: # yet this is what we would like to
cdef
SomeMemory
o
=
SomeMemory
(
42.0
,
3.14
)
# for this we need class allocation to handle memory without libpython
o
.
foo
()
# and we need method selection to be independent of libpython
o
.
foo1
(
2
)
o
.
a
=
1.0
o
.
a
=
2.732
return
o
.
a
cpdef
baz
():
...
...
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