From be2a7199c2ab42a764459343ab21b1bd9aab926c Mon Sep 17 00:00:00 2001 From: Anthony Scemama Date: Wed, 14 Feb 2024 11:11:50 +0100 Subject: [PATCH] simd --- org/qmckl_ao.org | 41 ++++++++++++++++++++++--------------- org/qmckl_jastrow_champ.org | 26 +++++++++++++++++++++++ 2 files changed, 51 insertions(+), 16 deletions(-) diff --git a/org/qmckl_ao.org b/org/qmckl_ao.org index f68dfe7..8da7cbc 100644 --- a/org/qmckl_ao.org +++ b/org/qmckl_ao.org @@ -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) { 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) { exp_mat_sp[iprim] = expf(-ar2_sp[iprim]); } -IVDEP +#ifdef HAVE_OPENMP +#pragma omp simd +#endif for (int64_t iprim = 0 ; iprim < nidx ; ++iprim) { exp_mat[iprim] = exp_mat_sp[iprim]; } @@ -5930,16 +5936,16 @@ IVDEP const double s1 = ce_mat[ishell-ishell_start]; + if (s1 == 0.0) { + continue; + } + const int64_t k = ao_index[ishell]; double* restrict const ao_value_1 = ao_value + ipoint_ao_num + k; const int32_t l = shell_ang_mom[ishell]; const int32_t n = lstart[l+1]-lstart[l]; - if (s1 == 0.0) { - continue; - } - double* restrict poly_vgl_1 = NULL; if (nidx > 0) { const double* restrict f = ao_factor + k; @@ -5976,15 +5982,6 @@ IVDEP } break; } - } else { -/* -#ifdef HAVE_OPENMP -#pragma omp simd -#endif - for (int64_t il=0 ; il