bugfixes in vec mat smat - mainly missing copyonwrite()s

This commit is contained in:
jiri committed 2026-10-26 15:11:45 +01:00
1 parent eccb3a68f8
commit f7ef134fc5
5 files changed
+31 -10

No files matched your search

+2
View File
@@ -192,6 +192,7 @@ const bool NRVec<T>::operator<(const NRVec &rhs) const {
template<>
void NRVec<double>::randomize(const double &x){
NOT_GPU(*this);
copyonwrite();
for(register int i=0; i<nn; ++i){
v[i] = x*RANDDOUBLESIGNED();
@@ -209,6 +210,7 @@ void NRVec<double>::randomize(const double &x){
template<>
void NRVec<std::complex<double> >::randomize(const double &x) {
NOT_GPU(*this);
copyonwrite();
for(register int i=0; i<nn; ++i){
v[i] = std::complex<double>(x*RANDDOUBLESIGNED(), x*RANDDOUBLESIGNED());