Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
pystencils
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
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
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
pycodegen
pystencils
Commits
36737eb4
Commit
36737eb4
authored
1 year ago
by
Frederik Hennig
Browse files
Options
Downloads
Patches
Plain Diff
Minor fixes of index-dtypes
parent
9329657b
No related branches found
No related tags found
1 merge request
!408
Refactor Field Indexing Symbols
Pipeline
#67838
passed
1 year ago
Stage: Code Quality
Stage: Unit Tests
Stage: legacy_test
Stage: docs
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/pystencils/backend/kernelcreation/context.py
+1
-1
1 addition, 1 deletion
src/pystencils/backend/kernelcreation/context.py
src/pystencils/datahandling/parallel_datahandling.py
+3
-3
3 additions, 3 deletions
src/pystencils/datahandling/parallel_datahandling.py
with
4 additions
and
4 deletions
src/pystencils/backend/kernelcreation/context.py
+
1
−
1
View file @
36737eb4
...
@@ -309,7 +309,7 @@ class KernelCreationContext:
...
@@ -309,7 +309,7 @@ class KernelCreationContext:
f
"
Multiple incompatible types found in index symbols of field
{
field
}
:
"
f
"
Multiple incompatible types found in index symbols of field
{
field
}
:
"
f
"
{
idx_types
}
"
f
"
{
idx_types
}
"
)
)
idx_type
=
idx_types
.
pop
()
if
len
(
idx_types
)
>
0
else
DEFAULTS
.
index_dtype
idx_type
=
idx_types
.
pop
()
if
len
(
idx_types
)
>
0
else
self
.
index_dtype
arr_shape
=
[
arr_shape
=
[
(
s
.
name
if
isinstance
(
s
,
TypedSymbol
)
else
s
)
for
s
in
field
.
shape
(
s
.
name
if
isinstance
(
s
,
TypedSymbol
)
else
s
)
for
s
in
field
.
shape
...
...
This diff is collapsed.
Click to expand it.
src/pystencils/datahandling/parallel_datahandling.py
+
3
−
3
View file @
36737eb4
...
@@ -8,8 +8,8 @@ import waLBerla as wlb
...
@@ -8,8 +8,8 @@ import waLBerla as wlb
from
pystencils.datahandling.blockiteration
import
block_iteration
,
sliced_block_iteration
from
pystencils.datahandling.blockiteration
import
block_iteration
,
sliced_block_iteration
from
pystencils.datahandling.datahandling_interface
import
DataHandling
from
pystencils.datahandling.datahandling_interface
import
DataHandling
from
pystencils.field
import
Field
,
FieldType
from
pystencils.field
import
Field
,
FieldType
from
pystencils.sympyextensions.typed_sympy
import
FieldPointerSymbol
from
pystencils.utils
import
DotDict
from
pystencils.utils
import
DotDict
from
pystencils.backend.kernelfunction
import
FieldPointerParam
from
pystencils
import
Target
from
pystencils
import
Target
...
@@ -258,9 +258,9 @@ class ParallelDataHandling(DataHandling):
...
@@ -258,9 +258,9 @@ class ParallelDataHandling(DataHandling):
else
:
else
:
name_map
=
self
.
_field_name_to_cpu_data_name
name_map
=
self
.
_field_name_to_cpu_data_name
to_array
=
wlb
.
field
.
toArray
to_array
=
wlb
.
field
.
toArray
data_used_in_kernel
=
[(
name_map
[
p
.
symbol
.
field_name
],
self
.
fields
[
p
.
symbol
.
field_name
])
data_used_in_kernel
=
[(
name_map
[
p
.
field_name
],
self
.
fields
[
p
.
field_name
])
for
p
in
kernel_function
.
parameters
if
for
p
in
kernel_function
.
parameters
if
isinstance
(
p
.
symbol
,
FieldPointer
Symbol
)
and
p
.
symbol
.
field_name
not
in
kwargs
]
isinstance
(
p
,
FieldPointer
Param
)
and
p
.
field_name
not
in
kwargs
]
result
=
[]
result
=
[]
for
block
in
self
.
blocks
:
for
block
in
self
.
blocks
:
...
...
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