Ban non-array SIMD
This commit is contained in:
parent
712463de61
commit
d2309c2a9d
111 changed files with 814 additions and 1101 deletions
|
@ -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 },
|
||||
})
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue