Skip to content

Commit 62d98e3

Browse files
committed
Remove obsolete macros
1 parent 2720ccc commit 62d98e3

File tree

3 files changed

+1
-124
lines changed

3 files changed

+1
-124
lines changed

crates/core_simd/src/macros.rs

Lines changed: 0 additions & 109 deletions
Original file line numberDiff line numberDiff line change
@@ -26,115 +26,6 @@ macro_rules! from_transmute_x86 {
2626
}
2727
}
2828

29-
/// Calls a the macro `$mac` with the provided `$args` followed by `$repeat` repeated the specified
30-
/// number of times.
31-
macro_rules! call_repeat {
32-
{ 1 => $mac:path [$($repeat:tt)*] $($args:tt)* } => {
33-
$mac! {
34-
$($args)*
35-
$($repeat)*
36-
}
37-
};
38-
{ 2 => $mac:path [$($repeat:tt)*] $($args:tt)* } => {
39-
$mac! {
40-
$($args)*
41-
$($repeat)* $($repeat)*
42-
}
43-
};
44-
{ 4 => $mac:path [$($repeat:tt)*] $($args:tt)* } => {
45-
$mac! {
46-
$($args)*
47-
$($repeat)* $($repeat)* $($repeat)* $($repeat)*
48-
}
49-
};
50-
{ 8 => $mac:path [$($repeat:tt)*] $($args:tt)* } => {
51-
$mac! {
52-
$($args)*
53-
$($repeat)* $($repeat)* $($repeat)* $($repeat)* $($repeat)* $($repeat)* $($repeat)* $($repeat)*
54-
}
55-
};
56-
{ 16 => $mac:path [$($repeat:tt)*] $($args:tt)* } => {
57-
$mac! {
58-
$($args)*
59-
$($repeat)* $($repeat)* $($repeat)* $($repeat)* $($repeat)* $($repeat)* $($repeat)* $($repeat)*
60-
$($repeat)* $($repeat)* $($repeat)* $($repeat)* $($repeat)* $($repeat)* $($repeat)* $($repeat)*
61-
}
62-
};
63-
{ 32 => $mac:path [$($repeat:tt)*] $($args:tt)* } => {
64-
$mac! {
65-
$($args)*
66-
$($repeat)* $($repeat)* $($repeat)* $($repeat)* $($repeat)* $($repeat)* $($repeat)* $($repeat)*
67-
$($repeat)* $($repeat)* $($repeat)* $($repeat)* $($repeat)* $($repeat)* $($repeat)* $($repeat)*
68-
$($repeat)* $($repeat)* $($repeat)* $($repeat)* $($repeat)* $($repeat)* $($repeat)* $($repeat)*
69-
$($repeat)* $($repeat)* $($repeat)* $($repeat)* $($repeat)* $($repeat)* $($repeat)* $($repeat)*
70-
}
71-
};
72-
{ 64 => $mac:path [$($repeat:tt)*] $($args:tt)* } => {
73-
$mac! {
74-
$($args)*
75-
$($repeat)* $($repeat)* $($repeat)* $($repeat)* $($repeat)* $($repeat)* $($repeat)* $($repeat)*
76-
$($repeat)* $($repeat)* $($repeat)* $($repeat)* $($repeat)* $($repeat)* $($repeat)* $($repeat)*
77-
$($repeat)* $($repeat)* $($repeat)* $($repeat)* $($repeat)* $($repeat)* $($repeat)* $($repeat)*
78-
$($repeat)* $($repeat)* $($repeat)* $($repeat)* $($repeat)* $($repeat)* $($repeat)* $($repeat)*
79-
$($repeat)* $($repeat)* $($repeat)* $($repeat)* $($repeat)* $($repeat)* $($repeat)* $($repeat)*
80-
$($repeat)* $($repeat)* $($repeat)* $($repeat)* $($repeat)* $($repeat)* $($repeat)* $($repeat)*
81-
$($repeat)* $($repeat)* $($repeat)* $($repeat)* $($repeat)* $($repeat)* $($repeat)* $($repeat)*
82-
$($repeat)* $($repeat)* $($repeat)* $($repeat)* $($repeat)* $($repeat)* $($repeat)* $($repeat)*
83-
}
84-
};
85-
}
86-
87-
/// Calls the macro `$mac` with the specified `$args` followed by the specified number of unique
88-
/// identifiers.
89-
macro_rules! call_counting_args {
90-
{ 1 => $mac:path => $($args:tt)* } => {
91-
$mac! {
92-
$($args)*
93-
value
94-
}
95-
};
96-
{ 2 => $mac:path => $($args:tt)* } => {
97-
$mac! {
98-
$($args)*
99-
v0 v1
100-
}
101-
};
102-
{ 4 => $mac:path => $($args:tt)* } => {
103-
$mac! {
104-
$($args)*
105-
v0 v1 v2 v3
106-
}
107-
};
108-
{ 8 => $mac:path => $($args:tt)* } => {
109-
$mac! {
110-
$($args)*
111-
v0 v1 v2 v3 v4 v5 v6 v7
112-
}
113-
};
114-
{ 16 => $mac:path => $($args:tt)* } => {
115-
$mac! {
116-
$($args)*
117-
v0 v1 v2 v3 v4 v5 v6 v7 v8 v9 v10 v11 v12 v13 v14 v15
118-
}
119-
};
120-
{ 32 => $mac:path => $($args:tt)* } => {
121-
$mac! {
122-
$($args)*
123-
v0 v1 v2 v3 v4 v5 v6 v7 v8 v9 v10 v11 v12 v13 v14 v15
124-
v16 v17 v18 v19 v20 v21 v22 v23 v24 v25 v26 v27 v28 v29 v30 v31
125-
}
126-
};
127-
{ 64 => $mac:path => $($args:tt)* } => {
128-
$mac! {
129-
$($args)*
130-
v0 v1 v2 v3 v4 v5 v6 v7 v8 v9 v10 v11 v12 v13 v14 v15
131-
v16 v17 v18 v19 v20 v21 v22 v23 v24 v25 v26 v27 v28 v29 v30 v31
132-
v32 v33 v34 v35 v36 v37 v38 v39 v40 v41 v42 v43 v44 v45 v46 v47
133-
v48 v49 v50 v51 v52 v53 v54 v55 v56 v57 v58 v59 v60 v61 v62 v63
134-
}
135-
};
136-
}
137-
13829
/// Implements common traits on the specified vector `$name`, holding multiple `$lanes` of `$type`.
13930
macro_rules! impl_vector {
14031
{ $name:ident, $type:ty } => {

crates/core_simd/src/masks/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
//! Types and traits associated with masking lanes of vectors.
22
#![allow(non_camel_case_types)]
33

4+
/// Implements bitwise ops on mask types by delegating the operators to the inner type.
45
macro_rules! delegate_ops_to_inner {
56
{ $name:ident } => {
67
impl<const LANES: usize> core::ops::BitAnd for $name<LANES> {

crates/core_simd/src/ops.rs

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -262,21 +262,6 @@ macro_rules! impl_float_ops {
262262
};
263263
}
264264

265-
/// Implements mask operators for the provided types.
266-
macro_rules! impl_mask_ops {
267-
{ $($scalar:ty => $($vector:ident),*;)* } => {
268-
$( // scalar
269-
$( // vector
270-
impl_op! { impl BitAnd for $vector, $scalar }
271-
impl_op! { impl BitOr for $vector, $scalar }
272-
impl_op! { impl BitXor for $vector, $scalar }
273-
impl_op! { impl Not for $vector, $scalar }
274-
impl_op! { impl Index for $vector, $scalar }
275-
)*
276-
)*
277-
};
278-
}
279-
280265
/// Implements unsigned integer operators for the provided types.
281266
macro_rules! impl_unsigned_int_ops {
282267
{ $($scalar:ty => $($vector:ident),*;)* } => {

0 commit comments

Comments
 (0)