Skip to content
Snippets Groups Projects
Commit 9b24165a authored by Martin Larralde's avatar Martin Larralde
Browse files

Hotfix issue with alignment of data in AVX2 code

parent ed79dd5c
No related branches found
No related tags found
No related merge requests found
......@@ -151,7 +151,7 @@ unsafe fn score_avx2_permute<A>(
let x3 = _mm256_shuffle_epi8(x, m3);
let x4 = _mm256_shuffle_epi8(x, m4);
// load row for current weight matrix position
let t = _mm256_load_ps(pssmptr);
let t = _mm256_loadu_ps(pssmptr);
// index A/T/G/C/N lookup table with the bases
let b1 = _mm256_permutevar8x32_ps(t, x1);
let b2 = _mm256_permutevar8x32_ps(t, x2);
......
......@@ -93,6 +93,12 @@ impl<A: Alphabet> CountMatrix<A> {
// }
}
/// The length of the motif encoded in this count matrix.
#[inline]
pub const fn len(&self) -> usize {
self.data.rows()
}
/// Create a new count matrix from the given sequences.
///
/// # Errors
......@@ -233,6 +239,12 @@ impl<A: Alphabet> FrequencyMatrix<A> {
}
}
/// The length of the motif encoded in this frequency matrix.
#[inline]
pub const fn len(&self) -> usize {
self.data.rows()
}
/// Create a new frequency matrix.
///
/// The matrix must contain frequency data, i.e. rows should all sum to 1
......@@ -331,7 +343,7 @@ impl<A: Alphabet> WeightMatrix<A> {
/// The length of the motif encoded in this weight matrix.
#[inline]
pub fn len(&self) -> usize {
pub const fn len(&self) -> usize {
self.data.rows()
}
......@@ -445,7 +457,7 @@ impl<A: Alphabet> ScoringMatrix<A> {
/// The length of the motif encoded in this scoring matrix.
#[inline]
pub fn len(&self) -> usize {
pub const fn len(&self) -> usize {
self.data.rows()
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment