1
Fork 0

Ban non-array SIMD

This commit is contained in:
Scott McMurray 2024-08-22 01:28:20 -07:00
parent 712463de61
commit d2309c2a9d
111 changed files with 814 additions and 1101 deletions

View file

@ -21,7 +21,7 @@ trait Freeze {}
trait Copy {}
#[repr(simd)]
pub struct i32x4(i32, i32, i32, i32);
pub struct i32x4([i32; 4]);
#[repr(C)]
pub struct Foo {
@ -47,12 +47,12 @@ extern "C" {
}
pub fn main() {
unsafe { f(Foo { a: i32x4(1, 2, 3, 4), b: 0 }) }
unsafe { f(Foo { a: i32x4([1, 2, 3, 4]), b: 0 }) }
unsafe {
g(DoubleFoo {
one: Foo { a: i32x4(1, 2, 3, 4), b: 0 },
two: Foo { a: i32x4(1, 2, 3, 4), b: 0 },
one: Foo { a: i32x4([1, 2, 3, 4]), b: 0 },
two: Foo { a: i32x4([1, 2, 3, 4]), b: 0 },
})
}
}