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

Detailed description

template< typename stream_type, typename algorithm_type = DeviceThreadScheduler>
struct nvbio::aln::BatchedAlignmentScore< stream_type, algorithm_type >

Execution context for a batch of alignment 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
sink_type sink; // alignment sink
... // 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;
// return false if the alignment is to be skipped
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 313 of file batched.h.

#include <batched.h>

Public Types

typedef stream_type::aligner_type aligner_type
 
typedef
checkpoint_storage_type
< aligner_type >::type 
cell_type
 

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 Typedef Documentation

template<typename stream_type, typename algorithm_type = DeviceThreadScheduler>
typedef stream_type::aligner_type nvbio::aln::BatchedAlignmentScore< stream_type, algorithm_type >::aligner_type

Definition at line 315 of file batched.h.

template<typename stream_type, typename algorithm_type = DeviceThreadScheduler>
typedef checkpoint_storage_type<aligner_type>::type nvbio::aln::BatchedAlignmentScore< stream_type, algorithm_type >::cell_type

Definition at line 316 of file batched.h.

Member Function Documentation

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

enact the batch execution

template<typename stream_type, typename algorithm_type = DeviceThreadScheduler>
static uint64 nvbio::aln::BatchedAlignmentScore< 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<typename stream_type, typename algorithm_type = DeviceThreadScheduler>
static uint64 nvbio::aln::BatchedAlignmentScore< 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: