Matrix& Matrix::transpose(rflag tp){ try{ throwTypeError(tp); if(!ongpu) m_elem = (Real*)mvGPU(m_elem, elemNum() * sizeof(Real), ongpu); if(!(diag || Rnum == 1 || Cnum == 1)) setTranspose(m_elem, Rnum, Cnum, ongpu); size_t tmp = Rnum; Rnum = Cnum; Cnum = tmp; } catch(const std::exception& e){ propogate_exception(e, "In function Matrix::transpose(uni10::rflag ):"); } return *this; }
Matrix& Matrix::transpose(cflag tp){ try{ checkUni10TypeError(tp); if(!ongpu) cm_elem = (Complex*)mvGPU(cm_elem, elemNum() * sizeof(Complex), ongpu); if(!(diag || Rnum == 1 || Cnum == 1)) setTranspose(cm_elem, Rnum, Cnum, ongpu); size_t tmp = Rnum; Rnum = Cnum; Cnum = tmp; } catch(const std::exception& e){ propogate_exception(e, "In function Matrix::transpose(uni10::cflag ):"); } return *this; }
RMatrix& RMatrix :: operator = (const RMatrix& A) { LongInt n = A.numberOfRows(); LongInt m = A.numberOfColumns(); setDimension(n, m); attr_type = A.attr_type; setTranspose(A.isTranspose()); integer dim = n*m; integer nx = 1; TensorCalculus::Blas<double>::copy (dim, (&A._pelm[0]), nx, (&this->_pelm[0]), nx); return (*this); }