Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make SIMD tracking issue marked for stdsimd too #460

Merged
merged 1 commit into from
May 24, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions coresimd/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ mod ppsv;
/// This is an **unstable** module for portable SIMD operations. This module
/// has not yet gone through an RFC and is likely to change, but feedback is
/// always welcome!
#[unstable(feature = "stdsimd", issue = "0")]
#[unstable(feature = "stdsimd", issue = "27731")]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the issue is the right one, but maybe the feature should be core_simd ?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know if that feature already exists in rustc.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ripgrep says there is no instance of core_simd or coresimd being a feature attribute in the rust repo + submodules.

pub mod simd {
pub use coresimd::ppsv::*;
}
Expand Down Expand Up @@ -76,7 +76,7 @@ pub mod arch {
/// See the [module documentation](../index.html) for more details.
#[cfg(any(target_arch = "arm", dox))]
#[doc(cfg(target_arch = "arm"))]
#[unstable(feature = "stdsimd", issue = "0")]
#[unstable(feature = "stdsimd", issue = "27731")]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The feature we should use here is arm_target_feature, which already exists in rustc, but doesn't have a tracking issue there. There is a tracking issue in the stdsimd repo (#148) so maybe we should open one issue in the rust-lang/rust repo that forward users there and "block it from comments" ?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@alexcrichton the alternative here is to add a new feature to rustc, arm_arch ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

arm_target_feature is a language feature, not a library feature. I don’t know if the same name can be used for both.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The library component is arch::arm (part of the std::arch` rfc), so maybe we just need new features for this :/

pub mod arm {
pub use coresimd::arm::*;
}
Expand All @@ -86,7 +86,7 @@ pub mod arch {
/// See the [module documentation](../index.html) for more details.
#[cfg(any(target_arch = "aarch64", dox))]
#[doc(cfg(target_arch = "aarch64"))]
#[unstable(feature = "stdsimd", issue = "0")]
#[unstable(feature = "stdsimd", issue = "27731")]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The feature name that we could re-use is aarch64_target_feature, the alternative would be to add a new feature to rustc here (aarch64_arch?)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The tracking issue here should probably be the same as the arm issue: #148 .

pub mod aarch64 {
pub use coresimd::aarch64::*;
pub use coresimd::arm::*;
Expand All @@ -96,7 +96,7 @@ pub mod arch {
///
/// See the [module documentation](../index.html) for more details.
#[cfg(target_arch = "wasm32")]
#[unstable(feature = "stdsimd", issue = "0")]
#[unstable(feature = "stdsimd", issue = "27731")]
pub mod wasm32 {
pub use coresimd::wasm32::*;
}
Expand All @@ -106,7 +106,7 @@ pub mod arch {
/// See the [module documentation](../index.html) for more details.
#[cfg(any(target_arch = "mips", dox))]
#[doc(cfg(target_arch = "mips"))]
#[unstable(feature = "stdsimd", issue = "0")]
#[unstable(feature = "stdsimd", issue = "27731")]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tracking issue here is #170 .

pub mod mips {
pub use coresimd::mips::*;
}
Expand All @@ -116,7 +116,7 @@ pub mod arch {
/// See the [module documentation](../index.html) for more details.
#[cfg(any(target_arch = "mips64", dox))]
#[doc(cfg(target_arch = "mips64"))]
#[unstable(feature = "stdsimd", issue = "0")]
#[unstable(feature = "stdsimd", issue = "27731")]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tracking issue here is #170 .

pub mod mips64 {
pub use coresimd::mips::*;
}
Expand All @@ -126,7 +126,7 @@ pub mod arch {
/// See the [module documentation](../index.html) for more details.
#[cfg(any(target_arch = "powerpc", dox))]
#[doc(cfg(target_arch = "powerpc"))]
#[unstable(feature = "stdsimd", issue = "0")]
#[unstable(feature = "stdsimd", issue = "27731")]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For powerpc we don't have a tracking issue in the stdsimd repo but there is one issue open about altivec in the rust-lang/rust repo that we might want to recycle here: rust-lang/rust#42743 cc @lu-zero I don't know if you wanted to open an issue in the stdsimd repo tracking powerpc status like we did for x86, arm, and msa, but if you do don't forget to cross-link that rust-lang/rust issue.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can open an issue about this as well. Do you have a specific format for the tracker ?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No specific format, what I've done in the past is hack a script that just translate the vendor C API to rust types, and then formats it as a list for the tracker. Each vendor is different, so there is not much to reuse here :/

pub mod powerpc {
pub use coresimd::powerpc::*;
}
Expand All @@ -137,7 +137,7 @@ pub mod arch {
#[cfg(target_arch = "powerpc64")]
#[cfg(any(target_arch = "powerpc64", dox))]
#[doc(cfg(target_arch = "powerpc64"))]
#[unstable(feature = "stdsimd", issue = "0")]
#[unstable(feature = "stdsimd", issue = "27731")]
pub mod powerpc64 {
pub use coresimd::powerpc64::*;
}
Expand Down
2 changes: 1 addition & 1 deletion crates/coresimd/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
many_single_char_names))]
#![cfg_attr(test, allow(unused_imports))]
#![no_core]
#![unstable(feature = "stdsimd", issue = "0")]
#![unstable(feature = "stdsimd", issue = "27731")]
#![doc(test(attr(deny(warnings))),
test(attr(allow(dead_code, deprecated, unused_variables,
unused_mut))))]
Expand Down
2 changes: 1 addition & 1 deletion crates/stdsimd/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
#![cfg_attr(feature = "cargo-clippy", allow(shadow_reuse))]
#![cfg_attr(target_os = "linux", feature(linkage))]
#![no_std]
#![unstable(feature = "stdsimd", issue = "0")]
#![unstable(feature = "stdsimd", issue = "27731")]

#[macro_use]
extern crate cfg_if;
Expand Down
2 changes: 1 addition & 1 deletion stdsimd/arch/detect/arch/aarch64.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//! Aarch64 run-time features.

#[macro_export]
#[unstable(feature = "stdsimd", issue = "0")]
#[unstable(feature = "stdsimd", issue = "27731")]
#[allow_internal_unstable]
macro_rules! is_aarch64_feature_detected {
("neon") => {
Expand Down
2 changes: 1 addition & 1 deletion stdsimd/arch/detect/arch/arm.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//! Run-time feature detection on ARM Aarch32.

#[macro_export]
#[unstable(feature = "stdsimd", issue = "0")]
#[unstable(feature = "stdsimd", issue = "27731")]
#[allow_internal_unstable]
macro_rules! is_arm_feature_detected {
("neon") => {
Expand Down
2 changes: 1 addition & 1 deletion stdsimd/arch/detect/arch/mips.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//! Run-time feature detection on MIPS.

#[macro_export]
#[unstable(feature = "stdsimd", issue = "0")]
#[unstable(feature = "stdsimd", issue = "27731")]
#[allow_internal_unstable]
macro_rules! is_mips_feature_detected {
("msa") => {
Expand Down
2 changes: 1 addition & 1 deletion stdsimd/arch/detect/arch/mips64.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//! Run-time feature detection on MIPS64.

#[macro_export]
#[unstable(feature = "stdsimd", issue = "0")]
#[unstable(feature = "stdsimd", issue = "27731")]
#[allow_internal_unstable]
macro_rules! is_mips64_feature_detected {
("msa") => {
Expand Down
2 changes: 1 addition & 1 deletion stdsimd/arch/detect/arch/powerpc.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//! Run-time feature detection on PowerPC.

#[macro_export]
#[unstable(feature = "stdsimd", issue = "0")]
#[unstable(feature = "stdsimd", issue = "27731")]
#[allow_internal_unstable]
macro_rules! is_powerpc_feature_detected {
("altivec") => {
Expand Down
2 changes: 1 addition & 1 deletion stdsimd/arch/detect/arch/powerpc64.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//! Run-time feature detection on PowerPC64.

#[macro_export]
#[unstable(feature = "stdsimd", issue = "0")]
#[unstable(feature = "stdsimd", issue = "27731")]
#[allow_internal_unstable]
macro_rules! is_powerpc64_feature_detected {
("altivec") => {
Expand Down
14 changes: 7 additions & 7 deletions stdsimd/arch/detect/error_macros.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

#[cfg(not(any(target_arch = "x86", target_arch = "x86_64")))]
#[macro_export]
#[unstable(feature = "stdsimd", issue = "0")]
#[unstable(feature = "stdsimd", issue = "27731")]
macro_rules! is_x86_feature_detected {
($t: tt) => {
compile_error!(
Expand All @@ -23,7 +23,7 @@ macro_rules! is_x86_feature_detected {

#[cfg(not(target_arch = "arm"))]
#[macro_export]
#[unstable(feature = "stdsimd", issue = "0")]
#[unstable(feature = "stdsimd", issue = "27731")]
macro_rules! is_arm_feature_detected {
($t: tt) => {
compile_error!(
Expand All @@ -42,7 +42,7 @@ macro_rules! is_arm_feature_detected {

#[cfg(not(target_arch = "aarch64"))]
#[macro_export]
#[unstable(feature = "stdsimd", issue = "0")]
#[unstable(feature = "stdsimd", issue = "27731")]
macro_rules! is_aarch64_feature_detected {
($t: tt) => {
compile_error!(
Expand All @@ -61,7 +61,7 @@ macro_rules! is_aarch64_feature_detected {

#[cfg(not(target_arch = "powerpc"))]
#[macro_export]
#[unstable(feature = "stdsimd", issue = "0")]
#[unstable(feature = "stdsimd", issue = "27731")]
macro_rules! is_powerpc_feature_detected {
($t:tt) => {
compile_error!(r#"
Expand All @@ -78,7 +78,7 @@ guarding it behind a cfg(target_arch) as follows:

#[cfg(not(target_arch = "powerpc64"))]
#[macro_export]
#[unstable(feature = "stdsimd", issue = "0")]
#[unstable(feature = "stdsimd", issue = "27731")]
macro_rules! is_powerpc64_feature_detected {
($t:tt) => {
compile_error!(r#"
Expand All @@ -95,7 +95,7 @@ guarding it behind a cfg(target_arch) as follows:

#[cfg(not(target_arch = "mips"))]
#[macro_export]
#[unstable(feature = "stdsimd", issue = "0")]
#[unstable(feature = "stdsimd", issue = "27731")]
macro_rules! is_mips_feature_detected {
($t: tt) => {
compile_error!(
Expand All @@ -114,7 +114,7 @@ macro_rules! is_mips_feature_detected {

#[cfg(not(target_arch = "mips64"))]
#[macro_export]
#[unstable(feature = "stdsimd", issue = "0")]
#[unstable(feature = "stdsimd", issue = "27731")]
macro_rules! is_mips64_feature_detected {
($t: tt) => {
compile_error!(
Expand Down
30 changes: 15 additions & 15 deletions stdsimd/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -353,35 +353,35 @@ pub mod arch {
pub use coresimd::arch::x86_64;

#[cfg(all(not(dox), target_arch = "arm"))]
#[unstable(feature = "stdsimd", issue = "0")]
#[unstable(feature = "stdsimd", issue = "27731")]
pub use coresimd::arch::arm;

#[cfg(all(not(dox), target_arch = "aarch64"))]
#[unstable(feature = "stdsimd", issue = "0")]
#[unstable(feature = "stdsimd", issue = "27731")]
pub use coresimd::arch::aarch64;

#[cfg(target_arch = "wasm32")]
#[unstable(feature = "stdsimd", issue = "0")]
#[unstable(feature = "stdsimd", issue = "27731")]
pub use coresimd::arch::wasm32;

#[cfg(all(not(dox), target_arch = "mips"))]
#[unstable(feature = "stdsimd", issue = "0")]
#[unstable(feature = "stdsimd", issue = "27731")]
pub use coresimd::arch::mips;

#[cfg(all(not(dox), target_arch = "mips64"))]
#[unstable(feature = "stdsimd", issue = "0")]
#[unstable(feature = "stdsimd", issue = "27731")]
pub use coresimd::arch::mips64;

#[cfg(all(not(dox), target_arch = "powerpc"))]
#[unstable(feature = "stdsimd", issue = "0")]
#[unstable(feature = "stdsimd", issue = "27731")]
pub use coresimd::arch::powerpc;

#[cfg(all(not(dox), target_arch = "powerpc64"))]
#[unstable(feature = "stdsimd", issue = "0")]
#[unstable(feature = "stdsimd", issue = "27731")]
pub use coresimd::arch::powerpc64;

#[doc(hidden)] // unstable implementation detail
#[unstable(feature = "stdsimd", issue = "0")]
#[unstable(feature = "stdsimd", issue = "27731")]
pub mod detect;

/// Platform-specific intrinsics for the `x86` platform.
Expand Down Expand Up @@ -417,7 +417,7 @@ pub mod arch {
/// [libcore]: ../../../core/arch/arm/index.html
#[cfg(dox)]
#[doc(cfg(target_arch = "arm"))]
#[unstable(feature = "stdsimd", issue = "0")]
#[unstable(feature = "stdsimd", issue = "27731")]
pub mod arm {}

/// Platform-specific intrinsics for the `aarch64` platform.
Expand All @@ -429,7 +429,7 @@ pub mod arch {
/// [libcore]: ../../../core/arch/aarch64/index.html
#[cfg(dox)]
#[doc(cfg(target_arch = "aarch64"))]
#[unstable(feature = "stdsimd", issue = "0")]
#[unstable(feature = "stdsimd", issue = "27731")]
pub mod aarch64 {}

/// Platform-specific intrinsics for the `mips` platform.
Expand All @@ -441,7 +441,7 @@ pub mod arch {
/// [libcore]: ../../../core/arch/mips/index.html
#[cfg(dox)]
#[doc(cfg(target_arch = "mips"))]
#[unstable(feature = "stdsimd", issue = "0")]
#[unstable(feature = "stdsimd", issue = "27731")]
pub mod mips {}

/// Platform-specific intrinsics for the `mips64` platform.
Expand All @@ -453,7 +453,7 @@ pub mod arch {
/// [libcore]: ../../../core/arch/mips64/index.html
#[cfg(dox)]
#[doc(cfg(target_arch = "mips64"))]
#[unstable(feature = "stdsimd", issue = "0")]
#[unstable(feature = "stdsimd", issue = "27731")]
pub mod mips64 {}

/// Platform-specific intrinsics for the `powerpc` platform.
Expand All @@ -465,7 +465,7 @@ pub mod arch {
/// [libcore]: ../../../core/arch/powerpc/index.html
#[cfg(dox)]
#[doc(cfg(target_arch = "powerpc"))]
#[unstable(feature = "stdsimd", issue = "0")]
#[unstable(feature = "stdsimd", issue = "27731")]
pub mod powerpc {}

/// Platform-specific intrinsics for the `powerpc64` platform.
Expand All @@ -477,9 +477,9 @@ pub mod arch {
/// [libcore]: ../../../core/arch/powerpc64/index.html
#[cfg(dox)]
#[doc(cfg(target_arch = "powerpc64"))]
#[unstable(feature = "stdsimd", issue = "0")]
#[unstable(feature = "stdsimd", issue = "27731")]
pub mod powerpc64 {}
}

#[unstable(feature = "stdsimd", issue = "0")]
#[unstable(feature = "stdsimd", issue = "27731")]
pub use coresimd::simd;