NVBIO
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Methods | Static Public Methods | List of all members
nvbio::aln::BatchedAlignmentTraceback< CHECKPOINTS, stream_type, algorithm_type > Struct Template Reference

Detailed description

template< uint32 CHECKPOINTS, typename stream_type, typename algorithm_type = DeviceThreadScheduler>
struct nvbio::aln::BatchedAlignmentTraceback< CHECKPOINTS, stream_type, algorithm_type >

Consume a stream of alignment traceback jobs

Template Parameters
stream_typethe stream of alignment jobs
algorithm_typea Batch Scheduler specifier

This class has to provide the following interface:

stream_type
{
typedef ... aligner_type; // define the aligner type
// an alignment context
struct context_type
{
int32 min_score; // the threshold score for a valid alignment
backtracer_type backtracer; // alignment backtracer
Alignment<int32> alignment; // alignment result
... // private data
};
// a container for the strings to be aligned
struct strings_type
{
pattern_type pattern; // the pattern to align
qual_type quals; // the pattern qualities
text_type text; // the text to align
... // private data
};
// return the aligner
aligner_type aligner() const;
// return the maximum pattern length
uint32 max_pattern_length() const;
// return the maximum text length
uint32 max_text_length() const;
// stream size
uint32 size() const;
// return the i-th pattern length
uint32 pattern_length(const uint32 i, context_type* context) const;
// return the i-th text length
uint32 text_length(const uint32 i, context_type* context) const;
// initialize the context relative to the i-th alignment
bool init_context(
const uint32 i, // job index
context_type* context) const; // output job context
// get the context relative to the i-th alignment
void load_strings(
const uint32 i, // job index
const uint32 pattern_begin, // pattern window begin
const uint32 pattern_end // pattern window end
context_type* context, // job context
strings_type* strings) const; // output strings
// consume the output
void output(const uint32 i, context_type* context);
};

While this design might seem a little convoluted it is motivated by efficiency and generality. In fact, it does:

Definition at line 436 of file batched.h.

#include <batched.h>

Public Methods

void enact (stream_type stream, uint64 temp_size=0u, uint8 *temp=NULL)
 

Static Public Methods

static uint64 min_temp_storage (const uint32 max_pattern_len, const uint32 max_text_len, const uint32 stream_size)
 
static uint64 max_temp_storage (const uint32 max_pattern_len, const uint32 max_text_len, const uint32 stream_size)
 

Member Function Documentation

template<uint32 CHECKPOINTS, typename stream_type, typename algorithm_type = DeviceThreadScheduler>
void nvbio::aln::BatchedAlignmentTraceback< CHECKPOINTS, stream_type, algorithm_type >::enact ( stream_type  stream,
uint64  temp_size = 0u,
uint8 temp = NULL 
)

enact the batch execution

template<uint32 CHECKPOINTS, typename stream_type, typename algorithm_type = DeviceThreadScheduler>
static uint64 nvbio::aln::BatchedAlignmentTraceback< CHECKPOINTS, stream_type, algorithm_type >::max_temp_storage ( const uint32  max_pattern_len,
const uint32  max_text_len,
const uint32  stream_size 
)
static

return the maximum number of bytes required by the algorithm

template<uint32 CHECKPOINTS, typename stream_type, typename algorithm_type = DeviceThreadScheduler>
static uint64 nvbio::aln::BatchedAlignmentTraceback< CHECKPOINTS, stream_type, algorithm_type >::min_temp_storage ( const uint32  max_pattern_len,
const uint32  max_text_len,
const uint32  stream_size 
)
static

return the minimum number of bytes required by the algorithm


The documentation for this struct was generated from the following file: