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
Merge requests
!216
some fixes for lbmpy vectorization
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
some fixes for lbmpy vectorization
vectorization
into
master
Overview
0
Commits
2
Pipelines
2
Changes
2
Merged
Michael Kuron
requested to merge
vectorization
into
master
4 years ago
Overview
0
Commits
2
Pipelines
2
Changes
2
Expand
Follow-up to
!212 (merged)
and new feature for
lbmpy!65 (merged)
.
0
0
Merge request reports
Compare
master
version 1
6fed27bb
4 years ago
master (base)
and
latest version
latest version
e46f1658
2 commits,
4 years ago
version 1
6fed27bb
1 commit,
4 years ago
2 files
+
8
−
4
Side-by-side
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
2
Search (e.g. *.vue) (Ctrl+P)
pystencils/cpu/vectorization.py
+
4
−
3
Options
@@ -209,10 +209,11 @@ def insert_vector_casts(ast_node):
@@ -209,10 +209,11 @@ def insert_vector_casts(ast_node):
if
expr
.
func
is
sp
.
Mul
and
expr
.
args
[
0
]
==
-
1
:
if
expr
.
func
is
sp
.
Mul
and
expr
.
args
[
0
]
==
-
1
:
# special treatment for the unary minus: make sure that the -1 has the same type as the argument
# special treatment for the unary minus: make sure that the -1 has the same type as the argument
dtype
=
int
dtype
=
int
for
arg
in
expr
.
a
rgs
[
1
:]
:
for
arg
in
expr
.
a
toms
(
vector_memory_access
)
:
if
type
(
arg
)
is
vector_memory_access
and
arg
.
dtype
.
base_type
.
is_float
():
if
arg
.
dtype
.
base_type
.
is_float
():
dtype
=
arg
.
dtype
.
base_type
.
numpy_dtype
.
type
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
():
for
arg
in
expr
.
atoms
(
TypedSymbol
):
if
type
(
arg
.
dtype
)
is
VectorType
and
arg
.
dtype
.
base_type
.
is_float
():
dtype
=
arg
.
dtype
.
base_type
.
numpy_dtype
.
type
dtype
=
arg
.
dtype
.
base_type
.
numpy_dtype
.
type
if
dtype
is
not
int
:
if
dtype
is
not
int
:
if
dtype
is
np
.
float32
:
if
dtype
is
np
.
float32
:
Loading