Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
meshmode
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Xiaoyu Wei
meshmode
Commits
a584c89c
Commit
a584c89c
authored
4 years ago
by
Andreas Klöckner
Browse files
Options
Downloads
Patches
Plain Diff
CL fake numpy: vectorize minimum/maximum over obj arrays
parent
319f69c6
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
meshmode/array_context.py
+2
-2
2 additions, 2 deletions
meshmode/array_context.py
with
2 additions
and
2 deletions
meshmode/array_context.py
+
2
−
2
View file @
a584c89c
...
...
@@ -27,6 +27,7 @@ import numpy as np
import
loopy
as
lp
from
loopy.version
import
MOST_RECENT_LANGUAGE_VERSION
from
pytools
import
memoize_method
from
pytools.obj_array
import
obj_array_vectorized_n_args
__doc__
=
"""
.. autofunction:: make_loopy_program
...
...
@@ -69,7 +70,6 @@ class _BaseFakeNumpyNamespace:
**
{
"
inp%d
"
%
i
:
arg
for
i
,
arg
in
enumerate
(
args
)})
return
result
from
pytools.obj_array
import
obj_array_vectorized_n_args
return
obj_array_vectorized_n_args
(
f
)
...
...
@@ -212,7 +212,7 @@ class _PyOpenCLFakeNumpyNamespace(_BaseFakeNumpyNamespace):
def
__getattr__
(
self
,
name
):
if
name
in
[
"
minimum
"
,
"
maximum
"
]:
import
pyopencl.array
as
cl_array
return
getattr
(
cl_array
,
name
)
return
obj_array_vectorized_n_args
(
getattr
(
cl_array
,
name
)
)
return
super
().
__getattr__
(
name
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment