From 92128f39718fecc71ff9c6f1a4fb5f6efa1083dc Mon Sep 17 00:00:00 2001 From: Qiming Sun Date: Sun, 30 Sep 2018 12:13:11 -0700 Subject: [PATCH] Improve opt part of cint3c2e.c --- src/cint3c2e.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/cint3c2e.c b/src/cint3c2e.c index fe5c3fc..5430330 100644 --- a/src/cint3c2e.c +++ b/src/cint3c2e.c @@ -334,8 +334,12 @@ int CINT3c2e_loop(double *out, CINTEnvVars *envs, CINTOpt *opt, double *cache) CINTg4c_index_xyz(idx, envs); allocated_idx = 1; } - int *non0ctr[3] = {opt->non0ctr[i_sh], opt->non0ctr[j_sh], opt->non0ctr[k_sh]}; - int *non0idx[3] = {opt->sortedidx[i_sh], opt->sortedidx[j_sh], opt->sortedidx[k_sh]}; + + int non0ctrk[k_prim]; + int non0idxk[k_prim*k_ctr]; + CINTOpt_non0coeff_byshell(non0idxk, non0ctrk, ck, k_prim, k_ctr); + int *non0ctr[3] = {opt->non0ctr[i_sh], opt->non0ctr[j_sh], non0ctrk}; + int *non0idx[3] = {opt->sortedidx[i_sh], opt->sortedidx[j_sh], non0idxk}; INITSIMD;