moved NOT_IMPLEMENTED macro to Basics.h, close to LogicError()

This commit is contained in:
Frank Seide 2015-12-04 21:40:08 -08:00
Родитель 6b535cd1e8
Коммит 450be1a664
4 изменённых файлов: 12 добавлений и 21 удалений

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

@ -83,6 +83,15 @@ namespace Microsoft { namespace MSR { namespace CNTK {
};
#pragma warning(pop)
static inline void Warning(const string & message) { Warning("%s", message.c_str()); }
#ifndef NOT_IMPLEMENTED
#define NOT_IMPLEMENTED \
{ \
fprintf(stderr, "Inside File: %s Line: %d Function: %s -> Feature Not Implemented.\n", __FILE__, __LINE__, __FUNCTION__); \
LogicError("Inside File: %s Line: %d Function: %s -> Feature Not Implemented.\n", __FILE__, __LINE__, __FUNCTION__); \
}
#endif
}}}
#ifndef _MSC_VER

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

@ -13,9 +13,9 @@
namespace Microsoft { namespace MSR { namespace CNTK {
// -----------------------------------------------------------------------
// TensorShape -- tensor descriptor to describe the inner layout of a data vector that holds a tensor
// TensorShape -- tensor descriptor to describe the inner layout of a sample vector that holds a tensor
//
// Minibatches are stored as Matrices. While the column dimension represents multiple data vectors, and may have
// Minibatches are stored as Matrix objects. While the column dimension represents multiple sample vectors, and may have
// an inner structure (time, parallel sequences) described by the MBLayout, the row dimension represents data
// vectors that hold tensors of data.
//
@ -23,14 +23,9 @@ namespace Microsoft { namespace MSR { namespace CNTK {
//
// Specifically, when the image is an image, then this is a 3-dimensional tensor with dimensions ( channels, width, height ),
// which represents the column-major interpretation of a transposed row-by-row-scanned image where each pixel stores (R,G,B) as a float3.
//
// BUGBUG: Tensors with other than 3 dimensions can currently not be used because they cannot be serialized with the current file format.
// -----------------------------------------------------------------------
// TODO: really support lengths other than 3, e.g. fix serialization code to handle variable-length descriptors
// TODO: rename to DataLayout
// TODO: must match ComputationNode::m_numRows; or, rather, the TensorShape is how m_numRows is stored??
// TODO: move this elsewhere, maybe a separate header Tensors.h?
struct TensorShape
{
public:

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

@ -28,14 +28,6 @@
//#define RNN_DEBUG 1
#define DEFAULT_HIDDEN_ACTIVATION 0.1
#ifndef NOT_IMPLEMENTED
#define NOT_IMPLEMENTED \
{ \
fprintf(stderr, "Inside File: %s Line: %d Function: %s -> Feature Not Implemented.\n", __FILE__, __LINE__, __FUNCTION__); \
LogicError("Not Implemented"); \
}
#endif
#pragma warning (disable: 4267)
// version number to control how to read and write

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

@ -5,6 +5,7 @@
//
#pragma once
#include "Basics.h"
#include <string>
#include <stdint.h>
@ -48,12 +49,6 @@ static inline DEVICEID_TYPE EnforceOneGPUOnly(DEVICEID_TYPE requestedDeviceId)
#define MINLOGEXP -9.2103
#define LSMALL -0.5E10
#define NOT_IMPLEMENTED \
{ \
fprintf(stderr, "Inside File: %s Line: %d Function: %s -> Feature Not Implemented.\n", __FILE__, __LINE__, __FUNCTION__); \
LogicError("Not Implemented"); \
}
#define GPUSPARSE_INDEX_TYPE int //cuSparse only supports int array indexes
#define CPUSPARSE_INDEX_TYPE int //to be consistent with cuSparse but limited the possible size of the matrix.