dummy conjugateme for real matrices
This commit is contained in:
parent
0ff3dbba54
commit
1452f61dbd
22
mat.cc
22
mat.cc
@ -2013,11 +2013,11 @@ NRMat< std::complex<double> >::operator*(const NRSMat< std::complex<double> > &r
|
||||
|
||||
|
||||
/***************************************************************************//**
|
||||
* conjugate this real matrix \f$A\f$, i.e. do nothing :-)
|
||||
* conjugate this non-complex matrix \f$A\f$, i.e. do nothing :-)
|
||||
* @return reference to the (unmodified) matrix
|
||||
******************************************************************************/
|
||||
template<>
|
||||
NRMat<double>& NRMat<double>::conjugateme() {
|
||||
template<typename T>
|
||||
NRMat<T>& NRMat<T>::conjugateme() {
|
||||
return *this;
|
||||
}
|
||||
|
||||
@ -2040,6 +2040,22 @@ NRMat<std::complex<double> >& NRMat<std::complex<double> >::conjugateme() {
|
||||
return *this;
|
||||
}
|
||||
|
||||
template<>
|
||||
NRMat<std::complex<float> >& NRMat<std::complex<float> >::conjugateme() {
|
||||
copyonwrite();
|
||||
#ifdef CUDALA
|
||||
if(location == cpu){
|
||||
#endif
|
||||
cblas_sscal((size_t)mm*nn, -1.0, (float *)((*this)[0]) + 1, 2);
|
||||
#ifdef CUDALA
|
||||
}else{
|
||||
cublasSscal((size_t)mm*nn, -1.0, (float *)(this->v) + 1, 2);
|
||||
}
|
||||
#endif
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
||||
/***************************************************************************//**
|
||||
* compute transpose (optionally conjugated) of this real matrix \f$A\f$
|
||||
* @param[in] conj conjugation flag, unused for real matrices
|
||||
|
Loading…
Reference in New Issue
Block a user