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
Gwenaël Samain
cython
Commits
c95fe868
Commit
c95fe868
authored
Oct 15, 2011
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
more typing and finalisation in richerds benchmark
parent
c322df92
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
7 deletions
+12
-7
Demos/benchmarks/richards.pxd
Demos/benchmarks/richards.pxd
+12
-7
No files found.
Demos/benchmarks/richards.pxd
View file @
c95fe868
cimport
cython
@
cython
.
final
cdef
class
Packet
:
cdef
public
object
link
cdef
public
object
ident
...
...
@@ -12,20 +13,24 @@ cdef class Packet:
cdef
class
TaskRec
:
pass
@
cython
.
final
cdef
class
DeviceTaskRec
(
TaskRec
):
cdef
public
object
pending
@
cython
.
final
cdef
class
IdleTaskRec
(
TaskRec
):
cdef
public
long
control
cdef
public
Py_ssize_t
count
@
cython
.
final
cdef
class
HandlerTaskRec
(
TaskRec
):
cdef
public
object
work_in
# = None
cdef
public
object
device_in
# = None
cpdef
workInAdd
(
self
,
p
)
cpdef
deviceInAdd
(
self
,
p
)
cpdef
workInAdd
(
self
,
Packet
p
)
cpdef
deviceInAdd
(
self
,
Packet
p
)
@
cython
.
final
cdef
class
WorkerTaskRec
(
TaskRec
):
cdef
public
object
destination
# = I_HANDLERA
cdef
public
Py_ssize_t
count
...
...
@@ -60,7 +65,7 @@ cdef class Task(TaskState):
cdef
public
object
input
# = w
cdef
public
object
handle
# = r
cpdef
addPacket
(
self
,
Packet
p
,
old
)
cpdef
addPacket
(
self
,
Packet
p
,
Task
old
)
cpdef
runTask
(
self
)
cpdef
waitTask
(
self
)
cpdef
hold
(
self
)
...
...
@@ -70,19 +75,19 @@ cdef class Task(TaskState):
cdef
class
DeviceTask
(
Task
):
@
cython
.
locals
(
d
=
DeviceTaskRec
)
cpdef
fn
(
self
,
Packet
pkt
,
r
)
cpdef
fn
(
self
,
Packet
pkt
,
DeviceTaskRec
r
)
cdef
class
HandlerTask
(
Task
):
@
cython
.
locals
(
h
=
HandlerTaskRec
)
cpdef
fn
(
self
,
Packet
pkt
,
r
)
cpdef
fn
(
self
,
Packet
pkt
,
HandlerTaskRec
r
)
cdef
class
IdleTask
(
Task
):
@
cython
.
locals
(
i
=
IdleTaskRec
)
cpdef
fn
(
self
,
Packet
pkt
,
r
)
cpdef
fn
(
self
,
Packet
pkt
,
IdleTaskRec
r
)
cdef
class
WorkTask
(
Task
):
@
cython
.
locals
(
w
=
WorkerTaskRec
)
cpdef
fn
(
self
,
Packet
pkt
,
r
)
cpdef
fn
(
self
,
Packet
pkt
,
WorkerTaskRec
r
)
@
cython
.
locals
(
t
=
Task
)
cpdef
schedule
()
...
...
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