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
Tom Harke
pystencils
Commits
86f08297
Commit
86f08297
authored
Oct 21, 2019
by
Martin Bauer
Browse files
Style fixes
parent
e99e8a93
Changes
3
Hide whitespace changes
Inline
Side-by-side
pystencils/backends/cbackend.py
View file @
86f08297
...
...
@@ -239,7 +239,7 @@ class CBackend:
instr
=
'storeU'
if
aligned
:
instr
=
'stream'
if
nontemporal
else
'storeA'
if
mask
!=
True
:
if
mask
!=
True
:
# NOQA
instr
=
'maskStore'
if
aligned
else
'maskStoreU'
printed_mask
=
self
.
sympy_printer
.
doprint
(
mask
)
if
self
.
_vector_instruction_set
[
'dataTypePrefix'
][
'double'
]
==
'__mm256d'
:
...
...
pystencils/cpu/vectorization.py
View file @
86f08297
...
...
@@ -232,10 +232,6 @@ def insert_vector_casts(ast_node):
assignment
.
lhs
=
new_lhs
elif
isinstance
(
assignment
.
lhs
,
vector_memory_access
):
assignment
.
lhs
=
visit_expr
(
assignment
.
lhs
)
#elif isinstance(assignment.lhs, cast_func): # TODO check if necessary
# lhs_type = assignment.lhs.args[1]
# if type(lhs_type) is VectorType and type(rhs_type) is not VectorType:
# assignment.rhs = cast_func(assignment.rhs, lhs_type)
elif
isinstance
(
arg
,
ast
.
Conditional
):
arg
.
condition_expr
=
fast_subs
(
arg
.
condition_expr
,
substitution_dict
,
skip
=
lambda
e
:
isinstance
(
e
,
ast
.
ResolvedFieldAccess
))
...
...
pystencils/data_types.py
View file @
86f08297
...
...
@@ -27,10 +27,12 @@ def typed_symbols(names, dtype, *args):
else
:
return
TypedSymbol
(
str
(
symbols
),
dtype
)
def
type_all_numbers
(
expr
,
dtype
):
substitutions
=
{
a
:
cast_func
(
a
,
dtype
)
for
a
in
expr
.
atoms
(
sp
.
Number
)}
return
expr
.
subs
(
substitutions
)
def
matrix_symbols
(
names
,
dtype
,
rows
,
cols
):
if
isinstance
(
names
,
str
):
names
=
names
.
replace
(
' '
,
''
).
split
(
','
)
...
...
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