Skip to content

Commit

Permalink
vsimd: isa
Browse files Browse the repository at this point in the history
  • Loading branch information
Nugine committed Dec 11, 2022
1 parent cdab978 commit 42e6310
Showing 1 changed file with 2 additions and 11 deletions.
13 changes: 2 additions & 11 deletions crates/vsimd/src/isa.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,21 +63,12 @@ macro_rules! is_isa_type {

#[macro_export]
macro_rules! matches_isa {
($self:ident, $super:ident) => {{
($self:ident, $super:ident $(| $other:ident)*) => {{
// TODO: inline const
use $crate::isa::InstructionSet;
struct MatchesISA<S>(S);
impl<S: InstructionSet> MatchesISA<S> {
const VALUE: bool = { $crate::isa::matches_isa_impl::<S, $super>() };
}
MatchesISA::<$self>::VALUE
}};
($self:ident, $super:ident | $($other:ident)|+) => {{
// TODO: inline const
use $crate::isa::InstructionSet;
struct MatchesISA<S>(S);
impl<S: InstructionSet> MatchesISA<S> {
const VALUE: bool = { $crate::isa::matches_isa_impl::<S, $super>() $(||$crate::isa::matches_isa_impl::<S, $other>())+ };
const VALUE: bool = { $crate::isa::matches_isa_impl::<S, $super>() $(||$crate::isa::matches_isa_impl::<S, $other>())* };
}
MatchesISA::<$self>::VALUE
}};
Expand Down

0 comments on commit 42e6310

Please sign in to comment.