DP-HLS
 All Classes Namespaces Files Functions Variables Typedefs Macros Pages
ALIGN_TYPE Namespace Reference

This namespace contains the functions that is required to be implemented by the user. ALIGN_TYPE itself is a macro, and is supposed to be defined as the kernel name in params.h. More...

Namespaces

 Helper
 
 PE
 
 Traceback
 The namespace for the customized function related to the traceback.
 

Functions

void InitializeScores (score_vec_t(&init_col_scr)[MAX_QUERY_LENGTH], score_vec_t(&init_row_scr)[MAX_REFERENCE_LENGTH], Penalties penalties)
 The function to initialize the initial row and column scores. More...
 
void UpdatePEMaximum (const wavefront_scores_inf_t scores, ScorePack(&max)[PE_NUM], const idx_t chunk_row_offset, const idx_t wavefront, const idx_t p_cols, const idx_t ck_idx, const bool(&predicate)[PE_NUM], const idx_t query_len, const idx_t ref_len)
 This function unrolls PE_NUM units to compare the their local maximum/minimum and new cell scores. It can be queried to update the local minimum/maximum scores based on it's current index. The row index can be computed as the PE_idx + chunk_row_offset; and the column index is the wavefront index - PE_idx. The actual query and reference lengths are provided so that they can be compared to the current index. More...
 
void InitializeMaxScores (ScorePack(&max)[PE_NUM], idx_t qry_len, idx_t ref_len)
 Initialize the ScorePacks with the minimum/maximum values. More...
 

Detailed Description

This namespace contains the functions that is required to be implemented by the user. ALIGN_TYPE itself is a macro, and is supposed to be defined as the kernel name in params.h.

Declare Any Customized Align type in this file.

Function Documentation

void ALIGN_TYPE::InitializeMaxScores ( ScorePack(&)  max[PE_NUM],
idx_t  qry_len,
idx_t  ref_len 
)

Initialize the ScorePacks with the minimum/maximum values.

A way to save resources in the global alignment is to initialize the PE to start the traceback with a INF value and others NINF. The physical coordinates can be pre-calculated before knowing the scores, thus save the resources by having empty UpdatePEMaximum function. See the DP-HLS global alignment example for the actual implementation.

Parameters
qry_lenActual query length.
ref_lenActual reference length.
void ALIGN_TYPE::InitializeScores ( score_vec_t(&)  init_col_scr[MAX_QUERY_LENGTH],
score_vec_t(&)  init_row_scr[MAX_REFERENCE_LENGTH],
Penalties  penalties 
)

The function to initialize the initial row and column scores.

Parameters
penaltiesThe penalties (alignment parameters).
void ALIGN_TYPE::UpdatePEMaximum ( const wavefront_scores_inf_t  scores,
ScorePack(&)  max[PE_NUM],
const idx_t  chunk_row_offset,
const idx_t  wavefront,
const idx_t  p_cols,
const idx_t  ck_idx,
const bool(&)  predicate[PE_NUM],
const idx_t  query_len,
const idx_t  ref_len 
)

This function unrolls PE_NUM units to compare the their local maximum/minimum and new cell scores. It can be queried to update the local minimum/maximum scores based on it's current index. The row index can be computed as the PE_idx + chunk_row_offset; and the column index is the wavefront index - PE_idx. The actual query and reference lengths are provided so that they can be compared to the current index.

Parameters
scoresThe buffer of output scores.
chunk_row_offsetThe row offset of the current chunk.
wavefrontThe wavefront index.
p_colsThe physical column corresponding to the output scores.
ck_idxThe chunk index.
query_lenQuery length.
ref_lenReference length.