diff --git a/src/Matrix.cpp b/src/Matrix.cpp index 85593de..d084816 100644 --- a/src/Matrix.cpp +++ b/src/Matrix.cpp @@ -289,6 +289,11 @@ namespace Aurora { getDimSize(1) == 1; } + bool Matrix::isMKLAllocated() const + { + return mMKL_Allocated; + } + int Matrix::getDims() const { if(mInfo[2] > 1) { @@ -342,6 +347,7 @@ namespace Aurora { vector[2] = (slices > 0?slices:1); Matrix ret({data, free}, vector); if (type != Normal)ret.setValueType(type); + ret.mMKL_Allocated = true; return ret; } diff --git a/src/Matrix.h b/src/Matrix.h index 2f678b9..0be0acc 100644 --- a/src/Matrix.h +++ b/src/Matrix.h @@ -182,6 +182,8 @@ namespace Aurora { bool isVector() const; + bool isMKLAllocated() const; + /** * Get dimension count of the matrix * @return dimension count @@ -241,6 +243,7 @@ namespace Aurora { ValueType mValueType = Normal; std::shared_ptr mData; std::vector mInfo; + bool mMKL_Allocated = false; }; }