diff options
author | Hieu Hoang <hieuhoang@gmail.com> | 2015-06-24 17:31:05 +0300 |
---|---|---|
committer | Hieu Hoang <hieuhoang@gmail.com> | 2015-06-24 17:31:05 +0300 |
commit | 555f91eb7ec79cc69e1b18889fd17217d3425389 (patch) | |
tree | 482f2cfb1dc60363b814718c148bf4780b9e9dc9 | |
parent | bac5c2e55c1b2454328bf18207b6d9633d2b9adf (diff) |
codelite
-rw-r--r-- | contrib/other-builds/all.workspace | 5 | ||||
-rw-r--r-- | contrib/other-builds/moses-cmd/moses-cmd.project | 14 | ||||
-rw-r--r-- | contrib/other-builds/moses/moses.project | 4 | ||||
-rw-r--r-- | contrib/other-builds/pruneGeneration/pruneGeneration.project | 97 | ||||
-rw-r--r-- | misc/pruneGeneration.cpp | 7 | ||||
-rw-r--r-- | misc/pruneGeneration.h | 1 |
6 files changed, 111 insertions, 17 deletions
diff --git a/contrib/other-builds/all.workspace b/contrib/other-builds/all.workspace index 621bafdc2..5a7eaf114 100644 --- a/contrib/other-builds/all.workspace +++ b/contrib/other-builds/all.workspace @@ -9,7 +9,8 @@ <Project Name="moses-cmd" Path="moses-cmd/moses-cmd.project" Active="No"/> <Project Name="score" Path="score/score.project" Active="No"/> <Project Name="consolidate" Path="consolidate/consolidate.project" Active="No"/> - <Project Name="moses" Path="moses/moses.project" Active="Yes"/> + <Project Name="moses" Path="moses/moses.project" Active="No"/> + <Project Name="pruneGeneration" Path="pruneGeneration/pruneGeneration.project" Active="Yes"/> <BuildMatrix> <WorkspaceConfiguration Name="Debug" Selected="yes"> <Project Name="manual-label" ConfigName="Debug"/> @@ -23,6 +24,7 @@ <Project Name="score" ConfigName="Debug"/> <Project Name="consolidate" ConfigName="Debug"/> <Project Name="moses" ConfigName="Debug"/> + <Project Name="pruneGeneration" ConfigName="Debug"/> </WorkspaceConfiguration> <WorkspaceConfiguration Name="Release" Selected="yes"> <Project Name="manual-label" ConfigName="Release"/> @@ -36,6 +38,7 @@ <Project Name="score" ConfigName="Release"/> <Project Name="consolidate" ConfigName="Release"/> <Project Name="moses" ConfigName="Release"/> + <Project Name="pruneGeneration" ConfigName="Release"/> </WorkspaceConfiguration> </BuildMatrix> </CodeLite_Workspace> diff --git a/contrib/other-builds/moses-cmd/moses-cmd.project b/contrib/other-builds/moses-cmd/moses-cmd.project index ac567ffce..44a0d621f 100644 --- a/contrib/other-builds/moses-cmd/moses-cmd.project +++ b/contrib/other-builds/moses-cmd/moses-cmd.project @@ -26,13 +26,6 @@ <File Name="../../../moses-cmd/MainVW.cpp" ExcludeProjConfig="Debug"/> <File Name="../../../moses-cmd/MainVW.h" ExcludeProjConfig="Debug"/> </VirtualDirectory> - <Dependencies Name="Debug"> - <Project Name="OnDiskPt"/> - <Project Name="lm"/> - <Project Name="search"/> - <Project Name="util"/> - </Dependencies> - <Dependencies Name="Release"/> <Settings Type="Executable"> <GlobalSettings> <Compiler Options="" C_Options="" Assembler=""> @@ -150,4 +143,11 @@ </Completion> </Configuration> </Settings> + <Dependencies Name="Debug"> + <Project Name="OnDiskPt"/> + <Project Name="lm"/> + <Project Name="search"/> + <Project Name="util"/> + </Dependencies> + <Dependencies Name="Release"/> </CodeLite_Project> diff --git a/contrib/other-builds/moses/moses.project b/contrib/other-builds/moses/moses.project index 81072d667..0fbd942c6 100644 --- a/contrib/other-builds/moses/moses.project +++ b/contrib/other-builds/moses/moses.project @@ -793,8 +793,6 @@ <File Name="../../../moses/PP/SpanLengthPhraseProperty.h"/> <File Name="../../../moses/PP/TreeStructurePhraseProperty.h"/> </VirtualDirectory> - <Dependencies Name="Debug"/> - <Dependencies Name="Release"/> <VirtualDirectory Name="parameters"> <File Name="../../../moses/parameters/ContextParameters.cpp"/> <File Name="../../../moses/parameters/ContextParameters.h"/> @@ -897,4 +895,6 @@ </Completion> </Configuration> </Settings> + <Dependencies Name="Debug"/> + <Dependencies Name="Release"/> </CodeLite_Project> diff --git a/contrib/other-builds/pruneGeneration/pruneGeneration.project b/contrib/other-builds/pruneGeneration/pruneGeneration.project new file mode 100644 index 000000000..7060d55ea --- /dev/null +++ b/contrib/other-builds/pruneGeneration/pruneGeneration.project @@ -0,0 +1,97 @@ +<?xml version="1.0" encoding="UTF-8"?> +<CodeLite_Project Name="pruneGeneration" InternalType="Console"> + <Description/> + <Dependencies/> + <Settings Type="Executable"> + <GlobalSettings> + <Compiler Options="" C_Options="" Assembler=""> + <IncludePath Value="."/> + </Compiler> + <Linker Options=""> + <LibraryPath Value="."/> + </Linker> + <ResourceCompiler Options=""/> + </GlobalSettings> + <Configuration Name="Debug" CompilerType="GCC ( XCode )" DebuggerType="LLDB Debugger" Type="Executable" BuildCmpWithGlobalSettings="append" BuildLnkWithGlobalSettings="append" BuildResWithGlobalSettings="append"> + <Compiler Options="-g;-O0;-Wall" C_Options="-g;-O0;-Wall" Assembler="" Required="yes" PreCompiledHeader="" PCHInCommandLine="no" PCHFlags="" PCHFlagsPolicy="0"> + <IncludePath Value="."/> + </Compiler> + <Linker Options="" Required="yes"/> + <ResourceCompiler Options="" Required="no"/> + <General OutputFile="$(IntermediateDirectory)/$(ProjectName)" IntermediateDirectory="./Debug" Command="./$(ProjectName)" CommandArguments="" UseSeparateDebugArgs="no" DebugArguments="" WorkingDirectory="$(IntermediateDirectory)" PauseExecWhenProcTerminates="yes" IsGUIProgram="no" IsEnabled="yes"/> + <Environment EnvVarSetName="<Use Defaults>" DbgSetName="<Use Defaults>"> + <![CDATA[]]> + </Environment> + <Debugger IsRemote="no" RemoteHostName="" RemoteHostPort="" DebuggerPath="" IsExtended="yes"> + <DebuggerSearchPaths/> + <PostConnectCommands/> + <StartupCommands/> + </Debugger> + <PreBuild/> + <PostBuild/> + <CustomBuild Enabled="no"> + <RebuildCommand/> + <CleanCommand/> + <BuildCommand/> + <PreprocessFileCommand/> + <SingleFileCommand/> + <MakefileGenerationCommand/> + <ThirdPartyToolName>None</ThirdPartyToolName> + <WorkingDirectory/> + </CustomBuild> + <AdditionalRules> + <CustomPostBuild/> + <CustomPreBuild/> + </AdditionalRules> + <Completion EnableCpp11="no" EnableCpp14="no"> + <ClangCmpFlagsC/> + <ClangCmpFlags/> + <ClangPP/> + <SearchPaths/> + </Completion> + </Configuration> + <Configuration Name="Release" CompilerType="GCC ( XCode )" DebuggerType="LLDB Debugger" Type="Executable" BuildCmpWithGlobalSettings="append" BuildLnkWithGlobalSettings="append" BuildResWithGlobalSettings="append"> + <Compiler Options="-O2;-Wall" C_Options="-O2;-Wall" Assembler="" Required="yes" PreCompiledHeader="" PCHInCommandLine="no" PCHFlags="" PCHFlagsPolicy="0"> + <IncludePath Value="."/> + <Preprocessor Value="NDEBUG"/> + </Compiler> + <Linker Options="" Required="yes"/> + <ResourceCompiler Options="" Required="no"/> + <General OutputFile="$(IntermediateDirectory)/$(ProjectName)" IntermediateDirectory="./Release" Command="./$(ProjectName)" CommandArguments="" UseSeparateDebugArgs="no" DebugArguments="" WorkingDirectory="$(IntermediateDirectory)" PauseExecWhenProcTerminates="yes" IsGUIProgram="no" IsEnabled="yes"/> + <Environment EnvVarSetName="<Use Defaults>" DbgSetName="<Use Defaults>"> + <![CDATA[]]> + </Environment> + <Debugger IsRemote="no" RemoteHostName="" RemoteHostPort="" DebuggerPath="" IsExtended="no"> + <DebuggerSearchPaths/> + <PostConnectCommands/> + <StartupCommands/> + </Debugger> + <PreBuild/> + <PostBuild/> + <CustomBuild Enabled="no"> + <RebuildCommand/> + <CleanCommand/> + <BuildCommand/> + <PreprocessFileCommand/> + <SingleFileCommand/> + <MakefileGenerationCommand/> + <ThirdPartyToolName>None</ThirdPartyToolName> + <WorkingDirectory/> + </CustomBuild> + <AdditionalRules> + <CustomPostBuild/> + <CustomPreBuild/> + </AdditionalRules> + <Completion EnableCpp11="no" EnableCpp14="no"> + <ClangCmpFlagsC/> + <ClangCmpFlags/> + <ClangPP/> + <SearchPaths/> + </Completion> + </Configuration> + </Settings> + <VirtualDirectory Name="src"> + <File Name="../../../misc/pruneGeneration.cpp"/> + <File Name="../../../misc/pruneGeneration.h"/> + </VirtualDirectory> +</CodeLite_Project> diff --git a/misc/pruneGeneration.cpp b/misc/pruneGeneration.cpp index 275d599df..19ae2184f 100644 --- a/misc/pruneGeneration.cpp +++ b/misc/pruneGeneration.cpp @@ -42,7 +42,7 @@ int main(int argc, char **argv) void Output(int limit, vector<Rec> &records) { - Prune(limit, records); + std::sort(records.rbegin(), records.rend()); for (size_t i = 0; i < limit && i < records.size(); ++i) { const Rec &rec = records[i]; @@ -50,8 +50,3 @@ void Output(int limit, vector<Rec> &records) } } -void Prune(int limit, std::vector<Rec> &records) -{ - std::sort(records.rbegin(), records.rend()); - -} diff --git a/misc/pruneGeneration.h b/misc/pruneGeneration.h index 693c5f149..470e607d4 100644 --- a/misc/pruneGeneration.h +++ b/misc/pruneGeneration.h @@ -21,7 +21,6 @@ public: //////////////////////////////////////////////////////////// void Output(int limit, std::vector<Rec> &records); -void Prune(int limit, std::vector<Rec> &records); //////////////////////////////////////////////////////////// inline void Tokenize(std::vector<std::string> &output |