Skip to content
Snippets Groups Projects
Commit efad462bb4fb authored by Kurt Smith's avatar Kurt Smith
Browse files

updated utility code convenience functions in MemoryView.py

parent e9dffd017ba5
Branches
No related tags found
No related merge requests found
...@@ -128,7 +128,7 @@ ...@@ -128,7 +128,7 @@
else: else:
return memview_strided_access return memview_strided_access
def use_cython_util_code(env, lu_name): def use_cython_view_util_code(env, lu_name):
import CythonScope import CythonScope
cythonscope = env.global_scope().context.cython_scope cythonscope = env.global_scope().context.cython_scope
viewscope = cythonscope.viewscope viewscope = cythonscope.viewscope
...@@ -136,5 +136,12 @@ ...@@ -136,5 +136,12 @@
entry.used = 1 entry.used = 1
return entry return entry
def use_cython_util_code(env, lu_name):
import CythonScope
cythonscope = env.global_scope().context.cython_scope
entry = cythonscope.lookup_here(lu_name)
entry.used = 1
return entry
def use_memview_util_code(env): def use_memview_util_code(env):
import CythonScope import CythonScope
...@@ -139,6 +146,6 @@ ...@@ -139,6 +146,6 @@
def use_memview_util_code(env): def use_memview_util_code(env):
import CythonScope import CythonScope
memview_entry = use_cython_util_code(env, CythonScope.memview_name) return use_cython_view_util_code(env, CythonScope.memview_name)
def use_memview_cwrap(env): def use_memview_cwrap(env):
import CythonScope import CythonScope
...@@ -142,7 +149,10 @@ ...@@ -142,7 +149,10 @@
def use_memview_cwrap(env): def use_memview_cwrap(env):
import CythonScope import CythonScope
mv_cwrap_entry = use_cython_util_code(env, CythonScope.memview_cwrap_name) return use_cython_view_util_code(env, CythonScope.memview_cwrap_name)
def use_cython_array(env):
return use_cython_util_code(env, 'array')
def src_conforms_to_dst(src, dst): def src_conforms_to_dst(src, dst):
''' '''
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment