Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Jonas Plewinski
pystencils
Commits
5cee4ded
Commit
5cee4ded
authored
Feb 08, 2019
by
Martin Bauer
Browse files
Fix in vectorization when directly storing constants
parent
b3d7062a
Changes
1
Hide whitespace changes
Inline
Side-by-side
backends/cbackend.py
View file @
5cee4ded
...
...
@@ -164,8 +164,14 @@ class CBackend:
if
aligned
:
instr
=
'stream'
if
nontemporal
else
'storeA'
rhs_type
=
get_type_of_expression
(
node
.
rhs
)
if
type
(
rhs_type
)
is
not
VectorType
:
rhs
=
cast_func
(
node
.
rhs
,
VectorType
(
rhs_type
))
else
:
rhs
=
node
.
rhs
return
self
.
_vectorInstructionSet
[
instr
].
format
(
"&"
+
self
.
sympy_printer
.
doprint
(
node
.
lhs
.
args
[
0
]),
self
.
sympy_printer
.
doprint
(
node
.
rhs
))
+
';'
self
.
sympy_printer
.
doprint
(
rhs
))
+
';'
else
:
return
"%s = %s;"
%
(
self
.
sympy_printer
.
doprint
(
node
.
lhs
),
self
.
sympy_printer
.
doprint
(
node
.
rhs
))
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment