Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions source/module_hsolver/diago_iter_assist.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,9 @@ void DiagoIterAssist<T, Device>::diagH_subspace(const hamilt::Hamilt<T, Device>*
// after generation of H and S matrix, diag them
DiagoIterAssist::diagH_LAPACK(nstart, n_band, hcc, scc, nstart, en, vcc);


const int ld_temp = in_place ? dmax : dmin;

{ // code block to calculate evc
gemm_op<T, Device>()(ctx,
'N',
Expand All @@ -131,12 +134,12 @@ void DiagoIterAssist<T, Device>::diagH_subspace(const hamilt::Hamilt<T, Device>*
nstart,
&zero,
temp,
dmin);
ld_temp);
}

if (!in_place)
{
matrixSetToAnother<T, Device>()(ctx, n_band, temp, dmin, evc.get_pointer(), dmax);
matrixSetToAnother<T, Device>()(ctx, n_band, temp, ld_temp, evc.get_pointer(), dmax);
delmem_complex_op()(ctx, temp);
}
delmem_complex_op()(ctx, hcc);
Expand Down
Loading