Add isMKLAllocated function to Matrix

This commit is contained in:
kradchen
2023-05-06 14:15:53 +08:00
parent e992606f60
commit eb84af4e88
2 changed files with 9 additions and 0 deletions

View File

@@ -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;
}

View File

@@ -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;
};
}