From ed2bbb6ee2eb31bca745c08ebb1fa0dbd9e90d12 Mon Sep 17 00:00:00 2001 From: Martin Larralde <martin.larralde@embl.de> Date: Thu, 31 Aug 2023 00:16:55 +0200 Subject: [PATCH] Fix name of helper methods for `Stripe` trait --- lightmotif/src/pli/platform/avx2.rs | 4 ++-- lightmotif/src/pli/platform/generic.rs | 11 +++++++++-- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/lightmotif/src/pli/platform/avx2.rs b/lightmotif/src/pli/platform/avx2.rs index e9faab2..2c6164e 100644 --- a/lightmotif/src/pli/platform/avx2.rs +++ b/lightmotif/src/pli/platform/avx2.rs @@ -479,7 +479,7 @@ unsafe fn stripe_avx2<A>( $a = _mm256_unpacklo_epi64(t, $b); $b = _mm256_unpackhi_epi64(t, $b); }}; - }; + } // Compute sequence and matrix dimensions let s = seq.as_ref(); @@ -777,7 +777,7 @@ impl Avx2 { } #[allow(unused)] - pub fn stripe<A, S>(seq: S, matrix: &mut StripedSequence<A, <Avx2 as Backend>::LANES>) + pub fn stripe_into<A, S>(seq: S, matrix: &mut StripedSequence<A, <Avx2 as Backend>::LANES>) where A: Alphabet, S: AsRef<[A::Symbol]>, diff --git a/lightmotif/src/pli/platform/generic.rs b/lightmotif/src/pli/platform/generic.rs index ba40689..dd8a86e 100644 --- a/lightmotif/src/pli/platform/generic.rs +++ b/lightmotif/src/pli/platform/generic.rs @@ -4,10 +4,13 @@ use typenum::marker_traits::Unsigned; use super::Backend; use crate::abc::Alphabet; +use crate::num::StrictlyPositive; use crate::pli::Encode; use crate::pli::Maximum; use crate::pli::Score; +use crate::pli::Stripe; +use crate::pli::Threshold; /// A marker type for the generic implementation of the pipeline. #[derive(Clone, Debug, Default)] @@ -19,6 +22,10 @@ impl Backend for Generic { impl<A: Alphabet> Encode<A> for Generic {} -impl<A: Alphabet, C: NonZero + Unsigned> Score<A, C> for Generic {} +impl<A: Alphabet, C: StrictlyPositive> Score<A, C> for Generic {} -impl<C: NonZero + Unsigned> Maximum<C> for Generic {} +impl<C: StrictlyPositive> Maximum<C> for Generic {} + +impl<A: Alphabet, C: StrictlyPositive> Stripe<A, C> for Generic {} + +impl<C: StrictlyPositive> Threshold<C> for Generic {} -- GitLab