38 #if defined(__CUDACC__)
58 typename aligner_type,
59 typename pattern_string,
66 const aligner_type aligner,
67 const pattern_string pattern,
68 const qual_string quals,
69 const text_string
text,
70 const int32 min_score,
75 return dispatcher::dispatch(
97 typename aligner_type,
98 typename pattern_string,
100 typename text_string,
104 const aligner_type aligner,
105 const pattern_string pattern,
106 const qual_string quals,
107 const text_string
text,
108 const int32 min_score,
113 cell_type
column[MAX_TEXT_LEN];
116 return dispatcher::dispatch(
138 typename aligner_type,
139 typename pattern_string,
140 typename qual_string,
141 typename text_string,
144 typename checkpoint_type>
147 const aligner_type aligner,
148 const pattern_string pattern,
149 const qual_string quals,
150 const text_string
text,
151 const int32 min_score,
152 const uint32 window_begin,
155 checkpoint_type checkpoint,
159 return dispatcher::dispatch(
185 typename aligner_type,
186 typename pattern_string,
187 typename qual_string,
188 typename text_string,
193 const aligner_type aligner,
194 const pattern_string pattern,
195 const qual_string quals,
196 const text_string
text,
197 const int32 min_score,
198 const uint32 window_begin,
204 return dispatcher::dispatch(
230 typename aligner_type,
231 typename pattern_string,
232 typename qual_string,
233 typename text_string,
235 typename checkpoint_type,
239 const aligner_type aligner,
240 const pattern_string pattern,
241 const qual_string quals,
242 const text_string
text,
243 const int32 min_score,
249 dispatcher::dispatch_checkpoints(
293 typename aligner_type,
294 typename pattern_string,
295 typename qual_string,
296 typename text_string,
298 typename checkpoint_type,
299 typename submatrix_type>
302 const aligner_type aligner,
303 const pattern_string pattern,
304 const qual_string quals,
305 const text_string
text,
306 const int32 min_score,
308 const uint32 checkpoint_id,
309 submatrix_type submatrix,
313 return dispatcher::dispatch_submatrix(
356 typename aligner_type,
357 typename pattern_string,
358 typename qual_string,
359 typename text_string,
360 typename backtracer_type,
361 typename checkpoints_type,
362 typename submatrix_type,
366 const aligner_type aligner,
367 const pattern_string pattern,
368 const qual_string quals,
369 const text_string
text,
370 const int32 min_score,
371 backtracer_type& backtracer,
373 submatrix_type submatrix,
395 typedef typename pattern_string::value_type symbol_type;
398 const uint32 submatrix_height = text.length();
402 alignment_score_checkpoints<CHECKPOINTS>(
405 const uint32 n_checkpoints = (pattern.length() + CHECKPOINTS-1)/CHECKPOINTS;
408 uint2 sink = best.
sink;
409 if (sink.x ==
uint32(-1) ||
414 backtracer.clip( pattern.length() - sink.y );
417 int32 checkpoint_id = n_checkpoints-1;
421 for (; checkpoint_id >= 0; --checkpoint_id)
423 if (checkpoint_id * CHECKPOINTS < sink.y)
432 for (; checkpoint_id >= 0; --checkpoint_id)
434 const uint32 submatrix_width = alignment_score_submatrix<CHECKPOINTS>(
437 if (priv::alignment_traceback<CHECKPOINTS>(
438 aligner, checkpoints, checkpoint_id, submatrix, submatrix_width, submatrix_height, state, sink, backtracer ))
448 for (; sink.y > 0; --sink.y)
456 for (; sink.x > 0; --sink.x)
462 backtracer.clip( sink.y );
492 typename aligner_type,
493 typename pattern_string,
494 typename qual_string,
495 typename text_string,
496 typename backtracer_type>
499 const aligner_type aligner,
500 const pattern_string pattern,
501 const qual_string quals,
502 const text_string
text,
503 const int32 min_score,
504 backtracer_type& backtracer)
509 cell_type
column[MAX_TEXT_LEN];
513 checkpoint_type
checkpoints[ (MAX_TEXT_LEN+1)*((MAX_PATTERN_LEN + CHECKPOINTS-1)/CHECKPOINTS) ];
515 NVBIO_VAR_UNUSED const uint32 SUBMATRIX_WORDS = (MAX_TEXT_LEN*CHECKPOINTS + ELEMENTS_PER_WORD-1) / ELEMENTS_PER_WORD;
516 uint32 submatrix_base[ SUBMATRIX_WORDS ];
519 return alignment_traceback<CHECKPOINTS>(
531 #if defined(__CUDACC__)
558 typename aligner_type,
559 typename pattern_string,
560 typename qual_string,
561 typename text_string,
565 const aligner_type aligner,
566 const pattern_string pattern,
567 const qual_string quals,
568 const text_string
text,
569 const int32 min_score,
573 return priv::alignment_score<BLOCKDIM>(