Merge branch 'perf_moses2' of github.com:hieuhoang/mosesdecoder into perf_moses2

This commit is contained in:
Hieu Hoang 2017-01-01 22:56:38 +00:00
commit a74ce0ef8e
5 changed files with 4 additions and 4 deletions

View File

@ -183,7 +183,6 @@ requirements += [ option.get "with-mm" : : <define>MAX_NUM_FACTORS=4 ] ;
requirements += [ option.get "unlabelled-source" : : <define>UNLABELLED_SOURCE ] ;
if [ option.get "with-oxlm" ] {
external-lib boost_serialization ;
external-lib gomp ;
requirements += <library>boost_serialization ;
requirements += <library>gomp ;

View File

@ -60,6 +60,7 @@ void ReorderingConstraint::FinalizeWalls()
void ReorderingConstraint::SetWall( size_t pos, bool value )
{
//cerr << "SETTING reordering wall at position " << pos << std::endl;
UTIL_THROW_IF2(pos >= m_size, "Wall over length of sentence: " << pos << " >= " << m_size);
m_wall[pos] = value;
m_active = true;
}

View File

@ -84,7 +84,7 @@ Sentence *Sentence::CreateFromStringXML(MemPool &pool, FactorCollection &vocab,
for(size_t i=0; i<xmlOptions.size(); i++) {
const XMLOption *xmlOption = xmlOptions[i];
if(strcmp(xmlOption->GetNodeName(), "wall") == 0) {
UTIL_THROW_IF2(xmlOption->startPos >= ret->GetSize(), "wall is beyond the sentence"); // no buggy walls, please
UTIL_THROW_IF2(xmlOption->startPos > ret->GetSize(), "wall is beyond the sentence"); // no buggy walls, please
reorderingConstraint.SetWall(xmlOption->startPos - 1, true);
}
else if (strcmp(xmlOption->GetNodeName(), "zone") == 0) {

View File

@ -36,7 +36,7 @@ namespace sapt
#ifndef SPTR
#define SPTR boost::shared_ptr
#endif
#define iptr boost::intrusive_ptr
#define boost_iptr boost::intrusive_ptr
#define scoptr boost::scoped_ptr
#define rcast reinterpret_cast
#endif

View File

@ -76,7 +76,7 @@ int main(int argc, char* argv[])
{
typedef vector<PhrasePair<Token> > pplist_t;
interpret_args(argc, argv);
iptr<mmbitext> Bptr(new mmbitext);
boost_iptr<mmbitext> Bptr(new mmbitext);
mmbitext& B = *Bptr;// static_cast<mmbitext*>(Bptr.get());
B.open(bname, L1, L2);
B.V1->setDynamic(true);