Skip to content

Commit c12bd52

Browse files
authored
Perf: optimize cal_DMR and folding_HR (#6068)
* modify variable name * modify variable name * change pointer to ptr * modify variable name * modify some variable names * move functions from .cpp to .h * optimize cal_DMR * add schedule(dynamic) * optimize func_folding
1 parent 8b24258 commit c12bd52

File tree

6 files changed

+229
-184
lines changed

6 files changed

+229
-184
lines changed

source/module_basis/module_ao/parallel_orbitals.cpp

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -91,16 +91,6 @@ void Parallel_Orbitals::set_atomic_trace(const int* iat2iwt, const int &nat, con
9191
this->atom_begin_col[nat] = this->ncol;
9292
}
9393

94-
// Get the number of columns of the parallel orbital matrix
95-
int Parallel_Orbitals::get_col_size()const
96-
{
97-
return this->ncol;
98-
}
99-
// Get the number of rows of the parallel orbital matrix
100-
int Parallel_Orbitals::get_row_size()const
101-
{
102-
return this->nrow;
103-
}
10494
// Get the number of columns of the orbital matrix of the iat-th atom
10595
int Parallel_Orbitals::get_col_size(int iat) const
10696
{

source/module_basis/module_ao/parallel_orbitals.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,8 @@ class Parallel_Orbitals : public Parallel_2D
7373
* get_col_size(iat) : number of columns of Hamiltonian matrix in atom iat
7474
* get_row_size(iat) : number of rows of Hamiltonian matrix in atom iat
7575
*/
76-
int get_col_size()const;
77-
int get_row_size()const;
76+
int get_col_size()const { return this->ncol; };
77+
int get_row_size()const { return this->nrow; };
7878
int get_col_size(int iat) const;
7979
int get_row_size(int iat) const;
8080

0 commit comments

Comments
 (0)