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
pycodegen
pystencils
Commits
59c13fb1
Commit
59c13fb1
authored
Apr 27, 2022
by
Michael Kuron
Browse files
Fix test_alignment_of_different_layouts on architectures with 128-bit vectors
parent
4570ee2c
Pipeline
#39426
passed with stages
in 16 minutes and 28 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
pystencils_tests/test_aligned_array.py
View file @
59c13fb1
...
...
@@ -59,13 +59,13 @@ def test_alignment_of_different_layouts():
byte_offset
=
8
for
tries
in
range
(
16
):
# try a few times, since we might get lucky and get randomly a correct alignment
arr
=
create_numpy_array_with_layout
((
3
,
4
,
5
),
layout
=
(
0
,
1
,
2
),
alignment
=
True
,
byte_offset
=
byte_offset
)
alignment
=
8
*
4
,
byte_offset
=
byte_offset
)
assert
is_aligned
(
arr
[
offset
,
...],
8
*
4
,
byte_offset
)
arr
=
create_numpy_array_with_layout
((
3
,
4
,
5
),
layout
=
(
2
,
1
,
0
),
alignment
=
True
,
byte_offset
=
byte_offset
)
alignment
=
8
*
4
,
byte_offset
=
byte_offset
)
assert
is_aligned
(
arr
[...,
offset
],
8
*
4
,
byte_offset
)
arr
=
create_numpy_array_with_layout
((
3
,
4
,
5
),
layout
=
(
2
,
0
,
1
),
alignment
=
True
,
byte_offset
=
byte_offset
)
alignment
=
8
*
4
,
byte_offset
=
byte_offset
)
assert
is_aligned
(
arr
[:,
0
,
:],
8
*
4
,
byte_offset
)
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