Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
pycodegen
pystencils
Commits
00c00c45
Commit
00c00c45
authored
Dec 17, 2019
by
Martin Bauer
Browse files
Merge branch 'AssignmentCollection.__bool__' into 'master'
AssignmentCollection.__bool__ See merge request
!108
parents
01cdfa64
fbf1ec12
Pipeline
#20566
passed with stages
in 3 minutes and 30 seconds
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
pystencils/gpucuda/kernelcreation.py
View file @
00c00c45
...
...
@@ -16,6 +16,7 @@ def create_cuda_kernel(assignments,
ghost_layers
=
None
,
skip_independence_check
=
False
,
use_textures_for_interpolation
=
True
):
assert
assignments
,
"Assignments must not be empty!"
fields_read
,
fields_written
,
assignments
=
add_types
(
assignments
,
type_info
,
not
skip_independence_check
)
all_fields
=
fields_read
.
union
(
fields_written
)
read_only_fields
=
set
([
f
.
name
for
f
in
fields_read
-
fields_written
])
...
...
pystencils/kernelcreation.py
View file @
00c00c45
from
types
import
MappingProxyType
from
itertools
import
combinations
from
types
import
MappingProxyType
import
sympy
as
sp
...
...
@@ -74,6 +74,7 @@ def create_kernel(assignments,
[0., 0., 0., 0., 0.]])
"""
# ---- Normalizing parameters
assert
assignments
,
"Assignments must not be empty!"
split_groups
=
()
if
isinstance
(
assignments
,
AssignmentCollection
):
if
'split_groups'
in
assignments
.
simplification_hints
:
...
...
pystencils/simp/assignment_collection.py
View file @
00c00c45
...
...
@@ -404,6 +404,9 @@ class AssignmentCollection:
def
__eq__
(
self
,
other
):
return
set
(
self
.
all_assignments
)
==
set
(
other
.
all_assignments
)
def
__bool__
(
self
):
return
bool
(
self
.
all_assignments
)
class
SymbolGen
:
"""Default symbol generator producing number symbols ζ_0, ζ_1, ..."""
...
...
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