Add isMKLAllocated function to Matrix
This commit is contained in:
@@ -289,6 +289,11 @@ namespace Aurora {
|
|||||||
getDimSize(1) == 1;
|
getDimSize(1) == 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool Matrix::isMKLAllocated() const
|
||||||
|
{
|
||||||
|
return mMKL_Allocated;
|
||||||
|
}
|
||||||
|
|
||||||
int Matrix::getDims() const {
|
int Matrix::getDims() const {
|
||||||
if(mInfo[2] > 1)
|
if(mInfo[2] > 1)
|
||||||
{
|
{
|
||||||
@@ -342,6 +347,7 @@ namespace Aurora {
|
|||||||
vector[2] = (slices > 0?slices:1);
|
vector[2] = (slices > 0?slices:1);
|
||||||
Matrix ret({data, free}, vector);
|
Matrix ret({data, free}, vector);
|
||||||
if (type != Normal)ret.setValueType(type);
|
if (type != Normal)ret.setValueType(type);
|
||||||
|
ret.mMKL_Allocated = true;
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -182,6 +182,8 @@ namespace Aurora {
|
|||||||
|
|
||||||
bool isVector() const;
|
bool isVector() const;
|
||||||
|
|
||||||
|
bool isMKLAllocated() const;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get dimension count of the matrix
|
* Get dimension count of the matrix
|
||||||
* @return dimension count
|
* @return dimension count
|
||||||
@@ -241,6 +243,7 @@ namespace Aurora {
|
|||||||
ValueType mValueType = Normal;
|
ValueType mValueType = Normal;
|
||||||
std::shared_ptr<double> mData;
|
std::shared_ptr<double> mData;
|
||||||
std::vector<int> mInfo;
|
std::vector<int> mInfo;
|
||||||
|
bool mMKL_Allocated = false;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user