mirror of
https://github.com/Lokathor/bytemuck.git
synced 2024-11-22 06:42:25 +00:00
Experimental support for stdsimd
types (#154)
This commit is contained in:
parent
4c37652113
commit
2c8ce95548
@ -26,6 +26,7 @@ unsound_ptr_pod_impl = []
|
||||
|
||||
# NOT SEMVER SUPPORTED! TEMPORARY ONLY!
|
||||
nightly_portable_simd = []
|
||||
nightly_stdsimd = []
|
||||
|
||||
[dependencies]
|
||||
bytemuck_derive = { version = "1.2.1", path = "derive", optional = true }
|
||||
|
@ -2,6 +2,7 @@
|
||||
#![warn(missing_docs)]
|
||||
#![allow(clippy::match_like_matches_macro)]
|
||||
#![cfg_attr(feature = "nightly_portable_simd", feature(portable_simd))]
|
||||
#![cfg_attr(feature = "nightly_stdsimd", feature(stdsimd))]
|
||||
|
||||
//! This crate gives small utilities for casting between plain data types.
|
||||
//!
|
||||
|
26
src/pod.rs
26
src/pod.rs
@ -321,3 +321,29 @@ where
|
||||
core::simd::LaneCount<N>: core::simd::SupportedLaneCount,
|
||||
{
|
||||
}
|
||||
|
||||
#[cfg(all(target_arch = "x86", feature = "nightly_stdsimd"))]
|
||||
unsafe impl Pod for x86::__m128bh {}
|
||||
#[cfg(all(target_arch = "x86", feature = "nightly_stdsimd"))]
|
||||
unsafe impl Pod for x86::__m256bh {}
|
||||
#[cfg(all(target_arch = "x86", feature = "nightly_stdsimd"))]
|
||||
unsafe impl Pod for x86::__m512 {}
|
||||
#[cfg(all(target_arch = "x86", feature = "nightly_stdsimd"))]
|
||||
unsafe impl Pod for x86::__m512bh {}
|
||||
#[cfg(all(target_arch = "x86", feature = "nightly_stdsimd"))]
|
||||
unsafe impl Pod for x86::__m512d {}
|
||||
#[cfg(all(target_arch = "x86", feature = "nightly_stdsimd"))]
|
||||
unsafe impl Pod for x86::__m512i {}
|
||||
|
||||
#[cfg(all(target_arch = "x86_64", feature = "nightly_stdsimd"))]
|
||||
unsafe impl Pod for x86_64::__m128bh {}
|
||||
#[cfg(all(target_arch = "x86_64", feature = "nightly_stdsimd"))]
|
||||
unsafe impl Pod for x86_64::__m256bh {}
|
||||
#[cfg(all(target_arch = "x86_64", feature = "nightly_stdsimd"))]
|
||||
unsafe impl Pod for x86_64::__m512 {}
|
||||
#[cfg(all(target_arch = "x86_64", feature = "nightly_stdsimd"))]
|
||||
unsafe impl Pod for x86_64::__m512bh {}
|
||||
#[cfg(all(target_arch = "x86_64", feature = "nightly_stdsimd"))]
|
||||
unsafe impl Pod for x86_64::__m512d {}
|
||||
#[cfg(all(target_arch = "x86_64", feature = "nightly_stdsimd"))]
|
||||
unsafe impl Pod for x86_64::__m512i {}
|
||||
|
@ -354,3 +354,29 @@ where
|
||||
core::simd::LaneCount<N>: core::simd::SupportedLaneCount,
|
||||
{
|
||||
}
|
||||
|
||||
#[cfg(all(target_arch = "x86", feature = "nightly_stdsimd"))]
|
||||
unsafe impl Zeroable for x86::__m128bh {}
|
||||
#[cfg(all(target_arch = "x86", feature = "nightly_stdsimd"))]
|
||||
unsafe impl Zeroable for x86::__m256bh {}
|
||||
#[cfg(all(target_arch = "x86", feature = "nightly_stdsimd"))]
|
||||
unsafe impl Zeroable for x86::__m512 {}
|
||||
#[cfg(all(target_arch = "x86", feature = "nightly_stdsimd"))]
|
||||
unsafe impl Zeroable for x86::__m512bh {}
|
||||
#[cfg(all(target_arch = "x86", feature = "nightly_stdsimd"))]
|
||||
unsafe impl Zeroable for x86::__m512d {}
|
||||
#[cfg(all(target_arch = "x86", feature = "nightly_stdsimd"))]
|
||||
unsafe impl Zeroable for x86::__m512i {}
|
||||
|
||||
#[cfg(all(target_arch = "x86_64", feature = "nightly_stdsimd"))]
|
||||
unsafe impl Zeroable for x86_64::__m128bh {}
|
||||
#[cfg(all(target_arch = "x86_64", feature = "nightly_stdsimd"))]
|
||||
unsafe impl Zeroable for x86_64::__m256bh {}
|
||||
#[cfg(all(target_arch = "x86_64", feature = "nightly_stdsimd"))]
|
||||
unsafe impl Zeroable for x86_64::__m512 {}
|
||||
#[cfg(all(target_arch = "x86_64", feature = "nightly_stdsimd"))]
|
||||
unsafe impl Zeroable for x86_64::__m512bh {}
|
||||
#[cfg(all(target_arch = "x86_64", feature = "nightly_stdsimd"))]
|
||||
unsafe impl Zeroable for x86_64::__m512d {}
|
||||
#[cfg(all(target_arch = "x86_64", feature = "nightly_stdsimd"))]
|
||||
unsafe impl Zeroable for x86_64::__m512i {}
|
||||
|
Loading…
Reference in New Issue
Block a user