removed several #includes of Windows.h and WinBase.h which seemed to be unnecessary (what dealing does SGD.h have with Windows?);

dummy GCC version of hostname()
This commit is contained in:
Frank Seide 2014-11-03 14:17:44 -08:00
Родитель 295d951fbc
Коммит 53f7f95fa8
8 изменённых файлов: 125 добавлений и 43 удалений

Просмотреть файл

@ -7,6 +7,9 @@
#pragma once
#include <string>
#ifdef _WIN32
#include <WinSock.h> // Note: this may conflict with WinSock2.h users (dup definition errors; don't know a general solution)
#pragma comment(lib, "ws2_32.lib")
@ -38,3 +41,7 @@ public:
assign (hostname);
}
};
#else // __unix__
std::string GetHostName() { return "localhost"; } // TODO: implement this for Linux/GCC
#endif

Просмотреть файл

@ -13,8 +13,8 @@
#include "basetypes.h"
#include "fileutil.h"
#include "commandArgUtil.h"
#include <Windows.h>
#include <WinBase.h>
//#include <Windows.h>
//#include <WinBase.h>
#include <fstream>
using namespace std;

Просмотреть файл

@ -14,9 +14,6 @@
#include "basetypes.h"
#include "fileutil.h"
#include "commandArgUtil.h"
#include <Windows.h>
#include <WinBase.h>
#include <Windows.h>
#include <chrono>
#include <random>

Просмотреть файл

@ -14,8 +14,6 @@
#include "basetypes.h"
#include "fileutil.h"
#include "commandArgUtil.h"
#include <Windows.h>
#include <WinBase.h>
#include <fstream>
using namespace std;

Просмотреть файл

@ -14,8 +14,6 @@
#include "basetypes.h"
#include "fileutil.h"
#include "commandArgUtil.h"
#include <Windows.h>
#include <WinBase.h>
#include <fstream>
using namespace std;

Просмотреть файл

@ -25,7 +25,6 @@
#include <algorithm>
#include "io.h"
#include "hostname.h"
#include <windows.h>
#ifdef LEAKDETECT
#include "vld.h" // for memory leak detection
#endif

Просмотреть файл

@ -219,6 +219,7 @@
<ClInclude Include="..\..\Common\Include\DataWriter.h" />
<ClInclude Include="..\..\Common\Include\File.h" />
<ClInclude Include="..\..\Common\Include\fileutil.h" />
<ClInclude Include="..\..\Common\Include\hostname.h" />
<ClInclude Include="..\..\Common\Include\nvml.h" />
<ClInclude Include="CompositeComputationNode.h" />
<ClInclude Include="ComputationNetwork.h" />

Просмотреть файл

@ -16,17 +16,33 @@
<ClCompile Include="..\..\Common\File.cpp">
<Filter>Common</Filter>
</ClCompile>
<ClCompile Include="NetworkDescriptionLanguage.cpp">
<Filter>Common</Filter>
</ClCompile>
<ClCompile Include="..\..\Common\fileutil.cpp">
<Filter>Common</Filter>
</ClCompile>
<ClCompile Include="cn.cpp" />
<ClCompile Include="ComputationNode.cpp" />
<ClCompile Include="ModelEditLanguage.cpp" />
<ClCompile Include="PTaskGraphBuilder.cpp" />
<ClCompile Include="SimpleNetworkBuilder.cpp" />
<ClCompile Include="stdafx.cpp" />
<ClCompile Include="tests.cpp" />
<ClCompile Include="NetworkDescriptionLanguage.cpp" />
<ClCompile Include="ModelEditLanguage.cpp">
<Filter>Model Editing</Filter>
</ClCompile>
<ClCompile Include="ComputationNode.cpp">
<Filter>Nodes</Filter>
</ClCompile>
<ClCompile Include="PTaskGraphBuilder.cpp">
<Filter>Execution Engine</Filter>
</ClCompile>
<ClCompile Include="SimpleNetworkBuilder.cpp">
<Filter>Network</Filter>
</ClCompile>
<ClCompile Include="cn.cpp">
<Filter>Main</Filter>
</ClCompile>
<ClCompile Include="stdafx.cpp">
<Filter>Main</Filter>
</ClCompile>
<ClCompile Include="tests.cpp">
<Filter>Main</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\..\Common\Include\basetypes.h">
@ -56,35 +72,86 @@
<ClInclude Include="..\..\Common\Include\DataWriter.h">
<Filter>Common\Include</Filter>
</ClInclude>
<ClInclude Include="CompositeComputationNode.h" />
<ClInclude Include="ComputationNetwork.h" />
<ClInclude Include="ComputationNetworkHelper.h" />
<ClInclude Include="ComputationNode.h" />
<ClInclude Include="EvaluationCriterionNode.h" />
<ClInclude Include="IComputationNetBuilder.h" />
<ClInclude Include="IExecutionEngine.h" />
<ClInclude Include="ModelEditLanguage.h" />
<ClInclude Include="NDLNetworkBuilder.h" />
<ClInclude Include="NDLUtil.h" />
<ClInclude Include="PTask.h" />
<ClInclude Include="PTaskGraphBuilder.h" />
<ClInclude Include="SGD.h" />
<ClInclude Include="SimpleEvaluator.h" />
<ClInclude Include="SimpleNetworkBuilder.h" />
<ClInclude Include="SimpleOutputWriter.h" />
<ClInclude Include="stdafx.h" />
<ClInclude Include="SynchronousExecutionEngine.h" />
<ClInclude Include="targetver.h" />
<ClInclude Include="TrainingCriterionNode.h" />
<ClInclude Include="ComputationNetwork.h">
<Filter>Network</Filter>
</ClInclude>
<ClInclude Include="ComputationNetworkHelper.h">
<Filter>Network</Filter>
</ClInclude>
<ClInclude Include="IComputationNetBuilder.h">
<Filter>Network</Filter>
</ClInclude>
<ClInclude Include="IExecutionEngine.h">
<Filter>Execution Engine</Filter>
</ClInclude>
<ClInclude Include="ModelEditLanguage.h">
<Filter>Model Editing</Filter>
</ClInclude>
<ClInclude Include="CompositeComputationNode.h">
<Filter>Nodes</Filter>
</ClInclude>
<ClInclude Include="ComputationNode.h">
<Filter>Nodes</Filter>
</ClInclude>
<ClInclude Include="EvaluationCriterionNode.h">
<Filter>Nodes</Filter>
</ClInclude>
<ClInclude Include="NDLNetworkBuilder.h">
<Filter>Network</Filter>
</ClInclude>
<ClInclude Include="NDLUtil.h">
<Filter>Network</Filter>
</ClInclude>
<ClInclude Include="NetworkDescriptionLanguage.h">
<Filter>Common</Filter>
<Filter>Network</Filter>
</ClInclude>
<ClInclude Include="SimpleEvaluator.h">
<Filter>Network</Filter>
</ClInclude>
<ClInclude Include="PTask.h">
<Filter>Execution Engine</Filter>
</ClInclude>
<ClInclude Include="PTaskGraphBuilder.h">
<Filter>Execution Engine</Filter>
</ClInclude>
<ClInclude Include="SimpleNetworkBuilder.h">
<Filter>Network</Filter>
</ClInclude>
<ClInclude Include="SimpleOutputWriter.h">
<Filter>Network</Filter>
</ClInclude>
<ClInclude Include="SGD.h">
<Filter>Network</Filter>
</ClInclude>
<ClInclude Include="SynchronousExecutionEngine.h">
<Filter>Execution Engine</Filter>
</ClInclude>
<ClInclude Include="TrainingCriterionNode.h">
<Filter>Nodes</Filter>
</ClInclude>
<ClInclude Include="stdafx.h">
<Filter>Main</Filter>
</ClInclude>
<ClInclude Include="targetver.h">
<Filter>Main</Filter>
</ClInclude>
<ClInclude Include="..\..\Common\Include\hostname.h">
<Filter>Common\Include</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<Text Include="config.txt" />
<Text Include="DefaultMacros.txt" />
<Text Include="modelEditor.txt" />
<Text Include="modelEditorFromScratch.txt" />
<Text Include="modelEditor.txt">
<Filter>Model Editing</Filter>
</Text>
<Text Include="modelEditorFromScratch.txt">
<Filter>Model Editing</Filter>
</Text>
<Text Include="config.txt">
<Filter>Main</Filter>
</Text>
<Text Include="DefaultMacros.txt">
<Filter>Main</Filter>
</Text>
</ItemGroup>
<ItemGroup>
<Filter Include="Common">
@ -93,5 +160,20 @@
<Filter Include="Common\Include">
<UniqueIdentifier>{85226dda-87ba-4da6-af04-563d0ce23b94}</UniqueIdentifier>
</Filter>
<Filter Include="Network">
<UniqueIdentifier>{498bb2e9-53de-4955-970e-813e3f21025b}</UniqueIdentifier>
</Filter>
<Filter Include="Model Editing">
<UniqueIdentifier>{53c3735f-1374-4044-ab58-8a646c95a5e8}</UniqueIdentifier>
</Filter>
<Filter Include="Execution Engine">
<UniqueIdentifier>{3ddfc109-3a90-45f5-91e8-1930759cfe9d}</UniqueIdentifier>
</Filter>
<Filter Include="Nodes">
<UniqueIdentifier>{0b366814-48b2-4619-bf92-85ee24e3cbc1}</UniqueIdentifier>
</Filter>
<Filter Include="Main">
<UniqueIdentifier>{3c119a92-ffb2-4850-adae-01778324974d}</UniqueIdentifier>
</Filter>
</ItemGroup>
</Project>