single threaded build compiles & passes regression

This commit is contained in:
Hieu Hoang 2013-07-01 17:37:24 +01:00
parent 1a8977d890
commit d203f2bb6e
3 changed files with 17 additions and 2 deletions

View File

@ -7,10 +7,14 @@
#include "moses/TargetPhraseCollection.h"
#include "moses/TranslationModel/PhraseDictionary.h"
#include "util/check.hh"
#include <boost/thread/tss.hpp>
#include <vector>
#ifdef WITH_THREADS
#include <boost/thread/tss.hpp>
#else
#include <boost/scoped_ptr.hpp>
#endif
namespace Moses
{
@ -26,7 +30,11 @@ class PhraseDictionaryTreeAdaptor : public PhraseDictionary
{
typedef PhraseDictionary MyBase;
#ifdef WITH_THREADS
boost::thread_specific_ptr<PDTAimp> m_implementation;
#else
boost::scoped_ptr<PDTAimp> m_implementation;
#endif
friend class PDTAimp;
PhraseDictionaryTreeAdaptor();

View File

@ -32,6 +32,8 @@
#ifdef WITH_THREADS
#include <boost/thread/tss.hpp>
#else
#include <boost/scoped_ptr.hpp>
#endif
namespace Moses
@ -47,7 +49,11 @@ class PhraseDictionaryOnDisk : public PhraseDictionary
friend std::ostream& operator<<(std::ostream&, const PhraseDictionaryOnDisk&);
protected:
#ifdef WITH_THREADS
boost::thread_specific_ptr<OnDiskPt::OnDiskWrapper> m_implementation;
#else
boost::scoped_ptr<OnDiskPt::OnDiskWrapper> m_implementation;
#endif
OnDiskPt::OnDiskWrapper &GetImplementation();
const OnDiskPt::OnDiskWrapper &GetImplementation() const;

View File

@ -21,6 +21,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
***********************************************************************/
#include <algorithm>
#include <typeinfo>
#include "TranslationOptionCollection.h"
#include "Sentence.h"
#include "DecodeStep.h"