compile error

This commit is contained in:
Hieu Hoang 2016-03-03 10:55:38 +00:00
parent aa2e39ae19
commit 69e0ea0621
12 changed files with 33 additions and 34 deletions

View File

@ -11,12 +11,12 @@
</externalSetting>
</externalSettings>
<extensions>
<extension id="org.eclipse.cdt.core.MachO64" point="org.eclipse.cdt.core.BinaryParser"/>
<extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/>
<extension id="org.eclipse.cdt.core.GmakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.CWDLocator" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.MachO64" point="org.eclipse.cdt.core.BinaryParser"/>
<extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/>
</extensions>
</storageModule>
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
@ -72,13 +72,13 @@
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="cdt.managedbuild.config.macosx.exe.release.701931933" moduleId="org.eclipse.cdt.core.settings" name="Release">
<externalSettings/>
<extensions>
<extension id="org.eclipse.cdt.core.MachO64" point="org.eclipse.cdt.core.BinaryParser"/>
<extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/>
<extension id="org.eclipse.cdt.core.GmakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.CWDLocator" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.MachO64" point="org.eclipse.cdt.core.BinaryParser"/>
<extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/>
</extensions>
</storageModule>
<storageModule moduleId="cdtBuildSystem" version="4.0.0">

View File

@ -11,11 +11,11 @@
</externalSetting>
</externalSettings>
<extensions>
<extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/>
<extension id="org.eclipse.cdt.core.GmakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.CWDLocator" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/>
</extensions>
</storageModule>
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
@ -85,12 +85,12 @@
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="cdt.managedbuild.config.gnu.exe.release.1911984684" moduleId="org.eclipse.cdt.core.settings" name="Release">
<externalSettings/>
<extensions>
<extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/>
<extension id="org.eclipse.cdt.core.GmakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.CWDLocator" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/>
</extensions>
</storageModule>
<storageModule moduleId="cdtBuildSystem" version="4.0.0">

View File

@ -11,16 +11,16 @@
</externalSetting>
</externalSettings>
<extensions>
<extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/>
<extension id="org.eclipse.cdt.core.MachO64" point="org.eclipse.cdt.core.BinaryParser"/>
<extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.GmakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.CWDLocator" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/>
<extension id="org.eclipse.cdt.core.MachO64" point="org.eclipse.cdt.core.BinaryParser"/>
</extensions>
</storageModule>
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
<configuration artifactExtension="a" artifactName="${ProjName}" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.staticLib" buildProperties="org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.staticLib,org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.debug" cleanCommand="rm -rf" description="" id="cdt.managedbuild.config.gnu.cross.exe.debug.1097293041" name="Debug" parent="cdt.managedbuild.config.gnu.cross.exe.debug">
<configuration artifactExtension="a" artifactName="${ProjName}" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.staticLib" buildProperties="org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.debug,org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.staticLib" cleanCommand="rm -rf" description="" id="cdt.managedbuild.config.gnu.cross.exe.debug.1097293041" name="Debug" parent="cdt.managedbuild.config.gnu.cross.exe.debug">
<folderInfo id="cdt.managedbuild.config.gnu.cross.exe.debug.1097293041." name="/" resourcePath="">
<toolChain id="cdt.managedbuild.toolchain.gnu.cross.exe.debug.329828208" name="Cross GCC" superClass="cdt.managedbuild.toolchain.gnu.cross.exe.debug">
<targetPlatform archList="all" binaryParser="org.eclipse.cdt.core.ELF;org.eclipse.cdt.core.MachO64" id="cdt.managedbuild.targetPlatform.gnu.cross.389137927" isAbstract="false" osList="all" superClass="cdt.managedbuild.targetPlatform.gnu.cross"/>
@ -93,9 +93,6 @@
</tool>
</toolChain>
</folderInfo>
<fileInfo id="cdt.managedbuild.config.gnu.cross.exe.debug.1097293041.741482791" name="HypothesisColl.cpp" rcbsApplicability="disable" resourcePath="HypothesisColl.cpp" toolsToInvoke="cdt.managedbuild.tool.gnu.cross.cpp.compiler.1686613508.399235730">
<tool id="cdt.managedbuild.tool.gnu.cross.cpp.compiler.1686613508.399235730" name="Cross G++ Compiler" superClass="cdt.managedbuild.tool.gnu.cross.cpp.compiler.1686613508"/>
</fileInfo>
<fileInfo id="cdt.managedbuild.config.gnu.cross.exe.debug.1097293041.1123771618" name="HypothesisColl.h" rcbsApplicability="disable" resourcePath="HypothesisColl.h" toolsToInvoke=""/>
<sourceEntries>
<entry excluding="defer|Main.cpp|CreateProbingPT2.cpp" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>
@ -108,13 +105,13 @@
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="cdt.managedbuild.config.gnu.cross.exe.release.1445209421" moduleId="org.eclipse.cdt.core.settings" name="Release">
<externalSettings/>
<extensions>
<extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/>
<extension id="org.eclipse.cdt.core.MachO64" point="org.eclipse.cdt.core.BinaryParser"/>
<extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.GmakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.CWDLocator" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/>
<extension id="org.eclipse.cdt.core.MachO64" point="org.eclipse.cdt.core.BinaryParser"/>
</extensions>
</storageModule>
<storageModule moduleId="cdtBuildSystem" version="4.0.0">

View File

@ -11,7 +11,7 @@
#include "ManagerBase.h"
#include "TargetPhrases.h"
#include "Phrase.h"
#include "InputPaths.h"
#include "InputPathsBase.h"
#include "InputPathBase.h"
#include "TranslationModel/PhraseTable.h"
#include "legacy/Range.h"

View File

@ -52,7 +52,7 @@ void PhraseTable::SetParameter(const std::string& key, const std::string& value)
}
}
void PhraseTable::Lookup(const Manager &mgr, InputPaths &inputPaths) const
void PhraseTable::Lookup(const Manager &mgr, InputPathsBase &inputPaths) const
{
BOOST_FOREACH(InputPathBase *pathBase, inputPaths) {
InputPath *path = static_cast<InputPath*>(pathBase);
@ -75,7 +75,7 @@ void PhraseTable::Lookup(const Manager &mgr, InputPaths &inputPaths) const
}
TargetPhrases *PhraseTable::Lookup(const Manager &mgr, MemPool &pool, InputPath &inputPath) const
TargetPhrases *PhraseTable::Lookup(const Manager &mgr, MemPool &pool, InputPathBase &inputPath) const
{
UTIL_THROW2("Not implemented");
}

View File

@ -16,8 +16,8 @@ namespace Moses2
{
class System;
class InputPaths;
class InputPath;
class InputPathsBase;
class InputPathBase;
class Manager;
////////////////////////////////////////////////////////////////////////
@ -28,8 +28,8 @@ public:
virtual ~PhraseTable();
virtual void SetParameter(const std::string& key, const std::string& value);
virtual void Lookup(const Manager &mgr, InputPaths &inputPaths) const;
virtual TargetPhrases *Lookup(const Manager &mgr, MemPool &pool, InputPath &inputPath) const;
virtual void Lookup(const Manager &mgr, InputPathsBase &inputPaths) const;
virtual TargetPhrases *Lookup(const Manager &mgr, MemPool &pool, InputPathBase &inputPath) const;
void SetPtInd(size_t ind)
{ m_ptInd = ind; }

View File

@ -10,12 +10,14 @@
#include "PhraseTableMemory.h"
#include "../PhraseImpl.h"
#include "../Phrase.h"
#include "../PhraseBased/TargetPhraseImpl.h"
#include "../System.h"
#include "../Scores.h"
#include "../InputPaths.h"
#include "../InputPathsBase.h"
#include "../legacy/InputFileStream.h"
#include "../PhraseBased/InputPath.h"
#include "../PhraseBased/TargetPhraseImpl.h"
#include "../SCFG/PhraseImpl.h"
#include "../SCFG/TargetPhraseImpl.h"
@ -172,7 +174,7 @@ void PhraseTableMemory::Load(System &system)
m_root.SortAndPrune(m_tableLimit, systemPool, system);
}
TargetPhrases* PhraseTableMemory::Lookup(const Manager &mgr, MemPool &pool, InputPath &inputPath) const
TargetPhrases* PhraseTableMemory::Lookup(const Manager &mgr, MemPool &pool, InputPathBase &inputPath) const
{
const SubPhrase &phrase = inputPath.subPhrase;
TargetPhrases *tps = m_root.Find(phrase);

View File

@ -41,7 +41,7 @@ public:
virtual ~PhraseTableMemory();
virtual void Load(System &system);
virtual TargetPhrases *Lookup(const Manager &mgr, MemPool &pool, InputPath &inputPath) const;
virtual TargetPhrases *Lookup(const Manager &mgr, MemPool &pool, InputPathBase &inputPath) const;
protected:
Node m_root;

View File

@ -89,7 +89,7 @@ void ProbingPT::Load(System &system)
CreateCache(system);
}
void ProbingPT::Lookup(const Manager &mgr, InputPaths &inputPaths) const
void ProbingPT::Lookup(const Manager &mgr, InputPathsBase &inputPaths) const
{
BOOST_FOREACH(InputPathBase *pathBase, inputPaths) {
InputPath *path = static_cast<InputPath*>(pathBase);
@ -101,7 +101,7 @@ void ProbingPT::Lookup(const Manager &mgr, InputPaths &inputPaths) const
TargetPhrases* ProbingPT::Lookup(const Manager &mgr,
MemPool &pool,
InputPath &inputPath) const
InputPathBase &inputPath) const
{
/*
if (inputPath.prefixPath && inputPath.prefixPath->GetTargetPhrases(*this) == NULL) {

View File

@ -31,7 +31,7 @@ public:
virtual ~ProbingPT();
void Load(System &system);
void Lookup(const Manager &mgr, InputPaths &inputPaths) const;
void Lookup(const Manager &mgr, InputPathsBase &inputPaths) const;
protected:
std::vector<uint64_t> m_sourceVocab; // factor id -> pt id
@ -47,7 +47,7 @@ protected:
TargetPhrases *Lookup(const Manager &mgr,
MemPool &pool,
InputPath &inputPath) const;
InputPathBase &inputPath) const;
TargetPhrases *CreateTargetPhrase(MemPool &pool,
const System &system,
const Phrase &sourcePhrase,

View File

@ -25,7 +25,7 @@ UnknownWordPenalty::~UnknownWordPenalty() {
// TODO Auto-generated destructor stub
}
void UnknownWordPenalty::Lookup(const Manager &mgr, InputPaths &inputPaths) const
void UnknownWordPenalty::Lookup(const Manager &mgr, InputPathsBase &inputPaths) const
{
BOOST_FOREACH(InputPathBase *pathBase, inputPaths) {
InputPath *path = static_cast<InputPath*>(pathBase);
@ -38,7 +38,7 @@ void UnknownWordPenalty::Lookup(const Manager &mgr, InputPaths &inputPaths) cons
}
TargetPhrases *UnknownWordPenalty::Lookup(const Manager &mgr, MemPool &pool, InputPath &inputPath) const
TargetPhrases *UnknownWordPenalty::Lookup(const Manager &mgr, MemPool &pool, InputPathBase &inputPath) const
{
const System &system = mgr.system;
@ -52,7 +52,7 @@ TargetPhrases *UnknownWordPenalty::Lookup(const Manager &mgr, MemPool &pool, Inp
// any other pt translate this?
size_t numPt = mgr.system.mappings.size();
const TargetPhrases **allTPS = inputPath.targetPhrases;
const TargetPhrases **allTPS = static_cast<InputPath&>(inputPath).targetPhrases;
for (size_t i = 0; i < numPt; ++i) {
const TargetPhrases *otherTps = allTPS[i];

View File

@ -18,8 +18,8 @@ public:
UnknownWordPenalty(size_t startInd, const std::string &line);
virtual ~UnknownWordPenalty();
void Lookup(const Manager &mgr, InputPaths &inputPaths) const;
virtual TargetPhrases *Lookup(const Manager &mgr, MemPool &pool, InputPath &inputPath) const;
void Lookup(const Manager &mgr, InputPathsBase &inputPaths) const;
virtual TargetPhrases *Lookup(const Manager &mgr, MemPool &pool, InputPathBase &inputPath) const;
virtual void
EvaluateInIsolation(const System &system,