File tree 8 files changed +17
-10
lines changed
8 files changed +17
-10
lines changed Original file line number Diff line number Diff line change @@ -208,8 +208,8 @@ jobs:
208
208
features :
209
209
- " "
210
210
- " --features std"
211
- - " --features const_evaluatable_checked "
212
- - " --features std --features const_evaluatable_checked "
211
+ - " --features generic_const_exprs "
212
+ - " --features std --features generic_const_exprs "
213
213
214
214
steps :
215
215
- uses : actions/checkout@v2
Original file line number Diff line number Diff line change @@ -9,9 +9,9 @@ categories = ["hardware-support", "no-std"]
9
9
license = " MIT OR Apache-2.0"
10
10
11
11
[features ]
12
- default = [" std" , " const_evaluatable_checked " ]
12
+ default = [" std" , " generic_const_exprs " ]
13
13
std = []
14
- const_evaluatable_checked = []
14
+ generic_const_exprs = []
15
15
16
16
[target .'cfg(target_arch = "wasm32")' .dev-dependencies .wasm-bindgen ]
17
17
version = " 0.2"
Original file line number Diff line number Diff line change 1
- #![ no_std]
1
+ #![ cfg_attr ( not ( feature = "std" ) , no_std) ]
2
2
#![ allow( incomplete_features) ]
3
3
#![ feature(
4
- const_evaluatable_checked ,
4
+ adt_const_params ,
5
5
const_fn_trait_bound,
6
- const_generics,
7
6
platform_intrinsics,
8
7
repr_simd,
9
8
simd_ffi,
10
9
staged_api,
11
10
stdsimd
12
11
) ]
12
+ #![ cfg_attr( feature = "generic_const_exprs" , feature( generic_const_exprs) ) ]
13
13
#![ warn( missing_docs) ]
14
14
#![ unstable( feature = "portable_simd" , issue = "86656" ) ]
15
15
//! Portable SIMD module.
@@ -22,7 +22,7 @@ mod reduction;
22
22
mod select;
23
23
pub use select:: Select ;
24
24
25
- #[ cfg( feature = "const_evaluatable_checked " ) ]
25
+ #[ cfg( feature = "generic_const_exprs " ) ]
26
26
mod to_bytes;
27
27
28
28
mod comparisons;
Original file line number Diff line number Diff line change @@ -178,11 +178,13 @@ where
178
178
}
179
179
180
180
/// Convert this mask to a bitmask, with one bit set per lane.
181
+ #[ cfg( feature = "generic_const_exprs" ) ]
181
182
pub fn to_bitmask ( self ) -> [ u8 ; LaneCount :: < LANES > :: BITMASK_LEN ] {
182
183
self . 0 . to_bitmask ( )
183
184
}
184
185
185
186
/// Convert a bitmask to a mask.
187
+ #[ cfg( feature = "generic_const_exprs" ) ]
186
188
pub fn from_bitmask ( bitmask : [ u8 ; LaneCount :: < LANES > :: BITMASK_LEN ] ) -> Self {
187
189
Self ( mask_impl:: Mask :: from_bitmask ( bitmask) )
188
190
}
Original file line number Diff line number Diff line change @@ -119,12 +119,14 @@ where
119
119
Self ( core:: mem:: transmute_copy ( & mask) , PhantomData )
120
120
}
121
121
122
+ #[ cfg( feature = "generic_const_exprs" ) ]
122
123
#[ inline]
123
124
pub fn to_bitmask ( self ) -> [ u8 ; LaneCount :: < LANES > :: BITMASK_LEN ] {
124
125
// Safety: these are the same type and we are laundering the generic
125
126
unsafe { core:: mem:: transmute_copy ( & self . 0 ) }
126
127
}
127
128
129
+ #[ cfg( feature = "generic_const_exprs" ) ]
128
130
#[ inline]
129
131
pub fn from_bitmask ( bitmask : [ u8 ; LaneCount :: < LANES > :: BITMASK_LEN ] ) -> Self {
130
132
// Safety: these are the same type and we are laundering the generic
Original file line number Diff line number Diff line change @@ -101,6 +101,7 @@ where
101
101
unsafe { Mask ( crate :: intrinsics:: simd_cast ( self . 0 ) ) }
102
102
}
103
103
104
+ #[ cfg( feature = "generic_const_exprs" ) ]
104
105
#[ inline]
105
106
pub fn to_bitmask ( self ) -> [ u8 ; LaneCount :: < LANES > :: BITMASK_LEN ] {
106
107
unsafe {
@@ -127,6 +128,7 @@ where
127
128
}
128
129
}
129
130
131
+ #[ cfg( feature = "generic_const_exprs" ) ]
130
132
#[ inline]
131
133
pub fn from_bitmask ( mut bitmask : [ u8 ; LaneCount :: < LANES > :: BITMASK_LEN ] ) -> Self {
132
134
unsafe {
Original file line number Diff line number Diff line change @@ -68,6 +68,7 @@ macro_rules! test_mask_api {
68
68
assert_eq!( core_simd:: Mask :: <$type, 8 >:: from_int( int) , mask) ;
69
69
}
70
70
71
+ #[ cfg( feature = "generic_const_exprs" ) ]
71
72
#[ test]
72
73
fn roundtrip_bitmask_conversion( ) {
73
74
let values = [
Original file line number Diff line number Diff line change 1
- #![ feature( portable_simd, const_generics , const_evaluatable_checked ) ]
1
+ #![ feature( portable_simd, generic_const_exprs , adt_const_params ) ]
2
2
#![ allow( incomplete_features) ]
3
- #![ cfg( feature = "const_evaluatable_checked " ) ]
3
+ #![ cfg( feature = "generic_const_exprs " ) ]
4
4
5
5
use core_simd:: Simd ;
6
6
You can’t perform that action at this time.
0 commit comments