forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request rust-lang#27 from thomcc/abs_from_to_bits
Implement abs, to_bits, and from_bits for float vectors
- Loading branch information
Showing
4 changed files
with
110 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,29 @@ | ||
define_vector! { | ||
define_float_vector! { | ||
/// Vector of two `f32` values | ||
struct f32x2([f32; 2]); | ||
bits crate::u32x2; | ||
} | ||
|
||
define_vector! { | ||
define_float_vector! { | ||
/// Vector of four `f32` values | ||
struct f32x4([f32; 4]); | ||
bits crate::u32x4; | ||
} | ||
|
||
define_vector! { | ||
define_float_vector! { | ||
/// Vector of eight `f32` values | ||
struct f32x8([f32; 8]); | ||
bits crate::u32x8; | ||
} | ||
|
||
define_vector! { | ||
define_float_vector! { | ||
/// Vector of 16 `f32` values | ||
struct f32x16([f32; 16]); | ||
bits crate::u32x16; | ||
} | ||
|
||
from_transmute_x86! { unsafe f32x4 => __m128 } | ||
from_transmute_x86! { unsafe f32x8 => __m256 } | ||
//from_transmute_x86! { unsafe f32x16 => __m512 } | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters