|
6 | 6 | // option. This file may not be copied, modified, or distributed |
7 | 7 | // except according to those terms. |
8 | 8 | #![crate_name = "ndarray"] |
| 9 | +// Crate-level nightly feature gate for the optional `nightly-simd` backend |
| 10 | +// (`src/simd_nightly/`). When the `nightly-simd` cargo feature is OFF |
| 11 | +// (default), this attribute is absent and stable rustc compiles the crate |
| 12 | +// normally. When ON, the crate requires nightly rustc to access |
| 13 | +// `core::simd::*` types. |
| 14 | +#![cfg_attr(feature = "nightly-simd", feature(portable_simd))] |
9 | 15 | #![doc(html_root_url = "https://docs.rs/ndarray/0.15/")] |
10 | 16 | #![doc(html_logo_url = "https://rust-ndarray.github.io/images/rust-ndarray_logo.svg")] |
11 | 17 | #![allow( |
@@ -240,6 +246,14 @@ pub(crate) mod simd_avx512; |
240 | 246 | #[allow(clippy::all, missing_docs, dead_code, unused_variables, unused_imports)] |
241 | 247 | pub mod simd_avx2; |
242 | 248 |
|
| 249 | +// Portable-SIMD backend — nightly-only. Wraps `core::simd::*` so miri can |
| 250 | +// execute the polyfill paths (intrinsic-based backends are opaque to |
| 251 | +// miri). Gated behind `nightly-simd` feature; the file itself requires |
| 252 | +// `#![feature(portable_simd)]` so it only compiles on nightly rustc. |
| 253 | +#[cfg(feature = "nightly-simd")] |
| 254 | +#[allow(clippy::all, missing_docs)] |
| 255 | +pub mod simd_nightly; |
| 256 | + |
243 | 257 | #[cfg(feature = "std")] |
244 | 258 | #[allow(clippy::all, missing_docs, dead_code, unused_variables, unused_imports)] |
245 | 259 | // AMX is an x86_64-only ISA (Intel Sapphire Rapids+); the module uses |
|
0 commit comments