basetypes.h was missing the #include for stderror();
in GCC, members of base classes that have a template parameter require this-> unless one declares each with a 'using' directive, which was done here.
This commit is contained in:
Родитель
d72ad05fb4
Коммит
616f812d44
|
@ -24,6 +24,7 @@
|
|||
#include <errno.h>
|
||||
#include <stdint.h>
|
||||
#include <assert.h>
|
||||
#include <string.h> // for strerror()
|
||||
|
||||
using namespace std;
|
||||
|
||||
|
|
|
@ -43,7 +43,8 @@ namespace Microsoft { namespace MSR { namespace CNTK {
|
|||
template<class ElemType>
|
||||
class MATH_API CPUMatrix : public BaseMatrix<ElemType>
|
||||
{
|
||||
typedef BaseMatrix<ElemType> B; using B::m_numRows; using B::m_numCols; using B::m_pArray; // easier access to base members
|
||||
typedef BaseMatrix<ElemType> B; using B::m_numRows; using B::m_numCols; using B::m_pArray; using B::m_computeDevice; using B::m_elemSizeAllocated;
|
||||
using B::m_externalBuffer; using B::m_format; using B::m_matrixName; // without this, base members would require to use thi-> in GCC
|
||||
public:
|
||||
CPUMatrix();
|
||||
CPUMatrix(FILE* f, const char * matrixName); //matrixName is used to verify that correct matrix is read.
|
||||
|
@ -57,7 +58,9 @@ namespace Microsoft { namespace MSR { namespace CNTK {
|
|||
~CPUMatrix();
|
||||
|
||||
public:
|
||||
size_t BufferSize() const {return m_numRows*m_numCols*sizeof(ElemType);}
|
||||
using B::OwnBuffer; using B::GetNumElements; using B::IsEmpty; using B::GetNumRows; using B::GetNumCols; using B::SetOwnBuffer; using B::SetMatrixName;
|
||||
|
||||
size_t BufferSize() const { return m_numRows*m_numCols*sizeof(ElemType); }
|
||||
ElemType* BufferPointer() const {return m_pArray;}
|
||||
|
||||
CPUMatrix<ElemType> ColumnSlice(size_t startColumn, size_t numCols) const;
|
||||
|
|
|
@ -23,7 +23,8 @@ namespace Microsoft { namespace MSR { namespace CNTK {
|
|||
template<class ElemType>
|
||||
class MATH_API CPUSparseMatrix : public BaseMatrix<ElemType>
|
||||
{
|
||||
typedef BaseMatrix<ElemType> B; using B::m_elemSizeAllocated; // easier access to base members
|
||||
typedef BaseMatrix<ElemType> B; using B::m_elemSizeAllocated; using B::m_computeDevice; using B::m_externalBuffer; using B::m_format; using B::m_matrixName;
|
||||
using B::m_numCols; using B::m_numRows; using B::m_nz; using B::m_pArray; // without this, base members would require to use thi-> in GCC
|
||||
|
||||
private:
|
||||
void ZeroInit();
|
||||
|
@ -36,6 +37,8 @@ namespace Microsoft { namespace MSR { namespace CNTK {
|
|||
~CPUSparseMatrix();
|
||||
|
||||
public:
|
||||
using B::GetNumCols; using B::GetNumRows;
|
||||
|
||||
void SetValue(const size_t rIdx, const size_t cIdx, ElemType val);
|
||||
void SetValue(const CPUSparseMatrix& /*val*/) { NOT_IMPLEMENTED; }
|
||||
|
||||
|
|
|
@ -62,7 +62,7 @@ namespace Microsoft { namespace MSR { namespace CNTK {
|
|||
template<class ElemType>
|
||||
class MATH_API GPUMatrix : public BaseMatrix<ElemType>
|
||||
{
|
||||
typedef BaseMatrix<ElemType> B; using B::m_numRows; using B::m_numCols; using B::m_pArray; // easier access to base members
|
||||
typedef BaseMatrix<ElemType> B; using B::m_numRows; using B::m_numCols; using B::m_pArray; // without this, base members would require to use thi-> in GCC
|
||||
public:
|
||||
static const int MaxGpus = 8; // support up to 8 GPUs
|
||||
private:
|
||||
|
|
|
@ -19,7 +19,7 @@ namespace Microsoft { namespace MSR { namespace CNTK {
|
|||
template<class ElemType>
|
||||
class MATH_API GPUSparseMatrix : public BaseMatrix<ElemType>
|
||||
{
|
||||
typedef BaseMatrix<ElemType> B; using B::m_numRows; using B::m_numCols; using B::m_pArray; using B::m_elemSizeAllocated; using B::m_nz; using B::m_format; // easier access to base members
|
||||
typedef BaseMatrix<ElemType> B; using B::m_numRows; using B::m_numCols; using B::m_pArray; using B::m_elemSizeAllocated; using B::m_nz; using B::m_format; // without this, base members would require to use thi-> in GCC
|
||||
private:
|
||||
void ZeroInit();
|
||||
void Init();
|
||||
|
|
Загрузка…
Ссылка в новой задаче