]> git.lizzy.rs Git - rust.git/log
rust.git
2 years agoAdd core_simd/tests/cast.rs
Jubilee Young [Thu, 27 Jan 2022 04:54:05 +0000 (20:54 -0800)]
Add core_simd/tests/cast.rs

2 years agoAdd Simd::cast
Jubilee Young [Thu, 27 Jan 2022 00:58:38 +0000 (16:58 -0800)]
Add Simd::cast

2 years agoMerge pull request #231 from AlecGoncharow/patch-1
Caleb Zulawski [Tue, 25 Jan 2022 01:12:31 +0000 (20:12 -0500)]
Merge pull request #231 from AlecGoncharow/patch-1

fix documentation typo

2 years agoUpdate crates/core_simd/src/vector/float.rs
Caleb Zulawski [Tue, 25 Jan 2022 01:11:17 +0000 (20:11 -0500)]
Update crates/core_simd/src/vector/float.rs

Co-authored-by: Alexander Ronald Altman <alexanderaltman@me.com>
2 years agofix documentation typo
Alec Goncharow [Sun, 23 Jan 2022 21:42:57 +0000 (16:42 -0500)]
fix documentation typo

Remove redundant "neither" in the documentation comment.

2 years agoAnnotate signed type in int_divrem_guard
Jubilee Young [Thu, 20 Jan 2022 23:48:46 +0000 (15:48 -0800)]
Annotate signed type in int_divrem_guard

The way the macro expands, it may sometimes infer
"this is a uint, but doesn't impl Neg???"
Also, I made the "wrong path for intrinsics" error.
These fixes allow integration into libcore.

2 years agoUse intrinsics for Mask::{to,from}_array
Jubilee Young [Sat, 13 Nov 2021 23:06:48 +0000 (15:06 -0800)]
Use intrinsics for Mask::{to,from}_array

This significantly simplifies codegen and should improve mask perf.

Co-authored-by: Jacob Lifshay <programmerjake@gmail.com>
2 years agoMerge pull request #224 from rust-lang/feature/min-max-intrinsic
Caleb Zulawski [Fri, 14 Jan 2022 01:22:00 +0000 (20:22 -0500)]
Merge pull request #224 from rust-lang/feature/min-max-intrinsic

Use intrinsic for min/max

2 years agoUse intrinsic for min/max
Caleb Zulawski [Thu, 13 Jan 2022 22:59:55 +0000 (17:59 -0500)]
Use intrinsic for min/max

2 years agoFix mask alias
Caleb Zulawski [Sun, 9 Jan 2022 18:12:22 +0000 (13:12 -0500)]
Fix mask alias

2 years ago Merge portable-simd#219 - ./std-float
Jubilee [Fri, 31 Dec 2021 23:36:40 +0000 (15:36 -0800)]
 Merge portable-simd#219 - ./std-float

 impl std::simd::StdFloat

 This introduces an extension trait to allow use of floating point methods
 that need runtime support. It is *excessively* documented because its mere
 existence is quite vexing, as the entire thing constitutes a leakage of
 implementation details into user observable space. Eventually the entire
 thing will ideally be folded into core and restructured to match the rest
 of the library, whatever that structure might look like at the time. This
 is preferred in lieu of the "lang item" path because any energy the lang
 items require (and it will be significant, by Simulacrum's estimation) is
 better spent on implementing our libmvec.

2 years agoTear down and rewrite support for float testing
Jubilee Young [Tue, 21 Dec 2021 23:29:29 +0000 (15:29 -0800)]
Tear down and rewrite support for float testing

2 years agoimpl std::simd::StdFloat
Jubilee Young [Tue, 21 Dec 2021 23:00:35 +0000 (15:00 -0800)]
impl std::simd::StdFloat

While consulting with Simulacrum on how to make available the float
functions that currently require runtime support for `Simd<f32, N>` and
`Simd<f64, N>`, we realized breaking coherence with the classic approach
of lang items was, since `{core,std}::simd::Simd` is a `ty::Adt`, likely
to be quite a bit nasty. The project group has a long-term plan for how
to get around this kind of issue and move the associated functions into
libcore, but that will likely take time as well. Since all routes
forward are temporally costly, we probably will skip the lang item
approach entirely and go the "proper" route, but in the interests of
having something this year for people to play around with, this
extension trait was whipped up.

For now, while it involves a lot of fairly internal details most users
shouldn't have to care about, I went ahead and fully documented the
situation for any passerby to read on the trait, as the situation is
quite unusual and puzzling to begin with.

2 years agoMerge portable-simd#210 - ./wrap-shifts
Jubilee [Thu, 30 Dec 2021 09:22:01 +0000 (01:22 -0800)]
Merge portable-simd#210 - ./wrap-shifts

Refactor ops.rs with wrapping shifts

This approaches reducing macro nesting in a slightly different way. Instead of just flattening details, make one macro apply another. This allows specifying all details up-front in the first macro invocation, making it easier to audit and refactor in the future.

This refactor also has some functional changes. Only one is a true behavior change, however:
- The visible one is that SIMD shifts are now wrapping, not panicking on overflow
- `core::simd` now has a lot more instances of `#[must_use]`, which merely lints
- div/rem now perform a SIMD check but remain as before, which should improve performance but be invisible

2 years agoUse Mask::any in div check
Jubilee Young [Fri, 24 Dec 2021 07:14:13 +0000 (23:14 -0800)]
Use Mask::any in div check

2 years agoRefactor ops.rs with a recursive macro
Jubilee Young [Wed, 22 Dec 2021 02:28:57 +0000 (18:28 -0800)]
Refactor ops.rs with a recursive macro

This approaches reducing macro nesting in a slightly different way.
Instead of just flattening details, make one macro apply another.
This allows specifying all details up-front in the first macro
invocation, making it easier to audit and refactor in the future.

2 years agoUse relative intrinsics paths for bitmasks
Jubilee Young [Sat, 11 Dec 2021 04:11:54 +0000 (20:11 -0800)]
Use relative intrinsics paths for bitmasks

2 years agoFinish refactoring ints in ops.rs
Jubilee Young [Thu, 9 Dec 2021 02:42:06 +0000 (18:42 -0800)]
Finish refactoring ints in ops.rs

This should perform a SIMD check for whether or not we can div/rem,
so that we can panic several times faster!

2 years agoRefactor float arith with `#[must_use]`
Jubilee Young [Thu, 9 Dec 2021 01:31:19 +0000 (17:31 -0800)]
Refactor float arith with `#[must_use]`

2 years agoRefactor bitops with `#[must_use]`
Jubilee Young [Thu, 9 Dec 2021 01:23:54 +0000 (17:23 -0800)]
Refactor bitops with `#[must_use]`

2 years agoWrap bitshifts in ops.rs
Jubilee Young [Thu, 9 Dec 2021 00:44:21 +0000 (16:44 -0800)]
Wrap bitshifts in ops.rs

For all other operators, we use wrapping logic where applicable.
This is another case it applies. Per rust-lang/rust#91237, we may
wish to specify this as the natural behavior of `simd_{shl,shr}`.

2 years agoMerge portable-simd#207 - ./feature/simplify-select
Jubilee [Sun, 5 Dec 2021 00:07:40 +0000 (16:07 -0800)]
Merge portable-simd#207 - ./feature/simplify-select

Remove Select trait

I realized that our `select` implementation predated `Simd` being generic over element type, and we don't really need the `Select` trait at all. The function signature is much simpler now (generic over element type, rather than over the entire vector). This did require changing mask select to be a different function, but I think that's fine considering they're not necessarily vectors.

2 years agoRemove Select trait
Caleb Zulawski [Sat, 4 Dec 2021 05:54:15 +0000 (05:54 +0000)]
Remove Select trait

2 years agoMerge portable-simd#195 - portable-simd:trait-ops
Jubilee [Fri, 3 Dec 2021 01:41:30 +0000 (17:41 -0800)]
Merge portable-simd#195 - portable-simd:trait-ops

Generic `core::ops` for `Simd<T, _>`

In order to maintain type soundness, we need to be sure we only implement an operation for `Simd<T, _> where T: SimdElement`... and also valid for that operation in general. While we could do this purely parametrically, it is more sound to implement the operators directly for the base scalar type arguments and then use type parameters to extend the operators to the "higher order" operations.

This implements that strategy and cleans up `simd::ops` into a few submodules:
- assign.rs: `core::ops::*Assign`
- deref.rs:  `core::ops` impls which "deref" borrowed versions of the arguments
- unary.rs: encloses the logic for unary operators on `Simd`, as unary ops are much simpler

This is possible since everything need not be nested in a single maze of macros anymore. The result simplifies the logic and allows reasoning about what operators are valid based on the expressed trait bounds, and also reduces the size of the trait implementation output in rustdoc, for a huge win of 4 MB off the size of `struct.Simd.html`! This addresses a common user complaint, as the original was over 5.5 MB and capable of crashing browsers!

This also carries a fix for a type-inference-related breakage, by removing the autosplatting (vector + scalar binop) impls, as unfortunately the presence of autosplatting was capable of busting type inference. We will likely need to see results from a Crater run before we can understand how to re-land autosplatting.

2 years agoimpl Op<&'_ RHS> for &'_ LHS
Jubilee Young [Wed, 1 Dec 2021 23:02:03 +0000 (15:02 -0800)]
impl Op<&'_ RHS> for &'_ LHS

2 years agoDrop splats for Simd<T, _>
Jubilee Young [Wed, 24 Nov 2021 01:55:14 +0000 (17:55 -0800)]
Drop splats for Simd<T, _>

Unfortunately, splatting impls currently break several crates.
Rust needs more time to review possible mitigations, so
drop the impls for the `impl Add<T> for Simd<T, _>` pattern, for now.

2 years agoimpl unary.rs for Simd<{i,u}{8,16,32,64,size}, _>
Jubilee Young [Wed, 24 Nov 2021 01:36:54 +0000 (17:36 -0800)]
impl unary.rs for Simd<{i,u}{8,16,32,64,size}, _>

In order to assure type soundness, these "base" impls
need to go directly on Simd<T, _> for every scalar type argument.
A bit of cleanup of ops.rs is still warranted.

2 years agoUncomment AVX512 byte vector conversions
Alexander Ronald Altman [Thu, 25 Nov 2021 08:45:28 +0000 (00:45 -0800)]
Uncomment AVX512 byte vector conversions

Resolves my comment in #197, at least for now; #187 is pending but since these are already here, just commented, it seemed to make sense to me to re-enable them anyway.

2 years agoGenerically implement horizontal_{and,or,xor}
Jubilee Young [Mon, 22 Nov 2021 03:08:51 +0000 (19:08 -0800)]
Generically implement horizontal_{and,or,xor}

2 years agoimpl assign.rs<U> for Simd<T, _>
Jubilee Young [Wed, 24 Nov 2021 00:43:02 +0000 (16:43 -0800)]
impl assign.rs<U> for Simd<T, _>

Instead of implementing {Op}Assign traits for individual scalar type args
to Simd<_, _>, use parametric impls that reassert the bounds of the binary op.

2 years agoimpl deref.rs<&Self> for Simd<T, _>
Jubilee Young [Wed, 24 Nov 2021 00:15:19 +0000 (16:15 -0800)]
impl deref.rs<&Self> for Simd<T, _>

Instead of implementing each "deref" pattern for every single scalar,
we can use type parameters for Simd operating on &Self.
We can use a macro, but keep it cleaner and more explicit.

2 years agoAttempt to support to 64 lanes
Jubilee Young [Sun, 21 Nov 2021 22:35:25 +0000 (14:35 -0800)]
Attempt to support to 64 lanes

2 years agoMerge pull request #192 from pro465/patch-1
Caleb Zulawski [Mon, 15 Nov 2021 16:53:39 +0000 (11:53 -0500)]
Merge pull request #192 from pro465/patch-1

Fix outdated workflow badge

2 years agoFix outdated workflow badge
Proloy Mishra [Mon, 15 Nov 2021 13:06:21 +0000 (18:36 +0530)]
Fix outdated workflow badge

2 years agoSprinkle the crate with #[must_use]
Jubilee Young [Sat, 13 Nov 2021 22:38:26 +0000 (14:38 -0800)]
Sprinkle the crate with #[must_use]

2 years agoMerge pull request #190 from alex/patch-1
Caleb Zulawski [Sun, 14 Nov 2021 17:46:10 +0000 (12:46 -0500)]
Merge pull request #190 from alex/patch-1

Update CONTRIBUTING.md for the fact that Travis is no longer used

2 years agoUpdate CONTRIBUTING.md for the fact that Travis is no longer used
Alex Gaynor [Sun, 14 Nov 2021 17:41:16 +0000 (12:41 -0500)]
Update CONTRIBUTING.md for the fact that Travis is no longer used

2 years agoUse new bitmask intrinsics with byte arrays
Caleb Zulawski [Mon, 13 Sep 2021 00:48:26 +0000 (00:48 +0000)]
Use new bitmask intrinsics with byte arrays

2 years agoRewrite Arm transmutes, reading std::arch closer
Jubilee Young [Sat, 13 Nov 2021 00:42:48 +0000 (16:42 -0800)]
Rewrite Arm transmutes, reading std::arch closer

2 years agoRestrict Arm types to Arm v7+
Jubilee Young [Thu, 11 Nov 2021 18:54:27 +0000 (10:54 -0800)]
Restrict Arm types to Arm v7+

This mostly mirrors the restrictions in std::arch.
It can be loosened slightly with later refactoring.

2 years agoDynamically detect AVX512 in CI
Jubilee Young [Wed, 10 Nov 2021 07:49:16 +0000 (23:49 -0800)]
Dynamically detect AVX512 in CI

We would like to check for errors with AVX512,
but we don't pick our CPU. So, detect available features.
This variance in checks stochastically reveals issues.
Nondeterminism is acceptable as our goal is protecting downstream.

2 years agoDeny warnings in CI and fix
Jubilee Young [Wed, 10 Nov 2021 05:06:38 +0000 (21:06 -0800)]
Deny warnings in CI and fix

2 years agoUse the right name for AVX512F
Jubilee Young [Wed, 10 Nov 2021 05:04:18 +0000 (21:04 -0800)]
Use the right name for AVX512F

2 years agoMerge pull request #175 from rust-lang/feature/more-actions
Jubilee [Wed, 10 Nov 2021 04:12:47 +0000 (20:12 -0800)]
Merge pull request #175 from rust-lang/feature/more-actions

Delete travis config, move tests to github actions.

2 years agoDelete travis config, move tests to github actions.
Caleb Zulawski [Mon, 18 Oct 2021 23:20:31 +0000 (23:20 +0000)]
Delete travis config, move tests to github actions.

2 years agoMerge pull request #181 from rust-lang/rotate_lanes
Caleb Zulawski [Tue, 9 Nov 2021 04:01:05 +0000 (23:01 -0500)]
Merge pull request #181 from rust-lang/rotate_lanes

rotate_{left,right} -> rotate_lanes_{left,right}

2 years agoadd `Simd::from_slice` (#177)
Proloy Mishra [Tue, 9 Nov 2021 01:28:43 +0000 (06:58 +0530)]
add `Simd::from_slice` (#177)

* add `Simd::from_slice`

uses a zeroed initial array and loops so that it can be const.
unfortunately, parameterizing the assert with slice length
needs `#![feature(const_fn_fn_ptr_basics)]` to work.

2 years agorotate_{left,right} -> rotate_lanes_{left,right}
Caleb Zulawski [Sat, 6 Nov 2021 00:34:23 +0000 (00:34 +0000)]
rotate_{left,right} -> rotate_lanes_{left,right}

2 years agoHide select impl in sealed trait
Caleb Zulawski [Thu, 21 Oct 2021 00:23:21 +0000 (00:23 +0000)]
Hide select impl in sealed trait

2 years agoHide mask impl details in sealed trait.
Caleb Zulawski [Wed, 22 Sep 2021 23:00:59 +0000 (23:00 +0000)]
Hide mask impl details in sealed trait.

2 years agoFixup import pathing for core
Jubilee Young [Fri, 22 Oct 2021 01:20:06 +0000 (18:20 -0700)]
Fixup import pathing for core

This changes simd_swizzle! to a decl_macro to give it a path,
so it can be imported using a path and not the crate root.
It also adds various uses that were missed and adjusts paths.

2 years agoImprove docs
Caleb Zulawski [Thu, 7 Oct 2021 21:43:53 +0000 (17:43 -0400)]
Improve docs

2 years agoUpdate crates/core_simd/src/swizzle.rs
Caleb Zulawski [Sat, 2 Oct 2021 09:07:51 +0000 (05:07 -0400)]
Update crates/core_simd/src/swizzle.rs

Co-authored-by: Jubilee <46493976+workingjubilee@users.noreply.github.com>
2 years agoRemove adt_const_params feature
Caleb Zulawski [Fri, 1 Oct 2021 20:46:36 +0000 (16:46 -0400)]
Remove adt_const_params feature

2 years agosimd_shuffle -> simd_swizzle
Caleb Zulawski [Thu, 23 Sep 2021 00:28:07 +0000 (00:28 +0000)]
simd_shuffle -> simd_swizzle

2 years agoFix macro in core
Caleb Zulawski [Wed, 22 Sep 2021 23:45:09 +0000 (19:45 -0400)]
Fix macro in core

Co-authored-by: Jubilee <46493976+workingjubilee@users.noreply.github.com>
2 years agoAdd new swizzle API
Caleb Zulawski [Wed, 15 Sep 2021 04:59:03 +0000 (04:59 +0000)]
Add new swizzle API

Expand swizzle API and migrate existing functions. Add rotate_left, rotate_right.

Hide implementation details

Add simd_shuffle macro

2 years agoSimplify language for scatter/gather
Jubilee [Sat, 2 Oct 2021 22:16:33 +0000 (15:16 -0700)]
Simplify language for scatter/gather

Co-authored-by: Caleb Zulawski <caleb.zulawski@gmail.com>
2 years agoRewrite gather/scatter docs
Jubilee Young [Wed, 29 Sep 2021 05:43:28 +0000 (22:43 -0700)]
Rewrite gather/scatter docs

Headings with # Safety and # Examples are more "std style".
Use terms like "enable" and "disable", rather than "mask" jargon.

2 years agodocs: fix typo gather -> scatter
Jubilee [Tue, 28 Sep 2021 19:47:44 +0000 (12:47 -0700)]
docs: fix typo gather -> scatter

Co-authored-by: Jacob Lifshay <programmerjake@gmail.com>
2 years agoAdd {gather,scatter}_select_unchecked
Jubilee Young [Fri, 24 Sep 2021 19:46:50 +0000 (12:46 -0700)]
Add {gather,scatter}_select_unchecked

This unsafe variant allows the thinnest API, in case LLVM cannot
perform loop-invariant code motion on a hot loop when the safe
form is used.

An unchecked variant could be added to other forms, but doesn't
seem likely to improve anything, since it would just add heavier
codegen.

2 years agoAdd lanes() and associated LANES const
Jubilee [Wed, 29 Sep 2021 21:19:45 +0000 (14:19 -0700)]
Add lanes() and associated LANES const

2 years agoRenovate for Edition 2021
Jubilee Young [Wed, 29 Sep 2021 20:07:27 +0000 (13:07 -0700)]
Renovate for Edition 2021

In a still-future edition, `unsafe_op_in_unsafe_fn` may error.
Let's get ahead of that.

2 years agoAdd associated LANES const
Magnus Ulimoen [Wed, 29 Sep 2021 17:01:27 +0000 (17:01 +0000)]
Add associated LANES const

2 years agoAdd lanes()
Magnus Ulimoen [Wed, 29 Sep 2021 16:30:42 +0000 (16:30 +0000)]
Add lanes()

2 years agoMake sure MaskElement is in bitmasks.rs
Jubilee Young [Mon, 27 Sep 2021 21:44:31 +0000 (14:44 -0700)]
Make sure MaskElement is in bitmasks.rs

2 years agoFeature-flag fused mul-add to block libcalls
Jubilee Young [Wed, 22 Sep 2021 01:55:05 +0000 (18:55 -0700)]
Feature-flag fused mul-add to block libcalls

2 years agoFeature-flag doc tests so they run for core
Jubilee Young [Wed, 22 Sep 2021 00:03:25 +0000 (17:03 -0700)]
Feature-flag doc tests so they run for core

2 years agoCleanup more for std::simd also
Jubilee Young [Tue, 21 Sep 2021 05:34:02 +0000 (22:34 -0700)]
Cleanup more for std::simd also

2 years agoRestructure crate as core module
Jubilee Young [Sun, 19 Sep 2021 01:31:49 +0000 (18:31 -0700)]
Restructure crate as core module

Aligns module with rust-lang/library/core, creating an... unusual
architecture that is easier to pull in as a module, as core itself can
have no dependencies (as we haven't built core yet).

2 years agoFix cargo features for nightly (#155)
Caleb Zulawski [Thu, 9 Sep 2021 00:01:16 +0000 (20:01 -0400)]
Fix cargo features for nightly (#155)

* Fix cargo features for nightly

2 years agoMerge pull request #154 from rust-lang/feature/generic-element-type
Jubilee [Tue, 17 Aug 2021 19:10:44 +0000 (12:10 -0700)]
Merge pull request #154 from rust-lang/feature/generic-element-type

Change vectors to be generic over element type.

2 years agoRename element type variable
Caleb Zulawski [Mon, 16 Aug 2021 20:38:30 +0000 (16:38 -0400)]
Rename element type variable

2 years agoUpdate crates/core_simd/src/vector.rs
Caleb Zulawski [Sat, 14 Aug 2021 00:40:05 +0000 (20:40 -0400)]
Update crates/core_simd/src/vector.rs

Co-authored-by: Jubilee <46493976+workingjubilee@users.noreply.github.com>
2 years agoRemove mask aliases
Caleb Zulawski [Sat, 7 Aug 2021 21:22:10 +0000 (21:22 +0000)]
Remove mask aliases

2 years agoRemove aliases
Caleb Zulawski [Sat, 7 Aug 2021 21:15:24 +0000 (21:15 +0000)]
Remove aliases

2 years agoRemove remaining usage of aliases
Caleb Zulawski [Sat, 7 Aug 2021 21:06:40 +0000 (21:06 +0000)]
Remove remaining usage of aliases

2 years agoRemove aliases from most tests
Caleb Zulawski [Sat, 7 Aug 2021 20:38:41 +0000 (20:38 +0000)]
Remove aliases from most tests

2 years agoRemove aliases from op trait impls
Caleb Zulawski [Sat, 7 Aug 2021 20:20:20 +0000 (20:20 +0000)]
Remove aliases from op trait impls

2 years agoRemove most usage of type aliases
Caleb Zulawski [Sat, 7 Aug 2021 19:28:27 +0000 (19:28 +0000)]
Remove most usage of type aliases

2 years agoRemove unused transmute file
Caleb Zulawski [Sat, 7 Aug 2021 16:53:08 +0000 (16:53 +0000)]
Remove unused transmute file

2 years agoImplement comparisons generically
Caleb Zulawski [Sat, 7 Aug 2021 05:47:54 +0000 (05:47 +0000)]
Implement comparisons generically

2 years agoImplement select generically
Caleb Zulawski [Sat, 7 Aug 2021 05:19:06 +0000 (05:19 +0000)]
Implement select generically

2 years agoConvert all masks to a single type
Caleb Zulawski [Sat, 7 Aug 2021 04:30:24 +0000 (04:30 +0000)]
Convert all masks to a single type

2 years agoRemove Mask trait
Caleb Zulawski [Sat, 7 Aug 2021 01:17:27 +0000 (01:17 +0000)]
Remove Mask trait

2 years agoRemove Vector trait
Caleb Zulawski [Sat, 7 Aug 2021 01:16:23 +0000 (01:16 +0000)]
Remove Vector trait

2 years agoChange to various generic impls
Caleb Zulawski [Fri, 6 Aug 2021 03:45:57 +0000 (03:45 +0000)]
Change to various generic impls

2 years agoConvert all vectors to a single type
Caleb Zulawski [Fri, 6 Aug 2021 02:31:24 +0000 (02:31 +0000)]
Convert all vectors to a single type

2 years agoMerge pull request #153 from rust-lang/death-of-the-author
Caleb Zulawski [Fri, 6 Aug 2021 00:49:45 +0000 (20:49 -0400)]
Merge pull request #153 from rust-lang/death-of-the-author

Rename to portable-simd and remove other names

2 years agoRename to portable-simd and remove other names
Jubilee Young [Wed, 28 Jul 2021 02:59:50 +0000 (19:59 -0700)]
Rename to portable-simd and remove other names

Clean up references to the repo's previous name.
Removes the authors field, which is non-obligatory since RFC 3052.
Better to omit than confound: let git log be our witness.

2 years agoMerge pull request #152 from rust-lang/feature/const_eval_checked
Jubilee [Mon, 2 Aug 2021 06:18:24 +0000 (23:18 -0700)]
Merge pull request #152 from rust-lang/feature/const_eval_checked

Feature/const eval checked
Adds the const_evaluatable_checked cargo feature for some experimental (but very useful) function implementations. Adds testing all cargo features to CI.

2 years agoChange bitmasks to use less opaque type
Caleb Zulawski [Thu, 29 Jul 2021 04:55:28 +0000 (04:55 +0000)]
Change bitmasks to use less opaque type

2 years agoFix feature flag in CI
Caleb Zulawski [Wed, 28 Jul 2021 04:33:57 +0000 (04:33 +0000)]
Fix feature flag in CI

2 years agoAdd CI for testing cargo features
Caleb Zulawski [Wed, 28 Jul 2021 04:26:55 +0000 (04:26 +0000)]
Add CI for testing cargo features

2 years agoAdd const_evaluatable_checked feature, change to_bitmask to use it, and fix existing...
Caleb Zulawski [Wed, 28 Jul 2021 04:19:31 +0000 (04:19 +0000)]
Add const_evaluatable_checked feature, change to_bitmask to use it, and fix existing std feature

2 years agoMerge pull request #142 from rust-lang/feature/traits
Jubilee [Sat, 24 Jul 2021 23:01:57 +0000 (16:01 -0700)]
Merge pull request #142 from rust-lang/feature/traits

Combine LanesAtMost32 and SimdArray into a single trait "Vector"

Attempts to fix some unresolved questions in #139 regarding `SimdArray` having a generic parameter.

In particular, this made it not appropriate for replacing `LanesAtMost32`.  Additionally, it made it impossible to use in a context where you otherwise don't know the lane count, e.g. `impl Vector`.

An unfortunate side effect of this change is that scatter/gather no longer work in the trait (nor does anything else that references the lane count in a type.  This requires the super-unstable `const_evaluatable_checked` feature).

I also threw in the change from `as_slice` to `as_array` as discussed in zulip, and fixes #51.

2 years agoAdd lane count marker type
Caleb Zulawski [Sat, 24 Jul 2021 02:54:19 +0000 (02:54 +0000)]
Add lane count marker type

2 years agoMove vector implementation
Caleb Zulawski [Tue, 29 Jun 2021 22:08:50 +0000 (22:08 +0000)]
Move vector implementation

2 years agoUse new module naming
Caleb Zulawski [Tue, 29 Jun 2021 21:48:54 +0000 (21:48 +0000)]
Use new module naming

2 years agoChange as_slice to as_array
Caleb Zulawski [Mon, 28 Jun 2021 00:41:21 +0000 (00:41 +0000)]
Change as_slice to as_array