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
6fed27bb
Commit
6fed27bb
authored
4 years ago
by
Michael Kuron
Browse files
Options
Downloads
Patches
Plain Diff
some fixes for lbmpy vectorization
parent
44b01cb6
Branches
Branches containing commit
Tags
Tags containing commit
1 merge request
!216
some fixes for lbmpy vectorization
Pipeline
#30401
passed
4 years ago
Stage: test
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
pystencils/cpu/vectorization.py
+2
-0
2 additions, 0 deletions
pystencils/cpu/vectorization.py
pystencils/simp/assignment_collection.py
+4
-1
4 additions, 1 deletion
pystencils/simp/assignment_collection.py
with
6 additions
and
1 deletion
pystencils/cpu/vectorization.py
+
2
−
0
View file @
6fed27bb
...
...
@@ -210,6 +210,8 @@ def insert_vector_casts(ast_node):
# special treatment for the unary minus: make sure that the -1 has the same type as the argument
dtype
=
int
for
arg
in
expr
.
args
[
1
:]:
if
type
(
arg
)
is
sp
.
Pow
:
arg
=
arg
.
args
[
0
]
if
type
(
arg
)
is
vector_memory_access
and
arg
.
dtype
.
base_type
.
is_float
():
dtype
=
arg
.
dtype
.
base_type
.
numpy_dtype
.
type
elif
type
(
arg
)
is
TypedSymbol
and
type
(
arg
.
dtype
)
is
VectorType
and
arg
.
dtype
.
base_type
.
is_float
():
...
...
This diff is collapsed.
Click to expand it.
pystencils/simp/assignment_collection.py
+
4
−
1
View file @
6fed27bb
...
...
@@ -437,9 +437,10 @@ class AssignmentCollection:
class
SymbolGen
:
"""
Default symbol generator producing number symbols ζ_0, ζ_1, ...
"""
def
__init__
(
self
,
symbol
=
"
xi
"
):
def
__init__
(
self
,
symbol
=
"
xi
"
,
dtype
=
None
):
self
.
_ctr
=
0
self
.
_symbol
=
symbol
self
.
_dtype
=
dtype
def
__iter__
(
self
):
return
self
...
...
@@ -447,4 +448,6 @@ class SymbolGen:
def
__next__
(
self
):
name
=
f
"
{
self
.
_symbol
}
_
{
self
.
_ctr
}
"
self
.
_ctr
+=
1
if
self
.
_dtype
is
not
None
:
return
pystencils
.
TypedSymbol
(
name
,
self
.
_dtype
)
return
sp
.
Symbol
(
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