1
0
mirror of https://github.com/TREX-CoE/qmckl.git synced 2024-12-22 12:23:56 +01:00
This commit is contained in:
Anthony Scemama 2024-02-14 11:11:50 +01:00
parent 2228ab23c5
commit be2a7199c2
2 changed files with 51 additions and 16 deletions

View File

@ -5882,7 +5882,9 @@ qmckl_compute_ao_value_hpc_gaussian (const qmckl_context context,
} }
} }
IVDEP #ifdef HAVE_OPENMP
#pragma omp simd
#endif
for (int64_t iprim = 0 ; iprim < nidx ; ++iprim) { for (int64_t iprim = 0 ; iprim < nidx ; ++iprim) {
exp_mat[iprim] = exp(-ar2[iprim]); exp_mat[iprim] = exp(-ar2[iprim]);
} }
@ -5899,12 +5901,16 @@ IVDEP
} }
} }
IVDEP #ifdef HAVE_OPENMP
#pragma omp simd
#endif
for (int64_t iprim = 0 ; iprim < nidx ; ++iprim) { for (int64_t iprim = 0 ; iprim < nidx ; ++iprim) {
exp_mat_sp[iprim] = expf(-ar2_sp[iprim]); exp_mat_sp[iprim] = expf(-ar2_sp[iprim]);
} }
IVDEP #ifdef HAVE_OPENMP
#pragma omp simd
#endif
for (int64_t iprim = 0 ; iprim < nidx ; ++iprim) { for (int64_t iprim = 0 ; iprim < nidx ; ++iprim) {
exp_mat[iprim] = exp_mat_sp[iprim]; exp_mat[iprim] = exp_mat_sp[iprim];
} }
@ -5930,16 +5936,16 @@ IVDEP
const double s1 = ce_mat[ishell-ishell_start]; const double s1 = ce_mat[ishell-ishell_start];
if (s1 == 0.0) {
continue;
}
const int64_t k = ao_index[ishell]; const int64_t k = ao_index[ishell];
double* restrict const ao_value_1 = ao_value + ipoint_ao_num + k; double* restrict const ao_value_1 = ao_value + ipoint_ao_num + k;
const int32_t l = shell_ang_mom[ishell]; const int32_t l = shell_ang_mom[ishell];
const int32_t n = lstart[l+1]-lstart[l]; const int32_t n = lstart[l+1]-lstart[l];
if (s1 == 0.0) {
continue;
}
double* restrict poly_vgl_1 = NULL; double* restrict poly_vgl_1 = NULL;
if (nidx > 0) { if (nidx > 0) {
const double* restrict f = ao_factor + k; const double* restrict f = ao_factor + k;
@ -5976,15 +5982,6 @@ IVDEP
} }
break; break;
} }
} else {
/*
#ifdef HAVE_OPENMP
#pragma omp simd
#endif
for (int64_t il=0 ; il<n ; ++il) {
ao_value_1[il] = 0.0;
}
*/
} }
} }
} }
@ -6685,6 +6682,9 @@ qmckl_compute_ao_vgl_hpc_gaussian (
} }
} }
#ifdef HAVE_OPENMP
#pragma omp simd
#endif
for (int64_t iprim = 0 ; iprim < nidx ; ++iprim) { for (int64_t iprim = 0 ; iprim < nidx ; ++iprim) {
exp_mat[iprim][0] = exp(-ar2[iprim]); exp_mat[iprim][0] = exp(-ar2[iprim]);
} }
@ -6702,16 +6702,25 @@ qmckl_compute_ao_vgl_hpc_gaussian (
} }
} }
#ifdef HAVE_OPENMP
#pragma omp simd
#endif
for (int64_t iprim = 0 ; iprim < nidx ; ++iprim) { for (int64_t iprim = 0 ; iprim < nidx ; ++iprim) {
exp_mat_sp[iprim] = expf(-ar2_sp[iprim]); exp_mat_sp[iprim] = expf(-ar2_sp[iprim]);
} }
#ifdef HAVE_OPENMP
#pragma omp simd
#endif
for (int64_t iprim = 0 ; iprim < nidx ; ++iprim) { for (int64_t iprim = 0 ; iprim < nidx ; ++iprim) {
exp_mat[iprim][0] = exp_mat_sp[iprim]; exp_mat[iprim][0] = exp_mat_sp[iprim];
} }
} }
#ifdef HAVE_OPENMP
#pragma omp simd
#endif
for (int64_t iprim = 0 ; iprim < nidx ; ++iprim) { for (int64_t iprim = 0 ; iprim < nidx ; ++iprim) {
double f = qmckl_mat(expo_per_nucleus, iprim, inucl) * exp_mat[iprim][0]; double f = qmckl_mat(expo_per_nucleus, iprim, inucl) * exp_mat[iprim][0];
f = -f-f; f = -f-f;

View File

@ -6647,6 +6647,19 @@ end function qmckl_compute_jastrow_champ_factor_een_rescaled_e_gl_f
double* const een_rescaled_e_gl ); double* const een_rescaled_e_gl );
#+end_src #+end_src
#+begin_src c :comments org :tangle (eval h_private_func) :noweb yes :exports none
qmckl_exit_code qmckl_compute_jastrow_champ_factor_een_rescaled_e_gl_doc (
const qmckl_context context,
const int64_t walk_num,
const int64_t elec_num,
const int64_t cord_num,
const double rescale_factor_ee,
const double* coord_ee,
const double* ee_distance,
const double* een_rescaled_e,
double* const een_rescaled_e_gl );
#+end_src
#+CALL: generate_c_interface(table=qmckl_factor_een_rescaled_e_gl_args,rettyp=get_value("CRetType"),fname=get_value("Name")) #+CALL: generate_c_interface(table=qmckl_factor_een_rescaled_e_gl_args,rettyp=get_value("CRetType"),fname=get_value("Name"))
@ -6692,6 +6705,19 @@ end function qmckl_compute_jastrow_champ_factor_een_rescaled_e_gl_f
end function qmckl_compute_jastrow_champ_factor_een_rescaled_e_gl_doc end function qmckl_compute_jastrow_champ_factor_een_rescaled_e_gl_doc
#+end_src #+end_src
#+begin_src c :comments org :tangle (eval h_private_func) :noweb yes :exports none
qmckl_exit_code qmckl_compute_jastrow_champ_factor_een_rescaled_e_gl_hpc (
const qmckl_context context,
const int64_t walk_num,
const int64_t elec_num,
const int64_t cord_num,
const double rescale_factor_ee,
const double* coord_ee,
const double* ee_distance,
const double* een_rescaled_e,
double* const een_rescaled_e_gl );
#+end_src
#+begin_src c :comments org :tangle (eval c) :noweb yes #+begin_src c :comments org :tangle (eval c) :noweb yes
qmckl_exit_code qmckl_compute_jastrow_champ_factor_een_rescaled_e_gl_hpc ( qmckl_exit_code qmckl_compute_jastrow_champ_factor_een_rescaled_e_gl_hpc (
const qmckl_context context, const qmckl_context context,