NCBI C++ ToolKit
|
Private interface to support the multi-threaded traceback. More...
#include <algo/blast/core/blast_setup.h>
#include "blast_traceback_mt_priv.h"
#include "blast_hspstream_mt_utils.h"
Go to the source code of this file.
Go to the SVN repository for this file.
Private interface to support the multi-threaded traceback.
Definition in file blast_traceback_mt_priv.c.
|
static |
Definition at line 111 of file blast_traceback_mt_priv.c.
References ASSERT, calloc(), data, BlastHSPResults::hitlist_array, BlastHitList::hsplist_count, i, NULL, and BlastHSPResults::num_queries.
Referenced by SThreadLocalDataArrayConsolidateResults().
BlastHSPResults* SThreadLocalDataArrayConsolidateResults | ( | SThreadLocalDataArray * | array | ) |
Extracts a single, consolidated BlastHSPResults structure from its input for single threaded processing.
array | structure to inspect and modify [in|out] |
Definition at line 139 of file blast_traceback_mt_priv.c.
References Blast_HitListNew(), Blast_HSPList_IsEmpty(), Blast_HSPResultsFree(), Blast_HSPResultsNew(), calloc(), BlastHSPResults::hitlist_array, BlastHitList::hsplist_array, BlastHitList::hsplist_count, i, BlastHitList::low_score, MAX, MIN, NULL, s_CountHspListsPerQuery(), sfree, and BlastHitList::worst_evalue.
Referenced by BLAST_ComputeTraceback_MT(), and Blast_RedoAlignmentCore_MT().
SThreadLocalDataArray* SThreadLocalDataArrayFree | ( | SThreadLocalDataArray * | array | ) |
Deallocate the SThreadLocalDataArray structure passed in.
array | structure to deallocate [in] |
Definition at line 96 of file blast_traceback_mt_priv.c.
References i, NULL, sfree, and SThreadLocalDataFree().
Referenced by BLAST_ComputeTraceback(), Blast_RunTracebackSearchWithInterrupt(), and SThreadLocalDataArrayNew().
SThreadLocalDataArray* SThreadLocalDataArrayNew | ( | Uint4 | num_threads | ) |
Allocate a new SThreadLocalDataArray structure.
num_threads | size of the array structure to allocate [in] |
Definition at line 76 of file blast_traceback_mt_priv.c.
References calloc(), i, malloc(), NULL, SThreadLocalDataArray::num_elems, SThreadLocalDataArrayFree(), SThreadLocalDataNew(), and SThreadLocalDataArray::tld.
Referenced by BLAST_ComputeTraceback(), Blast_RedoAlignmentCore_MT(), and Blast_RunTracebackSearchWithInterrupt().
Int2 SThreadLocalDataArraySetup | ( | SThreadLocalDataArray * | array, |
EBlastProgramType | program, | ||
const BlastScoringOptions * | score_options, | ||
const BlastEffectiveLengthsOptions * | eff_len_options, | ||
const BlastExtensionOptions * | ext_options, | ||
const BlastHitSavingOptions * | hit_options, | ||
BlastQueryInfo * | query_info, | ||
BlastScoreBlk * | sbp, | ||
const BlastSeqSrc * | seqsrc | ||
) |
Set up a newly allocated SThreadLocalDataArray object so it can be used by multiple threads.
array | structure to modify [in|out] |
program | BLAST program type [in] |
score_options | scoring options to clone [in] |
eff_len_options | effective length options to clone [in] |
ext_options | extension options to clone [in] |
hit_options | hit options to clone [in] |
query_info | query_info structure to clone [in] |
sbp | BlastScoreBlk structure to refer to (not cloned) [in] |
seqsrc | sequence source structure to clone [in] |
Definition at line 202 of file blast_traceback_mt_priv.c.
References BLAST_GapAlignSetUp(), Blast_HSPResultsNew(), BLASTERR_INVALIDPARAM, BLASTERR_MEMORY, BlastQueryInfoDup(), BlastSeqSrcCopy(), i, and BlastQueryInfo::num_queries.
Referenced by BLAST_ComputeTraceback(), and Blast_RunTracebackSearchWithInterrupt().
void SThreadLocalDataArrayTrim | ( | SThreadLocalDataArray * | array, |
Uint4 | actual_num_threads | ||
) |
Reduce the size of the array structure passed in to match the value of the actual_num_threads parameter.
array | structure to modify [in|out] |
actual_num_threads | number of threads that will be used during the MT traceback [in] |
Definition at line 62 of file blast_traceback_mt_priv.c.
References ASSERT, i, and SThreadLocalDataFree().
Referenced by BLAST_ComputeTraceback_MT().
SThreadLocalData* SThreadLocalDataFree | ( | SThreadLocalData * | tld | ) |
Deallocate the SThreadLocalData structure passed in.
tld | structure to deallocate [in] |
Definition at line 42 of file blast_traceback_mt_priv.c.
References BLAST_GapAlignStructFree(), Blast_HSPResultsFree(), BlastEffectiveLengthsParametersFree(), BlastExtensionParametersFree(), BlastHitSavingParametersFree(), BlastQueryInfoFree(), BlastScoringParametersFree(), BlastSeqSrcFree(), SThreadLocalData::eff_len_params, SThreadLocalData::ext_params, SThreadLocalData::gap_align, SThreadLocalData::hit_params, NULL, SThreadLocalData::query_info, SThreadLocalData::results, BlastGapAlignStruct::sbp, SThreadLocalData::score_params, SThreadLocalData::seqsrc, and sfree.
Referenced by Blast_RedoAlignmentCore_MT(), SThreadLocalDataArrayFree(), and SThreadLocalDataArrayTrim().
SThreadLocalData* SThreadLocalDataNew | ( | ) |
Allocate a new SThreadLocalData structure.
Definition at line 37 of file blast_traceback_mt_priv.c.
References calloc().
Referenced by SThreadLocalDataArrayNew().