diff --git a/src/Matrix.cpp b/src/Matrix.cpp index bfbfbc2..85593de 100644 --- a/src/Matrix.cpp +++ b/src/Matrix.cpp @@ -184,12 +184,18 @@ namespace Aurora{ if (aMatrix.getValueType() != aOther.getValueType()) { //aOther is not a complex matrix if (aMatrix.getValueType() == Complex) { - double *output = _MxM_NC_Calc(aFuncD,aMatrix.getDataSize(), X, Y,DimsStride); - return Matrix::New(output, aOther); + double *output = oppside?_MxM_NC_Calc(aFuncD,aMatrix.getDataSize(), aOther.getData(),aMatrix.getData(),DimsStride) + :_MxM_CN_Calc(aFuncD,aMatrix.getDataSize(), aMatrix.getData(), aOther.getData(),DimsStride); + return Matrix::New(output, aMatrix); } //aOther is a complex matrix, use aOther as output - V_MxM_NC_Calc(aFuncD, aMatrix.getDataSize(), X, Y, aOther.getData(), - DimsStride); + if (oppside){ + V_MxM_CN_Calc(aFuncD, aMatrix.getDataSize(), aOther.getData(),aMatrix.getData(),aOther.getData(),DimsStride); + } + else + { + V_MxM_NC_Calc(aFuncD, aMatrix.getDataSize(), aMatrix.getData(),aOther.getData(),aOther.getData(),DimsStride); + } return aOther; } else if (aMatrix.getValueType() == Normal) { V_MxM_NN_Calc(aFuncD, aMatrix.getDataSize(), X, Y, aOther.getData(),