Skip to content
  • Alex Crichton's avatar
    std: Add `arch` and `simd` modules · c72537f2
    Alex Crichton authored
    This commit imports the `stdsimd` crate into the standard library,
    creating an `arch` and `simd` module inside of both libcore and libstd.
    Both of these modules are **unstable** and will continue to be so until
    RFC 2335 is stabilized.
    
    As a brief recap, the modules are organized as so:
    
    * `arch` contains all current architectures with intrinsics, for example
      `std::arch::x86`, `std::arch::x86_64`, `std::arch::arm`, etc. These
      modules contain all of the intrinsics defined for the platform, like
      `_mm_set1_epi8`.
    * In the standard library, the `arch` module also exports a
      `is_target_feature_detected` macro which performs runtime detection to
      determine whether a target feature is available at runtime.
    * The `simd` module contains experimental versions of strongly-typed
      lane-aware SIMD primitives, to be fully fleshed out in a future RFC.
    
    The main purpose of this commit is to start pulling in all these
    intrinsics and such into the standard library on nightly and allow
    testing and such. This'll help allow users to easily kick the tires and
    see if intrinsics work as well as allow us to test out all the
    infrastructure for moving the intrinsics into the standard library.
    c72537f2