Shielded noreturn declspec for non-msvc environments, included basetypes.h to make sure declarations are seen, changed name of GPUDummy.cpp to NoGPU.cpp in the makefile (filename change was made previously.)
This commit is contained in:
Родитель
c9b3032a18
Коммит
c404103ecd
|
@ -969,7 +969,9 @@ using namespace msra::basetypes; // for compatibility
|
|||
#pragma warning (pop)
|
||||
|
||||
// RuntimeError - throw a std::runtime_error with a formatted error string
|
||||
#ifdef _MSC_VER
|
||||
__declspec(noreturn)
|
||||
#endif
|
||||
static inline void RuntimeError(const char * format, ...)
|
||||
{
|
||||
va_list args;
|
||||
|
@ -981,7 +983,9 @@ static inline void RuntimeError(const char * format, ...)
|
|||
};
|
||||
|
||||
// LogicError - throw a std::logic_error with a formatted error string
|
||||
#ifdef _MSC_VER
|
||||
__declspec(noreturn)
|
||||
#endif
|
||||
static inline void LogicError(const char * format, ...)
|
||||
{
|
||||
va_list args;
|
||||
|
|
|
@ -962,7 +962,9 @@ using namespace msra::basetypes; // for compatibility
|
|||
#pragma warning (pop)
|
||||
|
||||
// RuntimeError - throw a std::runtime_error with a formatted error string
|
||||
#ifdef _MSC_VER
|
||||
__declspec(noreturn)
|
||||
#endif
|
||||
static inline void RuntimeError(const char * format, ...)
|
||||
{
|
||||
va_list args;
|
||||
|
@ -974,7 +976,9 @@ static inline void RuntimeError(const char * format, ...)
|
|||
};
|
||||
|
||||
// LogicError - throw a std::logic_error with a formatted error string
|
||||
#ifdef _MSC_VER
|
||||
__declspec(noreturn)
|
||||
#endif
|
||||
static inline void LogicError(const char * format, ...)
|
||||
{
|
||||
va_list args;
|
||||
|
|
|
@ -11,6 +11,7 @@
|
|||
#include "File.h"
|
||||
#include "Helpers.h"
|
||||
#include "CommonMatrix.h"
|
||||
#include "basetypes.h" // for RuntimeError()
|
||||
|
||||
#ifdef _WIN32
|
||||
#ifdef MATH_EXPORTS
|
||||
|
|
2
makefile
2
makefile
|
@ -32,7 +32,7 @@ INCFLAGS = -I Common/Include -I Math/Math -I MachineLearning/cn -I $(ACML_PATH)/
|
|||
COMMON_SRC = Common/fileutil.cpp Common/DataWriter.cpp Common/ConfigFile.cpp Common/DataReader.cpp \
|
||||
Common/Eval.cpp Common/File.cpp Common/NetworkDescriptionLanguage.cpp Common/BestGpu.cpp
|
||||
|
||||
MATH_SRC = Math/Math/Matrix.obj Math/Math/CPUMatrix.obj Math/Math/CPUSparseMatrix.obj Math/Math/GPUDummy.obj
|
||||
MATH_SRC = Math/Math/Matrix.obj Math/Math/CPUMatrix.obj Math/Math/CPUSparseMatrix.obj Math/Math/NoGPU.obj
|
||||
|
||||
CN_SRC = MachineLearning/cn/cn.cpp MachineLearning/cn/ComputationNode.cpp MachineLearning/cn/ModelEditLanguage.cpp MachineLearning/cn/NetworkDescriptionLanguage.cpp MachineLearning/cn/PTaskGraphBuilder.cpp MachineLearning/cn/SimpleNetworkBuilder.cpp MachineLearning/cn/tests.cpp
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче