21 #ifndef _libint2_src_lib_libint_genericgaussderivimpl_h_ 22 #define _libint2_src_lib_libint_genericgaussderivimpl_h_ 24 #include <GenericGaussDeriv.h> 36 LIBINT2_REALTYPE* target,
37 const LIBINT2_REALTYPE* src0,
38 const LIBINT2_REALTYPE* src1,
42 const LIBINT2_REALTYPE (&two_alpha)[LIBINT2_MAX_VECLEN]
46 const unsigned int veclen = vectorize ? inteval->veclen : 1;
47 const unsigned int lveclen = lowdim * veclen;
49 const unsigned int N = INT_NCART(L);
50 const unsigned int Np1 = INT_NCART(L+1);
51 const unsigned int Nm1 = L > 0 ? INT_NCART(L-1) : 0;
53 for(
unsigned int h=0, target_idx=0; h<highdim; ++h) {
55 const unsigned int hNp1 = h * Np1;
56 const unsigned int hNm1 = h * Nm1;
59 FOR_CART(ax, ay, az, L)
61 int a[3]; a[0] = ax; a[1] = ay; a[2] = az;
65 const unsigned int iap1 = INT_CARTINDEX(L+1,a[0],a[1]);
66 const unsigned int ap1_offset = (hNp1 + iap1) * lveclen;
67 const LIBINT2_REALTYPE* src0_ptr = src0 + ap1_offset;
70 const bool have_am1 = (a[dir] > 0);
73 unsigned int am1_offset;
74 const LIBINT2_REALTYPE* src1_ptr;
77 iam1 = INT_CARTINDEX(L-1,a[0],a[1]);
78 am1_offset = (hNm1 + iam1) * lveclen;
79 src1_ptr = src1 + am1_offset;
82 LIBINT2_REALTYPE adir_real = LIBINT2_REALTYPE(a[dir]);
85 for(
unsigned int l = 0, lv=0; l < lowdim; ++l) {
86 for(
unsigned int v=0; v<veclen; ++v, ++lv, ++target_idx) {
87 target[target_idx] = two_alpha[v] * src0_ptr[lv] - adir_real * src1_ptr[lv];
91 for(
unsigned int l = 0, lv=0; l < lowdim; ++l) {
92 for(
unsigned int v=0; v<veclen; ++v, ++lv, ++target_idx) {
93 target[target_idx] = two_alpha[v] * src0_ptr[lv];
97 #if LIBINT2_FLOP_COUNT 98 inteval->nflops[0] += (have_am1 ? 3 : 1) * lveclen;
108 #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:35
Defaults definitions for various parameters assumed by Libint.
Definition: algebra.cc:24