@@ -25,10 +25,6 @@ Diago_DavSubspace<T, Device>::Diago_DavSubspace(const std::vector<Real>& precond
2525{
2626 this ->device = base_device::get_device_type<Device>(this ->ctx );
2727
28- this ->one = this ->cs .one ;
29- this ->zero = this ->cs .zero ;
30- this ->neg_one = this ->cs .neg_one ;
31-
3228 assert (david_ndim_in > 1 );
3329 assert (david_ndim_in * nband_in < nbasis_in * this ->diag_comm .nproc );
3430
@@ -559,8 +555,8 @@ void Diago_DavSubspace<T, Device>::diag_zhegvx(const int& nbase,
559555 }
560556 else
561557 {
562- std::vector<std::vector<T>> h_diag (nbase, std::vector<T>(nbase, cs. zero [ 0 ] ));
563- std::vector<std::vector<T>> s_diag (nbase, std::vector<T>(nbase, cs. zero [ 0 ] ));
558+ std::vector<std::vector<T>> h_diag (nbase, std::vector<T>(nbase, * this -> zero ));
559+ std::vector<std::vector<T>> s_diag (nbase, std::vector<T>(nbase, * this -> zero ));
564560
565561 for (size_t i = 0 ; i < nbase; i++)
566562 {
@@ -589,10 +585,10 @@ void Diago_DavSubspace<T, Device>::diag_zhegvx(const int& nbase,
589585
590586 for (size_t j = nbase; j < this ->nbase_x ; j++)
591587 {
592- hcc[i * this ->nbase_x + j] = cs. zero [ 0 ] ;
593- hcc[j * this ->nbase_x + i] = cs. zero [ 0 ] ;
594- scc[i * this ->nbase_x + j] = cs. zero [ 0 ] ;
595- scc[j * this ->nbase_x + i] = cs. zero [ 0 ] ;
588+ hcc[i * this ->nbase_x + j] = * this -> zero ;
589+ hcc[j * this ->nbase_x + i] = * this -> zero ;
590+ scc[i * this ->nbase_x + j] = * this -> zero ;
591+ scc[j * this ->nbase_x + i] = * this -> zero ;
596592 }
597593 }
598594 }
0 commit comments