Embryo of code for openMP parallelization of LCS alignment but

deactivated for now because can't make it compile with cython/clang
This commit is contained in:
Celine Mercier
2016-12-20 11:46:58 +01:00
parent 9c71b06117
commit 5c50e5b378
3 changed files with 27 additions and 6 deletions

View File

@ -9,6 +9,10 @@
* @brief Functions handling LCS sequence alignments.
*/
//#define OMP_SUPPORT // TODO
#ifdef OMP_SUPPORT
#include <omp.h>
#endif
#include <stdlib.h>
#include <stdio.h>
@ -389,7 +393,8 @@ int obi_lcs_align_one_column(OBIDMS_p dms, const char* seq_view_name, const char
const char* id_column_name,
const char* output_view_name, const char* output_view_comments,
bool print_seq, bool print_count,
double threshold, bool normalize, int reference, bool similarity_mode)
double threshold, bool normalize, int reference, bool similarity_mode,
int thread_count)
{
index_t i, j, k;
index_t seq_count;
@ -537,6 +542,11 @@ int obi_lcs_align_one_column(OBIDMS_p dms, const char* seq_view_name, const char
seq_count = (seq_view->infos)->line_count;
#ifdef OMP_SUPPORT
omp_set_num_threads(thread_count);
#pragma omp parallel for
#endif
for (i=0; i < (seq_count - 1); i++)
{
if (i%100 == 0)

View File

@ -92,7 +92,8 @@ int obi_lcs_align_one_column(OBIDMS_p dms,
const char* id_column_name,
const char* output_view_name, const char* output_view_comments,
bool print_seq, bool print_count,
double threshold, bool normalize, int reference, bool similarity_mode);
double threshold, bool normalize, int reference, bool similarity_mode,
int thread_count);
/**