Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
arraycontext
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
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
Andreas Klöckner
arraycontext
Commits
b893cd23
Commit
b893cd23
authored
3 years ago
by
Kaushik Kulkarni
Browse files
Options
Downloads
Patches
Plain Diff
removes interfaces that have no-users
parent
0dc10bdb
No related branches found
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
arraycontext/impl/__init__.py
+0
-37
0 additions, 37 deletions
arraycontext/impl/__init__.py
with
0 additions
and
37 deletions
arraycontext/impl/__init__.py
+
0
−
37
View file @
b893cd23
...
...
@@ -25,40 +25,3 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
"""
from
typing
import
Any
def
_is_meshmode_dofarray
(
x
:
Any
)
->
bool
:
try
:
from
meshmode.dof_array
import
DOFArray
except
ImportError
:
return
False
else
:
return
isinstance
(
x
,
DOFArray
)
def
_is_pyopencl_array
(
x
:
Any
)
->
bool
:
try
:
import
pyopencl.array
as
cla
except
ImportError
:
return
False
else
:
return
isinstance
(
x
,
cla
.
Array
)
def
_flatten_cl_array
(
ary
):
import
pyopencl.array
as
cl
assert
isinstance
(
ary
,
cl
.
Array
)
if
ary
.
size
==
0
:
# Work around https://github.com/inducer/pyopencl/pull/402
return
ary
.
_new_with_changes
(
data
=
None
,
offset
=
0
,
shape
=
(
0
,),
strides
=
(
ary
.
dtype
.
itemsize
,))
if
ary
.
flags
.
f_contiguous
:
return
ary
.
reshape
(
-
1
,
order
=
"
F
"
)
elif
ary
.
flags
.
c_contiguous
:
return
ary
.
reshape
(
-
1
,
order
=
"
C
"
)
else
:
raise
ValueError
(
"
cannot flatten array
"
f
"
with strides
{
ary
.
strides
}
of
{
ary
.
dtype
}
"
)
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