Refactor Matrix unit test, remove log

This commit is contained in:
Krad
2023-04-21 17:25:22 +08:00
parent c1c09fa45f
commit 1b1ba3cc03
3 changed files with 308 additions and 290 deletions

View File

@@ -33,8 +33,6 @@ namespace Aurora{
}
inline Matrix &operatorMxA_RR(CalcFuncD aFunc, double aScalar, Aurora::Matrix &&aMatrix) {
std::cout << "use right ref operation" << std::endl;
std::cout << "before operation" << std::endl;
if (aMatrix.getValueType() == Complex) {
//针对实部操作
aFunc(aMatrix.getDataSize(), aMatrix.getData(), 2, &aScalar, 0,
@@ -50,8 +48,6 @@ namespace Aurora{
aMatrix.getData(),
1);
}
std::cout << "after operation" << std::endl;
aMatrix.printf();
return aMatrix;
}
@@ -179,7 +175,6 @@ namespace Aurora{
inline Matrix operatorMxM_RR(CalcFuncD aFuncD, CalcFuncZ aFuncZ, const Aurora::Matrix &aMatrix,
Aurora::Matrix &&aOther,bool oppside = false) {
std::cout << "use right ref operation m" << std::endl;
if (aMatrix.compareShape(aOther)) {
int DimsStride = 1;
double* X = oppside?aOther.getData():aMatrix.getData();
@@ -674,7 +669,7 @@ namespace Aurora {
}
Matrix Matrix::MatrixSlice::toMatrix() const {
double * data = (double *) mkl_malloc(mSize*(mSize2>0?mSize2:1) * sizeof(double)*mType, 64);
double * data = (double *) malloc(mSize*(mSize2>0?mSize2:1) ,mType == Complex);
switch (mSliceMode) {
case 2:{