Changeset 8175

Show
Ignore:
Timestamp:
30/10/11 21:34:50 (7 months ago)
Author:
eissler
Message:

Updated boost::atomic to solve some issues
deactivated some experimental PTPan code

Location:
branches/ptpan_back
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • branches/ptpan_back/ptpan/ptpan_tree.cxx

    r8081 r8175  
    946946        printf("Calc Probe Quality\n"); 
    947947#endif 
    948         if (dqh.dqh_Hits.size() < m_num_threads || m_num_threads <= 1) { 
     948// TODO get parallel code running        if (dqh.dqh_Hits.size() < m_num_threads || m_num_threads <= 1) { 
    949949            design_probes(dq, dqh); 
    950         } else { 
    951             std::size_t i = 0; 
    952             ULONG participators = m_num_threads; 
    953             for (; i < participators - 1; i++) { 
    954                 boost::threadpool::schedule( 
    955                         *m_threadpool, 
    956                         boost::bind(&PtpanTree::design_probes, this, 
    957                                 boost::ref(dq), boost::ref(dqh), i, 
    958                                 participators)); 
    959             } 
    960             design_probes(dq, dqh, i, participators); // main thread can do some work as well! 
    961             m_threadpool->wait(); 
    962         } 
     950//        } else { 
     951//            std::size_t i = 0; 
     952//            ULONG participators = m_num_threads; 
     953//            for (; i < participators - 1; i++) { 
     954//                boost::threadpool::schedule( 
     955//                        *m_threadpool, 
     956//                        boost::bind(&PtpanTree::design_probes, this, 
     957//                                boost::ref(dq), boost::ref(dqh), i, 
     958//                                participators)); 
     959//            } 
     960//            design_probes(dq, dqh, i, participators); // main thread can do some work as well! 
     961//            m_threadpool->wait(); 
     962//        } 
    963963        // remove invalid design hits! due to parallelization, we cannot do this before! 
    964964        boost::ptr_vector<DesignHit>::iterator dh; 
     
    43954395                        if (dqh.hitsAnyFeature(ht->ht_AbsPos, ht->ht_Entry, 
    43964396                                dq)) { 
    4397                             dh->dh_GroupHits++; 
     4397                            dh->dh_GroupHits++; // TODO FIXME should check for entries hit!! 
    43984398                        } else { 
    43994399                            // It's a non-group hit as it misses the marked features 
     
    44044404                        } 
    44054405                    } else { 
    4406                         dh->dh_GroupHits++; 
     4406                        dh->dh_GroupHits++; // TODO FIXME should check for entries hit!! 
    44074407                    } 
    44084408                } else { 
     
    44834483        SimilaritySearchQueryHandle& ssqh) const { 
    44844484 
    4485     if (ssqh.ssqh_filtered_seq_len < ssq.ssq_WindowSize || m_num_threads <= 1) { 
     4485    // TODO get parallel code running    if (ssqh.ssqh_filtered_seq_len < ssq.ssq_WindowSize || m_num_threads <= 1) { 
    44864486        ss_window_search(ssq, ssqh); 
    4487     } else { 
    4488         std::size_t i = 0; 
    4489         ULONG participators = m_num_threads; 
    4490         for (; i < participators - 1; i++) { 
    4491             boost::threadpool::schedule( 
    4492                     *m_threadpool, 
    4493                     boost::bind(&PtpanTree::ss_window_search, this, 
    4494                             boost::ref(ssq), boost::ref(ssqh), i, 
    4495                             participators)); 
    4496         } 
    4497         ss_window_search(ssq, ssqh, i, participators); // main thread can do some work as well! 
    4498         m_threadpool->wait(); 
    4499     } 
     4487//    } else { 
     4488//        std::size_t i = 0; 
     4489//        ULONG participators = m_num_threads; 
     4490//        for (; i < participators - 1; i++) { 
     4491//            boost::threadpool::schedule( 
     4492//                    *m_threadpool, 
     4493//                    boost::bind(&PtpanTree::ss_window_search, this, 
     4494//                            boost::ref(ssq), boost::ref(ssqh), i, 
     4495//                            participators)); 
     4496//        } 
     4497//        ss_window_search(ssq, ssqh, i, participators); // main thread can do some work as well! 
     4498//        m_threadpool->wait(); 
     4499//    } 
    45004500} 
    45014501