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
a7697342
Commit
a7697342
authored
Jul 27, 2009
by
Kurt Smith
Committed by
Mark Florisson
Sep 30, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
stub for memoryview put_assign_to_memview
parent
5f37f843
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
3 deletions
+14
-3
Cython/Compiler/ExprNodes.py
Cython/Compiler/ExprNodes.py
+10
-3
Cython/Compiler/MemoryView.py
Cython/Compiler/MemoryView.py
+4
-0
No files found.
Cython/Compiler/ExprNodes.py
View file @
a7697342
...
@@ -1650,6 +1650,9 @@ class NameNode(AtomicExprNode):
...
@@ -1650,6 +1650,9 @@ class NameNode(AtomicExprNode):
rhs
.
generate_disposal_code
(
code
)
rhs
.
generate_disposal_code
(
code
)
rhs
.
free_temps
(
code
)
rhs
.
free_temps
(
code
)
else
:
else
:
if
self
.
type
.
is_memoryview
:
self
.
generate_acquire_memoryview
(
rhs
,
code
)
if
self
.
type
.
is_buffer
:
if
self
.
type
.
is_buffer
:
# Generate code for doing the buffer release/acquisition.
# Generate code for doing the buffer release/acquisition.
# This might raise an exception in which case the assignment (done
# This might raise an exception in which case the assignment (done
...
@@ -1693,6 +1696,13 @@ class NameNode(AtomicExprNode):
...
@@ -1693,6 +1696,13 @@ class NameNode(AtomicExprNode):
rhs
.
generate_post_assignment_code
(
code
)
rhs
.
generate_post_assignment_code
(
code
)
rhs
.
free_temps
(
code
)
rhs
.
free_temps
(
code
)
def
generate_acquire_memoryview
(
self
,
rhs
,
code
):
import
MemoryView
import
pdb
;
pdb
.
set_trace
()
MemoryView
.
put_assign_to_memview
(
self
.
result
(),
rhs
.
result
(),
self
.
entry
,
is_initialized
=
not
self
.
lhs_of_first_assignment
,
pos
=
self
.
pos
,
code
=
code
)
def
generate_acquire_buffer
(
self
,
rhs
,
code
):
def
generate_acquire_buffer
(
self
,
rhs
,
code
):
# rhstmp is only used in case the rhs is a complicated expression leading to
# rhstmp is only used in case the rhs is a complicated expression leading to
# the object, to avoid repeating the same C expression for every reference
# the object, to avoid repeating the same C expression for every reference
...
@@ -7578,9 +7588,6 @@ class CoerceToMemViewNode(CoercionNode):
...
@@ -7578,9 +7588,6 @@ class CoerceToMemViewNode(CoercionNode):
self
.
type
=
dst_type
self
.
type
=
dst_type
self
.
is_temp
=
1
self
.
is_temp
=
1
self
.
env
=
env
self
.
env
=
env
import
MemoryView
self
.
env
.
use_utility_code
(
MemoryView
.
obj_to_memview_code
)
# MemoryView.use_memview_cwrap(env)
def
generate_result_code
(
self
,
code
):
def
generate_result_code
(
self
,
code
):
import
MemoryView
import
MemoryView
...
...
Cython/Compiler/MemoryView.py
View file @
a7697342
...
@@ -64,6 +64,10 @@ _typename_to_format = {
...
@@ -64,6 +64,10 @@ _typename_to_format = {
def
format_from_type
(
base_type
):
def
format_from_type
(
base_type
):
return
_typename_to_format
[
base_type
.
sign_and_name
()]
return
_typename_to_format
[
base_type
.
sign_and_name
()]
def
put_assign_to_memview
(
lhs_cname
,
rhs_cname
,
buf_entry
,
is_initialized
,
pos
,
code
):
pass
def
get_buf_flag
(
specs
):
def
get_buf_flag
(
specs
):
is_c_contig
,
is_f_contig
=
is_cf_contig
(
specs
)
is_c_contig
,
is_f_contig
=
is_cf_contig
(
specs
)
...
...
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