mirror of
https://github.com/moses-smt/mosesdecoder.git
synced 2024-09-19 07:07:24 +03:00
Merge branch 'perf_moses2' of github.com:hieuhoang/mosesdecoder into perf_moses2
This commit is contained in:
commit
a74ce0ef8e
1
Jamroot
1
Jamroot
@ -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 ;
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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) {
|
||||
|
@ -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
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user