From 3f06d433e7218f31d1d6df968b0c2c7f96f96f16 Mon Sep 17 00:00:00 2001 From: zzh Date: Sun, 20 Aug 2023 02:40:22 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A7=A3=E5=86=B3=E4=BA=86avx2=5Fu8=EF=BC=8C?= =?UTF-8?q?=E5=89=AA=E6=9E=9Dfind=5Fmax=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ksw_avx2_u8.c | 4 ++-- ksw_normal.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ksw_avx2_u8.c b/ksw_avx2_u8.c index 964c028..3627b10 100644 --- a/ksw_avx2_u8.c +++ b/ksw_avx2_u8.c @@ -158,7 +158,7 @@ static const uint8_t reverse_mask[SIMD_WIDTH] = {7, 6, 5, 4, 3, 2, 1, 0, 15, 14, cmp_max = _mm256_xor_si256(cmp_max, last_max_vec); \ cmp_max = _mm256_cmpeq_epi8(cmp_max, zero_vec); \ uint32_t cmp_result = _mm256_movemask_epi8(cmp_max); \ - if (cmp_result != 4294967296) \ + if (cmp_result != 4294967295) \ { \ uint8_t *maxVal = (uint8_t *)&max_vec; \ max_vec = _mm256_max_epu8(max_vec, _mm256_alignr_epi8(max_vec, max_vec, 1)); \ @@ -236,7 +236,7 @@ int ksw_avx2_u8(int qlen, // query length 待匹配段碱基的que int *_gscore, // query的端到端匹配得分 int *_max_off) // 取得最大得分时在query和reference上位置差的 最大值 { - return h0; + // return h0; #ifdef SHOW_PERF // extern int64_t time_bsw_init; // extern int64_t time_bsw_main_loop; diff --git a/ksw_normal.c b/ksw_normal.c index 52a2a0c..3193012 100644 --- a/ksw_normal.c +++ b/ksw_normal.c @@ -18,7 +18,7 @@ typedef struct int ksw_normal(int qlen, const uint8_t *query, int tlen, const uint8_t *target, int m, const int8_t *mat, int o_del, int e_del, int o_ins, int e_ins, int w, int end_bonus, int zdrop, int h0, int *_qle, int *_tle, int *_gtle, int *_gscore, int *_max_off) { - // return h0; + return h0; eh_t *eh; // score array int8_t *qp; // query profile int i, j, k, oe_del = o_del + e_del, oe_ins = o_ins + e_ins, beg, end, max, max_i, max_j, max_ins, max_del, max_ie, gscore, max_off;