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
Labels
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
nexedi
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
cimport
cython
@
cython
.
final
cdef
class
Packet
:
cdef
class
Packet
:
cdef
public
object
link
cdef
public
object
link
cdef
public
object
ident
cdef
public
object
ident
...
@@ -12,20 +13,24 @@ cdef class Packet:
...
@@ -12,20 +13,24 @@ cdef class Packet:
cdef
class
TaskRec
:
cdef
class
TaskRec
:
pass
pass
@
cython
.
final
cdef
class
DeviceTaskRec
(
TaskRec
):
cdef
class
DeviceTaskRec
(
TaskRec
):
cdef
public
object
pending
cdef
public
object
pending
@
cython
.
final
cdef
class
IdleTaskRec
(
TaskRec
):
cdef
class
IdleTaskRec
(
TaskRec
):
cdef
public
long
control
cdef
public
long
control
cdef
public
Py_ssize_t
count
cdef
public
Py_ssize_t
count
@
cython
.
final
cdef
class
HandlerTaskRec
(
TaskRec
):
cdef
class
HandlerTaskRec
(
TaskRec
):
cdef
public
object
work_in
# = None
cdef
public
object
work_in
# = None
cdef
public
object
device_in
# = None
cdef
public
object
device_in
# = None
cpdef
workInAdd
(
self
,
p
)
cpdef
workInAdd
(
self
,
Packet
p
)
cpdef
deviceInAdd
(
self
,
p
)
cpdef
deviceInAdd
(
self
,
Packet
p
)
@
cython
.
final
cdef
class
WorkerTaskRec
(
TaskRec
):
cdef
class
WorkerTaskRec
(
TaskRec
):
cdef
public
object
destination
# = I_HANDLERA
cdef
public
object
destination
# = I_HANDLERA
cdef
public
Py_ssize_t
count
cdef
public
Py_ssize_t
count
...
@@ -60,7 +65,7 @@ cdef class Task(TaskState):
...
@@ -60,7 +65,7 @@ cdef class Task(TaskState):
cdef
public
object
input
# = w
cdef
public
object
input
# = w
cdef
public
object
handle
# = r
cdef
public
object
handle
# = r
cpdef
addPacket
(
self
,
Packet
p
,
old
)
cpdef
addPacket
(
self
,
Packet
p
,
Task
old
)
cpdef
runTask
(
self
)
cpdef
runTask
(
self
)
cpdef
waitTask
(
self
)
cpdef
waitTask
(
self
)
cpdef
hold
(
self
)
cpdef
hold
(
self
)
...
@@ -70,19 +75,19 @@ cdef class Task(TaskState):
...
@@ -70,19 +75,19 @@ cdef class Task(TaskState):
cdef
class
DeviceTask
(
Task
):
cdef
class
DeviceTask
(
Task
):
@
cython
.
locals
(
d
=
DeviceTaskRec
)
@
cython
.
locals
(
d
=
DeviceTaskRec
)
cpdef
fn
(
self
,
Packet
pkt
,
r
)
cpdef
fn
(
self
,
Packet
pkt
,
DeviceTaskRec
r
)
cdef
class
HandlerTask
(
Task
):
cdef
class
HandlerTask
(
Task
):
@
cython
.
locals
(
h
=
HandlerTaskRec
)
@
cython
.
locals
(
h
=
HandlerTaskRec
)
cpdef
fn
(
self
,
Packet
pkt
,
r
)
cpdef
fn
(
self
,
Packet
pkt
,
HandlerTaskRec
r
)
cdef
class
IdleTask
(
Task
):
cdef
class
IdleTask
(
Task
):
@
cython
.
locals
(
i
=
IdleTaskRec
)
@
cython
.
locals
(
i
=
IdleTaskRec
)
cpdef
fn
(
self
,
Packet
pkt
,
r
)
cpdef
fn
(
self
,
Packet
pkt
,
IdleTaskRec
r
)
cdef
class
WorkTask
(
Task
):
cdef
class
WorkTask
(
Task
):
@
cython
.
locals
(
w
=
WorkerTaskRec
)
@
cython
.
locals
(
w
=
WorkerTaskRec
)
cpdef
fn
(
self
,
Packet
pkt
,
r
)
cpdef
fn
(
self
,
Packet
pkt
,
WorkerTaskRec
r
)
@
cython
.
locals
(
t
=
Task
)
@
cython
.
locals
(
t
=
Task
)
cpdef
schedule
()
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