Skip to content

Commit

Permalink
add timer
Browse files Browse the repository at this point in the history
  • Loading branch information
dzzz2001 committed Jan 10, 2025
1 parent 531c363 commit d708d5c
Showing 1 changed file with 17 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#include "gint_interface.h"
#include "module_base/timer.h"
#include "gint_vl.h"
#include "gint_vl_metagga.h"
#include "gint_vl_nspin4.h"
Expand All @@ -15,52 +16,64 @@ void cal_gint_vl(
const double* vr_eff,
HContainer<double>* hR)
{
ModuleBase::timer::tick("Gint", "cal_gint_vl");
Gint_vl gint_vl(vr_eff, hR);
gint_vl.cal_gint();
ModuleBase::timer::tick("Gint", "cal_gint_vl");
}

void cal_gint_vl(
std::vector<const double*> vr_eff,
HContainer<std::complex<double>>* hR)
{
ModuleBase::timer::tick("Gint", "cal_gint_vl");
Gint_vl_nspin4 gint_vl_nspin4(vr_eff, hR);
gint_vl_nspin4.cal_gint();
ModuleBase::timer::tick("Gint", "cal_gint_vl");
}

void cal_gint_vl_metagga(
const double* vr_eff,
const double* vfork,
HContainer<double>* hR)
{
ModuleBase::timer::tick("Gint", "cal_gint_vl_metagga");
Gint_vl_metagga gint_vl_metagga(vr_eff, vfork, hR);
gint_vl_metagga.cal_gint();
ModuleBase::timer::tick("Gint", "cal_gint_vl_metagga");
}

void cal_gint_vl_metagga(
std::vector<const double*> vr_eff,
std::vector<const double*> vofk,
HContainer<std::complex<double>>* hR)
{
ModuleBase::timer::tick("Gint", "cal_gint_vl_metagga");
Gint_vl_metagga_nspin4 gint_vl_metagga_nspin4(vr_eff, vofk, hR);
gint_vl_metagga_nspin4.cal_gint();
ModuleBase::timer::tick("Gint", "cal_gint_vl_metagga");
}

void cal_gint_rho(
const std::vector<HContainer<double>*>& DMR_vec,
const int nspin,
double **rho)
{
ModuleBase::timer::tick("Gint", "cal_gint_rho");
Gint_rho gint_rho(DMR_vec, nspin, rho);
gint_rho.cal_gint();
ModuleBase::timer::tick("Gint", "cal_gint_rho");
}

void cal_gint_tau(
const std::vector<HContainer<double>*>& DMR_vec,
const int nspin,
double** tau)
{
ModuleBase::timer::tick("Gint", "cal_gint_tau");
Gint_tau gint_tau(DMR_vec, nspin, tau);
gint_tau.cal_gint();
ModuleBase::timer::tick("Gint", "cal_gint_tau");
}

void cal_gint_fvl(
Expand All @@ -72,8 +85,10 @@ void cal_gint_fvl(
ModuleBase::matrix* fvl,
ModuleBase::matrix* svl)
{
ModuleBase::timer::tick("Gint", "cal_gint_fvl");
Gint_fvl gint_fvl(nspin, vr_eff, DMR_vec, isforce, isstress, fvl, svl);
gint_fvl.cal_gint();
ModuleBase::timer::tick("Gint", "cal_gint_fvl");
}

void cal_gint_fvl_meta(
Expand All @@ -86,8 +101,10 @@ void cal_gint_fvl_meta(
ModuleBase::matrix* fvl,
ModuleBase::matrix* svl)
{
ModuleBase::timer::tick("Gint", "cal_gint_fvl_meta");
Gint_fvl_meta gint_fvl_meta(nspin, vr_eff, vofk, DMR_vec, isforce, isstress, fvl, svl);
gint_fvl_meta.cal_gint();
ModuleBase::timer::tick("Gint", "cal_gint_fvl_meta");
}

} // namespace ModuleGint

0 comments on commit d708d5c

Please sign in to comment.