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
Frederik Hennig
pystencils
Commits
1acd3925
Commit
1acd3925
authored
May 02, 2022
by
Markus Holzer
Browse files
Fix imports
parent
0b7de74d
Changes
2
Hide whitespace changes
Inline
Side-by-side
doc/notebooks/02_tutorial_basic_kernels.ipynb
View file @
1acd3925
...
...
@@ -917,4 +917,4 @@
},
"nbformat": 4,
"nbformat_minor": 2
}
}
\ No newline at end of file
pystencils/cpu/vectorization.py
View file @
1acd3925
...
...
@@ -270,7 +270,7 @@ def insert_vector_casts(ast_node, instruction_set, default_float_type='double'):
new_arg
=
visit_expr
(
expr
.
args
[
0
],
default_type
)
base_type
=
get_type_of_expression
(
expr
.
args
[
0
]).
base_type
if
type
(
expr
.
args
[
0
])
is
VectorMemoryAccess
\
else
get_type_of_expression
(
expr
.
args
[
0
])
pw
=
sp
.
Piecewise
((
-
new_arg
,
new_arg
<
c
ast
_f
unc
(
0
,
base_type
.
numpy_dtype
)),
pw
=
sp
.
Piecewise
((
-
new_arg
,
new_arg
<
C
ast
F
unc
(
0
,
base_type
.
numpy_dtype
)),
(
new_arg
,
True
))
return
visit_expr
(
pw
,
default_type
)
elif
expr
.
func
in
handled_functions
or
isinstance
(
expr
,
sp
.
Rel
)
or
isinstance
(
expr
,
BooleanFunction
):
...
...
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