Skip to content

Commit

Permalink
Fix: reference to parameter instead of global variable in tool functi…
Browse files Browse the repository at this point in the history
…ons in DiagoDavid (deepmodeling#4873)
  • Loading branch information
Cstandardlib authored Aug 3, 2024
1 parent 0f87658 commit 895c282
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions source/module_hsolver/diago_david.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#include "diago_david.h"

// #include "module_base/memory.h"
#include "module_base/timer.h"
#include "module_base/module_device/device.h"

Expand Down Expand Up @@ -749,15 +748,15 @@ void DiagoDavid<T, Device>::diag_zhegvx(const int& nbase,
resmem_var_op()(this->ctx, eigenvalue_gpu, nbase_x);
syncmem_var_h2d_op()(this->ctx, this->cpu_ctx, eigenvalue_gpu, this->eigenvalue, nbase_x);

dnevx_op<T, Device>()(this->ctx, nbase, nbase_x, this->hcc, nband, eigenvalue_gpu, this->vcc);
dnevx_op<T, Device>()(this->ctx, nbase, nbase_x, hcc, nband, eigenvalue_gpu, vcc);

syncmem_var_d2h_op()(this->cpu_ctx, this->ctx, this->eigenvalue, eigenvalue_gpu, nbase_x);
delmem_var_op()(this->ctx, eigenvalue_gpu);
#endif
}
else
{
dnevx_op<T, Device>()(this->ctx, nbase, nbase_x, this->hcc, nband, this->eigenvalue, this->vcc);
dnevx_op<T, Device>()(this->ctx, nbase, nbase_x, hcc, nband, this->eigenvalue, vcc);
}
}

Expand Down

0 comments on commit 895c282

Please sign in to comment.