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
2e1f162c
Commit
2e1f162c
authored
Jun 22, 2014
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
reduce runtime overhead of fused types dispatch some more
parent
d57a91df
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
Cython/Compiler/FusedNode.py
Cython/Compiler/FusedNode.py
+5
-5
No files found.
Cython/Compiler/FusedNode.py
View file @
2e1f162c
...
...
@@ -295,22 +295,22 @@ class FusedCFuncDefNode(StatListNode):
def
_buffer_check_numpy_dtype_setup_cases
(
self
,
pyx_code
):
"Setup some common cases to match dtypes against specializations"
if
pyx_code
.
indenter
(
"if
dtype.kind in ('i', 'u')
:"
):
if
pyx_code
.
indenter
(
"if
kind in b'iu'
:"
):
pyx_code
.
putln
(
"pass"
)
pyx_code
.
named_insertion_point
(
"dtype_int"
)
pyx_code
.
dedent
()
if
pyx_code
.
indenter
(
"elif
dtype.kind ==
'f':"
):
if
pyx_code
.
indenter
(
"elif
kind == b
'f':"
):
pyx_code
.
putln
(
"pass"
)
pyx_code
.
named_insertion_point
(
"dtype_float"
)
pyx_code
.
dedent
()
if
pyx_code
.
indenter
(
"elif
dtype.kind ==
'c':"
):
if
pyx_code
.
indenter
(
"elif
kind == b
'c':"
):
pyx_code
.
putln
(
"pass"
)
pyx_code
.
named_insertion_point
(
"dtype_complex"
)
pyx_code
.
dedent
()
if
pyx_code
.
indenter
(
"elif
dtype.kind ==
'O':"
):
if
pyx_code
.
indenter
(
"elif
kind == b
'O':"
):
pyx_code
.
putln
(
"pass"
)
pyx_code
.
named_insertion_point
(
"dtype_object"
)
pyx_code
.
dedent
()
...
...
@@ -339,7 +339,7 @@ class FusedCFuncDefNode(StatListNode):
for
dtype_category
,
codewriter
in
dtypes
:
if
dtype_category
:
cond
=
'{{itemsize_match}} and
arg.ndim
== %d'
%
(
cond
=
'{{itemsize_match}} and
(<Py_ssize_t>arg.ndim)
== %d'
%
(
specialized_type
.
ndim
,)
if
dtype
.
is_int
:
cond
+=
' and {{signed_match}}'
...
...
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