Skip to content

Commit fbe7d0a

Browse files
committed
1. optimize LRI::cal()
1 parent 784f9a3 commit fbe7d0a

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

include/RI/ri/LRI-cal.hpp

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,10 @@ void LRI<TA,Tcell,Ndim,Tdata>::cal(
3131
return true;
3232
return false;
3333
}();
34+
const std::map<TA, std::map<TAC, Tensor<Tdata>>> Ds_b_transpose
35+
= flag_D_b_transpose
36+
? LRI_Cal_Aux::cal_Ds_transpose(this->Ds_ab[Label::ab::b])
37+
: std::map<TA, std::map<TAC, Tensor<Tdata>>>{};
3438

3539
assert(!this->coefficients.empty());
3640
if(Ds_result.empty())
@@ -54,11 +58,6 @@ void LRI<TA,Tcell,Ndim,Tdata>::cal(
5458
std::vector<std::map<TA, std::map<TAC, Tensor<Tdata>>>> Ds_result_thread(this->coefficients.size());
5559
LRI_Cal_Tools<TA,TC,Tdata> tools(this->period, this->Ds_ab, Ds_result_thread);
5660

57-
const std::map<TA, std::map<TAC, Tensor<Tdata>>> Ds_b_transpose
58-
= flag_D_b_transpose
59-
? LRI_Cal_Aux::cal_Ds_transpose(this->Ds_ab[Label::ab::b])
60-
: std::map<TA, std::map<TAC, Tensor<Tdata>>>{};
61-
6261
for(const TA &Aa01 : this->parallel->get_list_Aa01())
6362
{
6463
for(const TAC &Aa2 : this->parallel->get_list_Aa2(Aa01))

0 commit comments

Comments
 (0)