Add isMKLAllocated function to Matrix
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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<double> mData;
|
||||
std::vector<int> mInfo;
|
||||
bool mMKL_Allocated = false;
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user