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...
|
| Helper |
|
| PE |
|
| Traceback |
| The namespace for the customized function related to the traceback.
|
|
|
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...
|
|
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.
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_len | Actual query length. |
ref_len | Actual 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
-
penalties | The 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
-
scores | The buffer of output scores. |
chunk_row_offset | The row offset of the current chunk. |
wavefront | The wavefront index. |
p_cols | The physical column corresponding to the output scores. |
ck_idx | The chunk index. |
query_len | Query length. |
ref_len | Reference length. |