forward type alignment information to seqs (#12430)
This commit is contained in:
parent
a8f030fea2
commit
4005f0d0e4
25 changed files with 152 additions and 114 deletions
17
tests/collections/thardalignmentconstraint.nim
Normal file
17
tests/collections/thardalignmentconstraint.nim
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
discard """
|
||||
disabled: true
|
||||
"""
|
||||
|
||||
# does not yet work
|
||||
|
||||
{.passC: "-march=native".}
|
||||
|
||||
type
|
||||
m256d {.importc: "__m256d", header: "immintrin.h".} = object
|
||||
|
||||
proc set1(x: float): m256d {.importc: "_mm256_set1_pd", header: "immintrin.h".}
|
||||
|
||||
for _ in 1..1000:
|
||||
var x = newSeq[m256d](1)
|
||||
x[0] = set1(1.0) # test if operation causes segfault
|
||||
doAssert (cast[uint](x[0].addr) and 31) == 0
|
||||
Loading…
Add table
Add a link
Reference in a new issue