implemented complex conjugation method where it was not available yet

This commit is contained in:
2024-05-03 16:56:21 +02:00
parent 518c75fb20
commit 3ba6d03eee
8 changed files with 129 additions and 11 deletions

6
mat.cc
View File

@@ -2078,11 +2078,15 @@ NRMat< std::complex<double> >::operator*(const NRSMat< std::complex<double> > &r
/***************************************************************************//**
* conjugate this non-complex matrix \f$A\f$, i.e. do nothing :-)
* conjugate this matrix
* @return reference to the (unmodified) matrix
******************************************************************************/
template<typename T>
NRMat<T>& NRMat<T>::conjugateme() {
#ifdef CUDALA
if(location != cpu) laerror("general conjugation only on CPU");
#endif
for(int i=0; i<nn; ++i) for(int j=0; j<mm; ++j) (*this)(i,j) = LA_traits<T>::conjugate((*this)(i,j));
return *this;
}