40 template <AlignmentType TYPE,
typename algorithm_tag>
54 template <AlignmentType TYPE,
typename algorithm_tag>
68 template <AlignmentType TYPE,
typename scoring_scheme_type,
typename algorithm_tag>
82 template <AlignmentType TYPE,
typename scoring_scheme_type,
typename algorithm_tag>
96 template <AlignmentType TYPE,
typename scoring_scheme_type,
typename algorithm_tag>
104 int32 score = pattern_len * scoring.
scheme.match(30);
105 if (score < min_score)
109 while (score >= min_score && n < pattern_len)
112 score += scoring.
scheme.deletion();
123 template <AlignmentType TYPE,
typename scoring_scheme_type,
typename algorithm_tag>
131 int32 score = pattern_len * scoring.
scheme.match(30);
132 if (score < min_score)
136 while (score >= min_score && n < pattern_len)
139 score += scoring.
scheme.insertion();
150 template <AlignmentType TYPE,
typename scoring_scheme_type,
typename algorithm_tag>
158 int32 score = pattern_len * scoring.
scheme.match(30);
159 if (score < min_score)
163 score += scoring.
scheme.pattern_gap_open();
166 while (score >= min_score && n < pattern_len)
169 score += scoring.
scheme.pattern_gap_extension();
180 template <AlignmentType TYPE,
typename scoring_scheme_type,
typename algorithm_tag>
188 int32 score = pattern_len * scoring.
scheme.match(30);
189 if (score < min_score)
193 score += scoring.
scheme.text_gap_open();
196 while (score >= min_score && n < pattern_len)
199 score += scoring.
scheme.text_gap_extension();
206 template <u
int32 BAND_LEN,
typename score_type>
215 const uint32 M_mod = (M-1) & (BAND_LEN-1);
218 for (
uint32 j = 1; j <= BAND_LEN; ++j)
220 const score_type value = band[j];
227 template <u
int32 BAND_LEN>
236 const uint4 M_mod = make_uint4(
237 (M.x-1) & (BAND_LEN-1),
238 (M.y-1) & (BAND_LEN-1),
239 (M.z-1) & (BAND_LEN-1),
240 (M.w-1) & (BAND_LEN-1) );
243 for (
uint32 j = 1; j <= BAND_LEN; ++j)
246 if (j == M_mod.x+1) r.x = get<0>( value );
247 if (j == M_mod.y+1) r.y = get<1>( value );
248 if (j == M_mod.z+1) r.z = get<2>( value );
249 if (j == M_mod.w+1) r.w = get<3>( value );
255 template <u
int32 BAND_LEN>
263 template <u
int32 BAND_LEN,
typename sink_type>
268 sink.report(
and_op( m, mask ) );
271 template <u
int32 BAND_LEN,
typename score_type>
279 template <u
int32 BAND_LEN,
typename score_type,
typename sink_type>
284 sink.report( m, make_uint2( i+1, M ) );
286 template <u
int32 BAND_LEN,
typename score_type>
290 if (block + BAND_LEN >= M)
291 save_Mth<BAND_LEN>( M, band, best_score );
293 template <u
int32 BAND_LEN,
typename score_type,
typename sink_type>
297 if (block + BAND_LEN >= M)
298 save_Mth<BAND_LEN>( M, band, i, sink );
301 template <u
int32 BAND_LEN,
typename sink_type>
306 block < M.x && block + BAND_LEN >= M.x ? 0xFFu : 0u ,
307 block < M.y && block + BAND_LEN >= M.y ? 0xFFu : 0u ,
308 block < M.z && block + BAND_LEN >= M.z ? 0xFFu : 0u ,
309 block < M.w && block + BAND_LEN >= M.w ? 0xFFu : 0u ),
313 save_Mth<BAND_LEN>( M, band, i, sink, mask );