19 #ifndef _libint2_src_lib_libint_genericgaussderivimpl_h_ 20 #define _libint2_src_lib_libint_genericgaussderivimpl_h_ 22 #include <GenericGaussDeriv.h> 34 LIBINT2_REALTYPE* target,
35 const LIBINT2_REALTYPE* src0,
36 const LIBINT2_REALTYPE* src1,
40 const LIBINT2_REALTYPE (&two_alpha)[LIBINT2_MAX_VECLEN]
44 const unsigned int veclen = vectorize ? inteval->veclen : 1;
45 const unsigned int lveclen = lowdim * veclen;
47 const unsigned int N = INT_NCART(L);
48 const unsigned int Np1 = INT_NCART(L+1);
49 const unsigned int Nm1 = L > 0 ? INT_NCART(L-1) : 0;
51 for(
unsigned int h=0, target_idx=0; h<highdim; ++h) {
53 const unsigned int hNp1 = h * Np1;
54 const unsigned int hNm1 = h * Nm1;
57 FOR_CART(ax, ay, az, L)
59 int a[3]; a[0] = ax; a[1] = ay; a[2] = az;
63 const unsigned int iap1 = INT_CARTINDEX(L+1,a[0],a[1]);
64 const unsigned int ap1_offset = (hNp1 + iap1) * lveclen;
65 const LIBINT2_REALTYPE* src0_ptr = src0 + ap1_offset;
68 const bool have_am1 = (a[dir] > 0);
71 unsigned int am1_offset;
72 const LIBINT2_REALTYPE* src1_ptr;
75 iam1 = INT_CARTINDEX(L-1,a[0],a[1]);
76 am1_offset = (hNm1 + iam1) * lveclen;
77 src1_ptr = src1 + am1_offset;
80 LIBINT2_REALTYPE adir_real = LIBINT2_REALTYPE(a[dir]);
83 for(
unsigned int l = 0, lv=0; l < lowdim; ++l) {
84 for(
unsigned int v=0; v<veclen; ++v, ++lv, ++target_idx) {
85 target[target_idx] = two_alpha[v] * src0_ptr[lv] - adir_real * src1_ptr[lv];
89 for(
unsigned int l = 0, lv=0; l < lowdim; ++l) {
90 for(
unsigned int v=0; v<veclen; ++v, ++lv, ++target_idx) {
91 target[target_idx] = two_alpha[v] * src0_ptr[lv];
95 #if LIBINT2_FLOP_COUNT 96 inteval->nflops[0] += (have_am1 ? 3 : 1) * lveclen;
106 #endif // header guard static void compute(const Libint_t *inteval, LIBINT2_REALTYPE *target, const LIBINT2_REALTYPE *src0, const LIBINT2_REALTYPE *src1, unsigned int highdim, unsigned int lowdim, unsigned int dir, const LIBINT2_REALTYPE(&two_alpha)[LIBINT2_MAX_VECLEN])
builds ( ...
Definition: GenericGaussDeriv.impl.h:33
Defaults definitions for various parameters assumed by Libint.
Definition: algebra.cc:23
Definition: test_eri_rys.cc:46