Skip to content
Snippets Groups Projects

Vectorisation bug

Merged Markus Holzer requested to merge holzer/pystencils:VectorisationBug into master
Viewing commit a74e787f
Show latest version
2 files
+ 23
21
Preferences
Compare changes
Files
2
@@ -296,19 +296,3 @@ def test_issue40(*_):
@@ -296,19 +296,3 @@ def test_issue40(*_):
code = ps.get_code_str(ast)
code = ps.get_code_str(ast)
assert 'epi32' not in code
assert 'epi32' not in code
def test_square_root(instruction_set=instruction_set):
dtype = 'float32'
field_layout = 'fzyx'
config = ps.CreateKernelConfig(data_type=dtype,
cpu_vectorize_info={'instruction_set': instruction_set,
'assume_inner_stride_one': True,
'assume_aligned': False, 'nontemporal': False})
src_field = ps.Field.create_generic('pdfs', 2, dtype, index_dimensions=1, layout=field_layout, index_shape=(9,))
eq = [ps.Assignment(sp.Symbol("xi"), sum(src_field.center_vector)),
ps.Assignment(sp.Symbol("xi_2"), sp.Symbol("xi") * sp.sqrt(src_field.center))]
ps.create_kernel(eq, config=config).compile()