1 #include "simint/boys/boys.h"
2 #include "simint/ostei/gen/ostei_generated.h"
3 #include "simint/vectorization/vectorization.h"
4 #include <math.h>
5 #include <string.h>
6
7
ostei_i_s_g_g(struct simint_multi_shellpair const P,struct simint_multi_shellpair const Q,double screen_tol,double * const restrict work,double * const restrict INT__i_s_g_g)8 int ostei_i_s_g_g(struct simint_multi_shellpair const P,
9 struct simint_multi_shellpair const Q,
10 double screen_tol,
11 double * const restrict work,
12 double * const restrict INT__i_s_g_g)
13 {
14
15 SIMINT_ASSUME_ALIGN_DBL(work);
16 SIMINT_ASSUME_ALIGN_DBL(INT__i_s_g_g);
17 int ab, cd, abcd;
18 int istart, jstart;
19 int iprimcd, nprim_icd, icd;
20 const int check_screen = (screen_tol > 0.0);
21 int i, j;
22 int n;
23 int not_screened;
24 int real_abcd;
25 int ibra;
26
27 // partition workspace
28 double * const INT__i_s_g_s = work + (SIMINT_NSHELL_SIMD * 0);
29 double * const INT__i_s_h_s = work + (SIMINT_NSHELL_SIMD * 420);
30 double * const INT__i_s_i_s = work + (SIMINT_NSHELL_SIMD * 1008);
31 double * const INT__i_s_k_s = work + (SIMINT_NSHELL_SIMD * 1792);
32 double * const INT__i_s_l_s = work + (SIMINT_NSHELL_SIMD * 2800);
33 SIMINT_DBLTYPE * const primwork = (SIMINT_DBLTYPE *)(work + SIMINT_NSHELL_SIMD*4060);
34 SIMINT_DBLTYPE * const restrict PRIM_INT__s_s_s_s = primwork + 0;
35 SIMINT_DBLTYPE * const restrict PRIM_INT__s_s_p_s = primwork + 15;
36 SIMINT_DBLTYPE * const restrict PRIM_INT__s_s_d_s = primwork + 57;
37 SIMINT_DBLTYPE * const restrict PRIM_INT__s_s_f_s = primwork + 135;
38 SIMINT_DBLTYPE * const restrict PRIM_INT__s_s_g_s = primwork + 255;
39 SIMINT_DBLTYPE * const restrict PRIM_INT__s_s_h_s = primwork + 420;
40 SIMINT_DBLTYPE * const restrict PRIM_INT__s_s_i_s = primwork + 630;
41 SIMINT_DBLTYPE * const restrict PRIM_INT__s_s_k_s = primwork + 882;
42 SIMINT_DBLTYPE * const restrict PRIM_INT__s_s_l_s = primwork + 1170;
43 SIMINT_DBLTYPE * const restrict PRIM_INT__p_s_s_s = primwork + 1485;
44 SIMINT_DBLTYPE * const restrict PRIM_INT__p_s_p_s = primwork + 1503;
45 SIMINT_DBLTYPE * const restrict PRIM_INT__p_s_d_s = primwork + 1557;
46 SIMINT_DBLTYPE * const restrict PRIM_INT__p_s_f_s = primwork + 1665;
47 SIMINT_DBLTYPE * const restrict PRIM_INT__p_s_g_s = primwork + 1845;
48 SIMINT_DBLTYPE * const restrict PRIM_INT__p_s_h_s = primwork + 2115;
49 SIMINT_DBLTYPE * const restrict PRIM_INT__p_s_i_s = primwork + 2493;
50 SIMINT_DBLTYPE * const restrict PRIM_INT__p_s_k_s = primwork + 2997;
51 SIMINT_DBLTYPE * const restrict PRIM_INT__p_s_l_s = primwork + 3645;
52 SIMINT_DBLTYPE * const restrict PRIM_INT__d_s_s_s = primwork + 4455;
53 SIMINT_DBLTYPE * const restrict PRIM_INT__d_s_p_s = primwork + 4485;
54 SIMINT_DBLTYPE * const restrict PRIM_INT__d_s_d_s = primwork + 4575;
55 SIMINT_DBLTYPE * const restrict PRIM_INT__d_s_f_s = primwork + 4755;
56 SIMINT_DBLTYPE * const restrict PRIM_INT__d_s_g_s = primwork + 5055;
57 SIMINT_DBLTYPE * const restrict PRIM_INT__d_s_h_s = primwork + 5505;
58 SIMINT_DBLTYPE * const restrict PRIM_INT__d_s_i_s = primwork + 6135;
59 SIMINT_DBLTYPE * const restrict PRIM_INT__d_s_k_s = primwork + 6975;
60 SIMINT_DBLTYPE * const restrict PRIM_INT__d_s_l_s = primwork + 8055;
61 SIMINT_DBLTYPE * const restrict PRIM_INT__f_s_p_s = primwork + 9405;
62 SIMINT_DBLTYPE * const restrict PRIM_INT__f_s_d_s = primwork + 9525;
63 SIMINT_DBLTYPE * const restrict PRIM_INT__f_s_f_s = primwork + 9765;
64 SIMINT_DBLTYPE * const restrict PRIM_INT__f_s_g_s = primwork + 10165;
65 SIMINT_DBLTYPE * const restrict PRIM_INT__f_s_h_s = primwork + 10765;
66 SIMINT_DBLTYPE * const restrict PRIM_INT__f_s_i_s = primwork + 11605;
67 SIMINT_DBLTYPE * const restrict PRIM_INT__f_s_k_s = primwork + 12725;
68 SIMINT_DBLTYPE * const restrict PRIM_INT__f_s_l_s = primwork + 14165;
69 SIMINT_DBLTYPE * const restrict PRIM_INT__g_s_d_s = primwork + 15965;
70 SIMINT_DBLTYPE * const restrict PRIM_INT__g_s_f_s = primwork + 16235;
71 SIMINT_DBLTYPE * const restrict PRIM_INT__g_s_g_s = primwork + 16685;
72 SIMINT_DBLTYPE * const restrict PRIM_INT__g_s_h_s = primwork + 17360;
73 SIMINT_DBLTYPE * const restrict PRIM_INT__g_s_i_s = primwork + 18305;
74 SIMINT_DBLTYPE * const restrict PRIM_INT__g_s_k_s = primwork + 19565;
75 SIMINT_DBLTYPE * const restrict PRIM_INT__g_s_l_s = primwork + 21185;
76 SIMINT_DBLTYPE * const restrict PRIM_INT__h_s_f_s = primwork + 23210;
77 SIMINT_DBLTYPE * const restrict PRIM_INT__h_s_g_s = primwork + 23630;
78 SIMINT_DBLTYPE * const restrict PRIM_INT__h_s_h_s = primwork + 24260;
79 SIMINT_DBLTYPE * const restrict PRIM_INT__h_s_i_s = primwork + 25142;
80 SIMINT_DBLTYPE * const restrict PRIM_INT__h_s_k_s = primwork + 26318;
81 SIMINT_DBLTYPE * const restrict PRIM_INT__h_s_l_s = primwork + 27830;
82 SIMINT_DBLTYPE * const restrict PRIM_INT__i_s_g_s = primwork + 29720;
83 SIMINT_DBLTYPE * const restrict PRIM_INT__i_s_h_s = primwork + 30140;
84 SIMINT_DBLTYPE * const restrict PRIM_INT__i_s_i_s = primwork + 30728;
85 SIMINT_DBLTYPE * const restrict PRIM_INT__i_s_k_s = primwork + 31512;
86 SIMINT_DBLTYPE * const restrict PRIM_INT__i_s_l_s = primwork + 32520;
87 double * const hrrwork = (double *)(primwork + 33780);
88 double * const HRR_INT__i_s_g_p = hrrwork + 0;
89 double * const HRR_INT__i_s_g_d = hrrwork + 1260;
90 double * const HRR_INT__i_s_g_f = hrrwork + 3780;
91 double * const HRR_INT__i_s_h_p = hrrwork + 7980;
92 double * const HRR_INT__i_s_h_d = hrrwork + 9744;
93 double * const HRR_INT__i_s_h_f = hrrwork + 13272;
94 double * const HRR_INT__i_s_i_p = hrrwork + 19152;
95 double * const HRR_INT__i_s_i_d = hrrwork + 21504;
96 double * const HRR_INT__i_s_k_p = hrrwork + 26208;
97
98
99 // Create constants
100 const SIMINT_DBLTYPE const_1 = SIMINT_DBLSET1(1);
101 const SIMINT_DBLTYPE const_2 = SIMINT_DBLSET1(2);
102 const SIMINT_DBLTYPE const_3 = SIMINT_DBLSET1(3);
103 const SIMINT_DBLTYPE const_4 = SIMINT_DBLSET1(4);
104 const SIMINT_DBLTYPE const_5 = SIMINT_DBLSET1(5);
105 const SIMINT_DBLTYPE const_6 = SIMINT_DBLSET1(6);
106 const SIMINT_DBLTYPE const_7 = SIMINT_DBLSET1(7);
107 const SIMINT_DBLTYPE const_8 = SIMINT_DBLSET1(8);
108 const SIMINT_DBLTYPE one_half = SIMINT_DBLSET1(0.5);
109
110
111 ////////////////////////////////////////
112 // Loop over shells and primitives
113 ////////////////////////////////////////
114
115 real_abcd = 0;
116 istart = 0;
117 for(ab = 0; ab < P.nshell12_clip; ++ab)
118 {
119 const int iend = istart + P.nprim12[ab];
120
121 cd = 0;
122 jstart = 0;
123
124 for(cd = 0; cd < Q.nshell12_clip; cd += SIMINT_NSHELL_SIMD)
125 {
126 const int nshellbatch = ((cd + SIMINT_NSHELL_SIMD) > Q.nshell12_clip) ? Q.nshell12_clip - cd : SIMINT_NSHELL_SIMD;
127 int jend = jstart;
128 for(i = 0; i < nshellbatch; i++)
129 jend += Q.nprim12[cd+i];
130
131 // Clear the beginning of the workspace (where we are accumulating integrals)
132 memset(work, 0, SIMINT_NSHELL_SIMD * 4060 * sizeof(double));
133 abcd = 0;
134
135
136 for(i = istart; i < iend; ++i)
137 {
138 SIMINT_DBLTYPE bra_screen_max; // only used if check_screen
139
140 if(check_screen)
141 {
142 // Skip this whole thing if always insignificant
143 if((P.screen[i] * Q.screen_max) < screen_tol)
144 continue;
145 bra_screen_max = SIMINT_DBLSET1(P.screen[i]);
146 }
147
148 icd = 0;
149 iprimcd = 0;
150 nprim_icd = Q.nprim12[cd];
151 double * restrict PRIM_PTR_INT__i_s_g_s = INT__i_s_g_s + abcd * 420;
152 double * restrict PRIM_PTR_INT__i_s_h_s = INT__i_s_h_s + abcd * 588;
153 double * restrict PRIM_PTR_INT__i_s_i_s = INT__i_s_i_s + abcd * 784;
154 double * restrict PRIM_PTR_INT__i_s_k_s = INT__i_s_k_s + abcd * 1008;
155 double * restrict PRIM_PTR_INT__i_s_l_s = INT__i_s_l_s + abcd * 1260;
156
157
158
159 // Load these one per loop over i
160 const SIMINT_DBLTYPE P_alpha = SIMINT_DBLSET1(P.alpha[i]);
161 const SIMINT_DBLTYPE P_prefac = SIMINT_DBLSET1(P.prefac[i]);
162 const SIMINT_DBLTYPE Pxyz[3] = { SIMINT_DBLSET1(P.x[i]), SIMINT_DBLSET1(P.y[i]), SIMINT_DBLSET1(P.z[i]) };
163
164 const SIMINT_DBLTYPE P_PA[3] = { SIMINT_DBLSET1(P.PA_x[i]), SIMINT_DBLSET1(P.PA_y[i]), SIMINT_DBLSET1(P.PA_z[i]) };
165
166 for(j = jstart; j < jend; j += SIMINT_SIMD_LEN)
167 {
168 // calculate the shell offsets
169 // these are the offset from the shell pointed to by cd
170 // for each element
171 int shelloffsets[SIMINT_SIMD_LEN] = {0};
172 int lastoffset = 0;
173 const int nlane = ( ((j + SIMINT_SIMD_LEN) < jend) ? SIMINT_SIMD_LEN : (jend - j));
174
175 if((iprimcd + SIMINT_SIMD_LEN) >= nprim_icd)
176 {
177 // Handle if the first element of the vector is a new shell
178 if(iprimcd >= nprim_icd && ((icd+1) < nshellbatch))
179 {
180 nprim_icd += Q.nprim12[cd + (++icd)];
181 PRIM_PTR_INT__i_s_g_s += 420;
182 PRIM_PTR_INT__i_s_h_s += 588;
183 PRIM_PTR_INT__i_s_i_s += 784;
184 PRIM_PTR_INT__i_s_k_s += 1008;
185 PRIM_PTR_INT__i_s_l_s += 1260;
186 }
187 iprimcd++;
188 for(n = 1; n < SIMINT_SIMD_LEN; ++n)
189 {
190 if(iprimcd >= nprim_icd && ((icd+1) < nshellbatch))
191 {
192 shelloffsets[n] = shelloffsets[n-1] + 1;
193 lastoffset++;
194 nprim_icd += Q.nprim12[cd + (++icd)];
195 }
196 else
197 shelloffsets[n] = shelloffsets[n-1];
198 iprimcd++;
199 }
200 }
201 else
202 iprimcd += SIMINT_SIMD_LEN;
203
204 // Do we have to compute this vector (or has it been screened out)?
205 // (not_screened != 0 means we have to do this vector)
206 if(check_screen)
207 {
208 const double vmax = vector_max(SIMINT_MUL(bra_screen_max, SIMINT_DBLLOAD(Q.screen, j)));
209 if(vmax < screen_tol)
210 {
211 PRIM_PTR_INT__i_s_g_s += lastoffset*420;
212 PRIM_PTR_INT__i_s_h_s += lastoffset*588;
213 PRIM_PTR_INT__i_s_i_s += lastoffset*784;
214 PRIM_PTR_INT__i_s_k_s += lastoffset*1008;
215 PRIM_PTR_INT__i_s_l_s += lastoffset*1260;
216 continue;
217 }
218 }
219
220 const SIMINT_DBLTYPE Q_alpha = SIMINT_DBLLOAD(Q.alpha, j);
221 const SIMINT_DBLTYPE PQalpha_mul = SIMINT_MUL(P_alpha, Q_alpha);
222 const SIMINT_DBLTYPE PQalpha_sum = SIMINT_ADD(P_alpha, Q_alpha);
223 const SIMINT_DBLTYPE one_over_PQalpha_sum = SIMINT_DIV(const_1, PQalpha_sum);
224
225
226 /* construct R2 = (Px - Qx)**2 + (Py - Qy)**2 + (Pz -Qz)**2 */
227 SIMINT_DBLTYPE PQ[3];
228 PQ[0] = SIMINT_SUB(Pxyz[0], SIMINT_DBLLOAD(Q.x, j));
229 PQ[1] = SIMINT_SUB(Pxyz[1], SIMINT_DBLLOAD(Q.y, j));
230 PQ[2] = SIMINT_SUB(Pxyz[2], SIMINT_DBLLOAD(Q.z, j));
231 SIMINT_DBLTYPE R2 = SIMINT_MUL(PQ[0], PQ[0]);
232 R2 = SIMINT_FMADD(PQ[1], PQ[1], R2);
233 R2 = SIMINT_FMADD(PQ[2], PQ[2], R2);
234
235 const SIMINT_DBLTYPE alpha = SIMINT_MUL(PQalpha_mul, one_over_PQalpha_sum); // alpha from MEST
236 const SIMINT_DBLTYPE one_over_p = SIMINT_DIV(const_1, P_alpha);
237 const SIMINT_DBLTYPE one_over_q = SIMINT_DIV(const_1, Q_alpha);
238 const SIMINT_DBLTYPE one_over_2p = SIMINT_MUL(one_half, one_over_p);
239 const SIMINT_DBLTYPE one_over_2q = SIMINT_MUL(one_half, one_over_q);
240 const SIMINT_DBLTYPE one_over_2pq = SIMINT_MUL(one_half, one_over_PQalpha_sum);
241 const SIMINT_DBLTYPE Q_PA[3] = { SIMINT_DBLLOAD(Q.PA_x, j), SIMINT_DBLLOAD(Q.PA_y, j), SIMINT_DBLLOAD(Q.PA_z, j) };
242
243 // NOTE: Minus sign!
244 const SIMINT_DBLTYPE a_over_p = SIMINT_MUL(SIMINT_NEG(alpha), one_over_p);
245 SIMINT_DBLTYPE aop_PQ[3];
246 aop_PQ[0] = SIMINT_MUL(a_over_p, PQ[0]);
247 aop_PQ[1] = SIMINT_MUL(a_over_p, PQ[1]);
248 aop_PQ[2] = SIMINT_MUL(a_over_p, PQ[2]);
249
250 SIMINT_DBLTYPE a_over_q = SIMINT_MUL(alpha, one_over_q);
251 SIMINT_DBLTYPE aoq_PQ[3];
252 aoq_PQ[0] = SIMINT_MUL(a_over_q, PQ[0]);
253 aoq_PQ[1] = SIMINT_MUL(a_over_q, PQ[1]);
254 aoq_PQ[2] = SIMINT_MUL(a_over_q, PQ[2]);
255 // Put a minus sign here so we don't have to in RR routines
256 a_over_q = SIMINT_NEG(a_over_q);
257
258
259 //////////////////////////////////////////////
260 // Fjt function section
261 // Maximum v value: 14
262 //////////////////////////////////////////////
263 // The parameter to the Fjt function
264 const SIMINT_DBLTYPE F_x = SIMINT_MUL(R2, alpha);
265
266
267 const SIMINT_DBLTYPE Q_prefac = mask_load(nlane, Q.prefac + j);
268
269
270 boys_F_split(PRIM_INT__s_s_s_s, F_x, 14);
271 SIMINT_DBLTYPE prefac = SIMINT_SQRT(one_over_PQalpha_sum);
272 prefac = SIMINT_MUL(SIMINT_MUL(P_prefac, Q_prefac), prefac);
273 for(n = 0; n <= 14; n++)
274 PRIM_INT__s_s_s_s[n] = SIMINT_MUL(PRIM_INT__s_s_s_s[n], prefac);
275
276 //////////////////////////////////////////////
277 // Primitive integrals: Vertical recurrance
278 //////////////////////////////////////////////
279
280 const SIMINT_DBLTYPE vrr_const_1_over_2p = one_over_2p;
281 const SIMINT_DBLTYPE vrr_const_2_over_2p = SIMINT_MUL(const_2, one_over_2p);
282 const SIMINT_DBLTYPE vrr_const_3_over_2p = SIMINT_MUL(const_3, one_over_2p);
283 const SIMINT_DBLTYPE vrr_const_4_over_2p = SIMINT_MUL(const_4, one_over_2p);
284 const SIMINT_DBLTYPE vrr_const_5_over_2p = SIMINT_MUL(const_5, one_over_2p);
285 const SIMINT_DBLTYPE vrr_const_1_over_2q = one_over_2q;
286 const SIMINT_DBLTYPE vrr_const_2_over_2q = SIMINT_MUL(const_2, one_over_2q);
287 const SIMINT_DBLTYPE vrr_const_3_over_2q = SIMINT_MUL(const_3, one_over_2q);
288 const SIMINT_DBLTYPE vrr_const_4_over_2q = SIMINT_MUL(const_4, one_over_2q);
289 const SIMINT_DBLTYPE vrr_const_5_over_2q = SIMINT_MUL(const_5, one_over_2q);
290 const SIMINT_DBLTYPE vrr_const_6_over_2q = SIMINT_MUL(const_6, one_over_2q);
291 const SIMINT_DBLTYPE vrr_const_7_over_2q = SIMINT_MUL(const_7, one_over_2q);
292 const SIMINT_DBLTYPE vrr_const_1_over_2pq = one_over_2pq;
293 const SIMINT_DBLTYPE vrr_const_2_over_2pq = SIMINT_MUL(const_2, one_over_2pq);
294 const SIMINT_DBLTYPE vrr_const_3_over_2pq = SIMINT_MUL(const_3, one_over_2pq);
295 const SIMINT_DBLTYPE vrr_const_4_over_2pq = SIMINT_MUL(const_4, one_over_2pq);
296 const SIMINT_DBLTYPE vrr_const_5_over_2pq = SIMINT_MUL(const_5, one_over_2pq);
297 const SIMINT_DBLTYPE vrr_const_6_over_2pq = SIMINT_MUL(const_6, one_over_2pq);
298 const SIMINT_DBLTYPE vrr_const_7_over_2pq = SIMINT_MUL(const_7, one_over_2pq);
299 const SIMINT_DBLTYPE vrr_const_8_over_2pq = SIMINT_MUL(const_8, one_over_2pq);
300
301
302
303 // Forming PRIM_INT__s_s_p_s[14 * 3];
304 for(n = 0; n < 14; ++n) // loop over orders of auxiliary function
305 {
306
307 PRIM_INT__s_s_p_s[n * 3 + 0] = SIMINT_MUL(Q_PA[0], PRIM_INT__s_s_s_s[n * 1 + 0]);
308 PRIM_INT__s_s_p_s[n * 3 + 0] = SIMINT_FMADD( aoq_PQ[0], PRIM_INT__s_s_s_s[(n+1) * 1 + 0], PRIM_INT__s_s_p_s[n * 3 + 0]);
309
310 PRIM_INT__s_s_p_s[n * 3 + 1] = SIMINT_MUL(Q_PA[1], PRIM_INT__s_s_s_s[n * 1 + 0]);
311 PRIM_INT__s_s_p_s[n * 3 + 1] = SIMINT_FMADD( aoq_PQ[1], PRIM_INT__s_s_s_s[(n+1) * 1 + 0], PRIM_INT__s_s_p_s[n * 3 + 1]);
312
313 PRIM_INT__s_s_p_s[n * 3 + 2] = SIMINT_MUL(Q_PA[2], PRIM_INT__s_s_s_s[n * 1 + 0]);
314 PRIM_INT__s_s_p_s[n * 3 + 2] = SIMINT_FMADD( aoq_PQ[2], PRIM_INT__s_s_s_s[(n+1) * 1 + 0], PRIM_INT__s_s_p_s[n * 3 + 2]);
315
316 }
317
318
319
320 // Forming PRIM_INT__s_s_d_s[13 * 6];
321 for(n = 0; n < 13; ++n) // loop over orders of auxiliary function
322 {
323
324 PRIM_INT__s_s_d_s[n * 6 + 0] = SIMINT_MUL(Q_PA[0], PRIM_INT__s_s_p_s[n * 3 + 0]);
325 PRIM_INT__s_s_d_s[n * 6 + 0] = SIMINT_FMADD( aoq_PQ[0], PRIM_INT__s_s_p_s[(n+1) * 3 + 0], PRIM_INT__s_s_d_s[n * 6 + 0]);
326 PRIM_INT__s_s_d_s[n * 6 + 0] = SIMINT_FMADD( vrr_const_1_over_2q, SIMINT_FMADD(a_over_q, PRIM_INT__s_s_s_s[(n+1) * 1 + 0], PRIM_INT__s_s_s_s[n * 1 + 0]), PRIM_INT__s_s_d_s[n * 6 + 0]);
327
328 PRIM_INT__s_s_d_s[n * 6 + 1] = SIMINT_MUL(Q_PA[1], PRIM_INT__s_s_p_s[n * 3 + 0]);
329 PRIM_INT__s_s_d_s[n * 6 + 1] = SIMINT_FMADD( aoq_PQ[1], PRIM_INT__s_s_p_s[(n+1) * 3 + 0], PRIM_INT__s_s_d_s[n * 6 + 1]);
330
331 PRIM_INT__s_s_d_s[n * 6 + 2] = SIMINT_MUL(Q_PA[2], PRIM_INT__s_s_p_s[n * 3 + 0]);
332 PRIM_INT__s_s_d_s[n * 6 + 2] = SIMINT_FMADD( aoq_PQ[2], PRIM_INT__s_s_p_s[(n+1) * 3 + 0], PRIM_INT__s_s_d_s[n * 6 + 2]);
333
334 PRIM_INT__s_s_d_s[n * 6 + 3] = SIMINT_MUL(Q_PA[1], PRIM_INT__s_s_p_s[n * 3 + 1]);
335 PRIM_INT__s_s_d_s[n * 6 + 3] = SIMINT_FMADD( aoq_PQ[1], PRIM_INT__s_s_p_s[(n+1) * 3 + 1], PRIM_INT__s_s_d_s[n * 6 + 3]);
336 PRIM_INT__s_s_d_s[n * 6 + 3] = SIMINT_FMADD( vrr_const_1_over_2q, SIMINT_FMADD(a_over_q, PRIM_INT__s_s_s_s[(n+1) * 1 + 0], PRIM_INT__s_s_s_s[n * 1 + 0]), PRIM_INT__s_s_d_s[n * 6 + 3]);
337
338 PRIM_INT__s_s_d_s[n * 6 + 4] = SIMINT_MUL(Q_PA[2], PRIM_INT__s_s_p_s[n * 3 + 1]);
339 PRIM_INT__s_s_d_s[n * 6 + 4] = SIMINT_FMADD( aoq_PQ[2], PRIM_INT__s_s_p_s[(n+1) * 3 + 1], PRIM_INT__s_s_d_s[n * 6 + 4]);
340
341 PRIM_INT__s_s_d_s[n * 6 + 5] = SIMINT_MUL(Q_PA[2], PRIM_INT__s_s_p_s[n * 3 + 2]);
342 PRIM_INT__s_s_d_s[n * 6 + 5] = SIMINT_FMADD( aoq_PQ[2], PRIM_INT__s_s_p_s[(n+1) * 3 + 2], PRIM_INT__s_s_d_s[n * 6 + 5]);
343 PRIM_INT__s_s_d_s[n * 6 + 5] = SIMINT_FMADD( vrr_const_1_over_2q, SIMINT_FMADD(a_over_q, PRIM_INT__s_s_s_s[(n+1) * 1 + 0], PRIM_INT__s_s_s_s[n * 1 + 0]), PRIM_INT__s_s_d_s[n * 6 + 5]);
344
345 }
346
347
348
349 // Forming PRIM_INT__s_s_f_s[12 * 10];
350 for(n = 0; n < 12; ++n) // loop over orders of auxiliary function
351 {
352
353 PRIM_INT__s_s_f_s[n * 10 + 0] = SIMINT_MUL(Q_PA[0], PRIM_INT__s_s_d_s[n * 6 + 0]);
354 PRIM_INT__s_s_f_s[n * 10 + 0] = SIMINT_FMADD( aoq_PQ[0], PRIM_INT__s_s_d_s[(n+1) * 6 + 0], PRIM_INT__s_s_f_s[n * 10 + 0]);
355 PRIM_INT__s_s_f_s[n * 10 + 0] = SIMINT_FMADD( vrr_const_2_over_2q, SIMINT_FMADD(a_over_q, PRIM_INT__s_s_p_s[(n+1) * 3 + 0], PRIM_INT__s_s_p_s[n * 3 + 0]), PRIM_INT__s_s_f_s[n * 10 + 0]);
356
357 PRIM_INT__s_s_f_s[n * 10 + 1] = SIMINT_MUL(Q_PA[1], PRIM_INT__s_s_d_s[n * 6 + 0]);
358 PRIM_INT__s_s_f_s[n * 10 + 1] = SIMINT_FMADD( aoq_PQ[1], PRIM_INT__s_s_d_s[(n+1) * 6 + 0], PRIM_INT__s_s_f_s[n * 10 + 1]);
359
360 PRIM_INT__s_s_f_s[n * 10 + 2] = SIMINT_MUL(Q_PA[2], PRIM_INT__s_s_d_s[n * 6 + 0]);
361 PRIM_INT__s_s_f_s[n * 10 + 2] = SIMINT_FMADD( aoq_PQ[2], PRIM_INT__s_s_d_s[(n+1) * 6 + 0], PRIM_INT__s_s_f_s[n * 10 + 2]);
362
363 PRIM_INT__s_s_f_s[n * 10 + 3] = SIMINT_MUL(Q_PA[0], PRIM_INT__s_s_d_s[n * 6 + 3]);
364 PRIM_INT__s_s_f_s[n * 10 + 3] = SIMINT_FMADD( aoq_PQ[0], PRIM_INT__s_s_d_s[(n+1) * 6 + 3], PRIM_INT__s_s_f_s[n * 10 + 3]);
365
366 PRIM_INT__s_s_f_s[n * 10 + 4] = SIMINT_MUL(Q_PA[2], PRIM_INT__s_s_d_s[n * 6 + 1]);
367 PRIM_INT__s_s_f_s[n * 10 + 4] = SIMINT_FMADD( aoq_PQ[2], PRIM_INT__s_s_d_s[(n+1) * 6 + 1], PRIM_INT__s_s_f_s[n * 10 + 4]);
368
369 PRIM_INT__s_s_f_s[n * 10 + 5] = SIMINT_MUL(Q_PA[0], PRIM_INT__s_s_d_s[n * 6 + 5]);
370 PRIM_INT__s_s_f_s[n * 10 + 5] = SIMINT_FMADD( aoq_PQ[0], PRIM_INT__s_s_d_s[(n+1) * 6 + 5], PRIM_INT__s_s_f_s[n * 10 + 5]);
371
372 PRIM_INT__s_s_f_s[n * 10 + 6] = SIMINT_MUL(Q_PA[1], PRIM_INT__s_s_d_s[n * 6 + 3]);
373 PRIM_INT__s_s_f_s[n * 10 + 6] = SIMINT_FMADD( aoq_PQ[1], PRIM_INT__s_s_d_s[(n+1) * 6 + 3], PRIM_INT__s_s_f_s[n * 10 + 6]);
374 PRIM_INT__s_s_f_s[n * 10 + 6] = SIMINT_FMADD( vrr_const_2_over_2q, SIMINT_FMADD(a_over_q, PRIM_INT__s_s_p_s[(n+1) * 3 + 1], PRIM_INT__s_s_p_s[n * 3 + 1]), PRIM_INT__s_s_f_s[n * 10 + 6]);
375
376 PRIM_INT__s_s_f_s[n * 10 + 7] = SIMINT_MUL(Q_PA[2], PRIM_INT__s_s_d_s[n * 6 + 3]);
377 PRIM_INT__s_s_f_s[n * 10 + 7] = SIMINT_FMADD( aoq_PQ[2], PRIM_INT__s_s_d_s[(n+1) * 6 + 3], PRIM_INT__s_s_f_s[n * 10 + 7]);
378
379 PRIM_INT__s_s_f_s[n * 10 + 8] = SIMINT_MUL(Q_PA[1], PRIM_INT__s_s_d_s[n * 6 + 5]);
380 PRIM_INT__s_s_f_s[n * 10 + 8] = SIMINT_FMADD( aoq_PQ[1], PRIM_INT__s_s_d_s[(n+1) * 6 + 5], PRIM_INT__s_s_f_s[n * 10 + 8]);
381
382 PRIM_INT__s_s_f_s[n * 10 + 9] = SIMINT_MUL(Q_PA[2], PRIM_INT__s_s_d_s[n * 6 + 5]);
383 PRIM_INT__s_s_f_s[n * 10 + 9] = SIMINT_FMADD( aoq_PQ[2], PRIM_INT__s_s_d_s[(n+1) * 6 + 5], PRIM_INT__s_s_f_s[n * 10 + 9]);
384 PRIM_INT__s_s_f_s[n * 10 + 9] = SIMINT_FMADD( vrr_const_2_over_2q, SIMINT_FMADD(a_over_q, PRIM_INT__s_s_p_s[(n+1) * 3 + 2], PRIM_INT__s_s_p_s[n * 3 + 2]), PRIM_INT__s_s_f_s[n * 10 + 9]);
385
386 }
387
388
389 VRR_K_s_s_g_s(
390 PRIM_INT__s_s_g_s,
391 PRIM_INT__s_s_f_s,
392 PRIM_INT__s_s_d_s,
393 Q_PA,
394 a_over_q,
395 aoq_PQ,
396 one_over_2q,
397 11);
398
399
400 VRR_I_p_s_g_s(
401 PRIM_INT__p_s_g_s,
402 PRIM_INT__s_s_g_s,
403 PRIM_INT__s_s_f_s,
404 P_PA,
405 aop_PQ,
406 one_over_2pq,
407 6);
408
409
410 VRR_I_p_s_f_s(
411 PRIM_INT__p_s_f_s,
412 PRIM_INT__s_s_f_s,
413 PRIM_INT__s_s_d_s,
414 P_PA,
415 aop_PQ,
416 one_over_2pq,
417 6);
418
419
420 ostei_general_vrr_I(2, 0, 4, 0, 5,
421 one_over_2p, a_over_p, one_over_2pq, aop_PQ, P_PA,
422 PRIM_INT__p_s_g_s, PRIM_INT__s_s_g_s, NULL, PRIM_INT__p_s_f_s, NULL, PRIM_INT__d_s_g_s);
423
424
425
426 // Forming PRIM_INT__p_s_d_s[6 * 18];
427 for(n = 0; n < 6; ++n) // loop over orders of auxiliary function
428 {
429
430 PRIM_INT__p_s_d_s[n * 18 + 0] = SIMINT_MUL(P_PA[0], PRIM_INT__s_s_d_s[n * 6 + 0]);
431 PRIM_INT__p_s_d_s[n * 18 + 0] = SIMINT_FMADD( aop_PQ[0], PRIM_INT__s_s_d_s[(n+1) * 6 + 0], PRIM_INT__p_s_d_s[n * 18 + 0]);
432 PRIM_INT__p_s_d_s[n * 18 + 0] = SIMINT_FMADD( vrr_const_2_over_2pq, PRIM_INT__s_s_p_s[(n+1) * 3 + 0], PRIM_INT__p_s_d_s[n * 18 + 0]);
433
434 PRIM_INT__p_s_d_s[n * 18 + 1] = SIMINT_MUL(P_PA[0], PRIM_INT__s_s_d_s[n * 6 + 1]);
435 PRIM_INT__p_s_d_s[n * 18 + 1] = SIMINT_FMADD( aop_PQ[0], PRIM_INT__s_s_d_s[(n+1) * 6 + 1], PRIM_INT__p_s_d_s[n * 18 + 1]);
436 PRIM_INT__p_s_d_s[n * 18 + 1] = SIMINT_FMADD( vrr_const_1_over_2pq, PRIM_INT__s_s_p_s[(n+1) * 3 + 1], PRIM_INT__p_s_d_s[n * 18 + 1]);
437
438 PRIM_INT__p_s_d_s[n * 18 + 2] = SIMINT_MUL(P_PA[0], PRIM_INT__s_s_d_s[n * 6 + 2]);
439 PRIM_INT__p_s_d_s[n * 18 + 2] = SIMINT_FMADD( aop_PQ[0], PRIM_INT__s_s_d_s[(n+1) * 6 + 2], PRIM_INT__p_s_d_s[n * 18 + 2]);
440 PRIM_INT__p_s_d_s[n * 18 + 2] = SIMINT_FMADD( vrr_const_1_over_2pq, PRIM_INT__s_s_p_s[(n+1) * 3 + 2], PRIM_INT__p_s_d_s[n * 18 + 2]);
441
442 PRIM_INT__p_s_d_s[n * 18 + 3] = SIMINT_MUL(P_PA[0], PRIM_INT__s_s_d_s[n * 6 + 3]);
443 PRIM_INT__p_s_d_s[n * 18 + 3] = SIMINT_FMADD( aop_PQ[0], PRIM_INT__s_s_d_s[(n+1) * 6 + 3], PRIM_INT__p_s_d_s[n * 18 + 3]);
444
445 PRIM_INT__p_s_d_s[n * 18 + 4] = SIMINT_MUL(P_PA[0], PRIM_INT__s_s_d_s[n * 6 + 4]);
446 PRIM_INT__p_s_d_s[n * 18 + 4] = SIMINT_FMADD( aop_PQ[0], PRIM_INT__s_s_d_s[(n+1) * 6 + 4], PRIM_INT__p_s_d_s[n * 18 + 4]);
447
448 PRIM_INT__p_s_d_s[n * 18 + 5] = SIMINT_MUL(P_PA[0], PRIM_INT__s_s_d_s[n * 6 + 5]);
449 PRIM_INT__p_s_d_s[n * 18 + 5] = SIMINT_FMADD( aop_PQ[0], PRIM_INT__s_s_d_s[(n+1) * 6 + 5], PRIM_INT__p_s_d_s[n * 18 + 5]);
450
451 PRIM_INT__p_s_d_s[n * 18 + 6] = SIMINT_MUL(P_PA[1], PRIM_INT__s_s_d_s[n * 6 + 0]);
452 PRIM_INT__p_s_d_s[n * 18 + 6] = SIMINT_FMADD( aop_PQ[1], PRIM_INT__s_s_d_s[(n+1) * 6 + 0], PRIM_INT__p_s_d_s[n * 18 + 6]);
453
454 PRIM_INT__p_s_d_s[n * 18 + 7] = SIMINT_MUL(P_PA[1], PRIM_INT__s_s_d_s[n * 6 + 1]);
455 PRIM_INT__p_s_d_s[n * 18 + 7] = SIMINT_FMADD( aop_PQ[1], PRIM_INT__s_s_d_s[(n+1) * 6 + 1], PRIM_INT__p_s_d_s[n * 18 + 7]);
456 PRIM_INT__p_s_d_s[n * 18 + 7] = SIMINT_FMADD( vrr_const_1_over_2pq, PRIM_INT__s_s_p_s[(n+1) * 3 + 0], PRIM_INT__p_s_d_s[n * 18 + 7]);
457
458 PRIM_INT__p_s_d_s[n * 18 + 8] = SIMINT_MUL(P_PA[1], PRIM_INT__s_s_d_s[n * 6 + 2]);
459 PRIM_INT__p_s_d_s[n * 18 + 8] = SIMINT_FMADD( aop_PQ[1], PRIM_INT__s_s_d_s[(n+1) * 6 + 2], PRIM_INT__p_s_d_s[n * 18 + 8]);
460
461 PRIM_INT__p_s_d_s[n * 18 + 9] = SIMINT_MUL(P_PA[1], PRIM_INT__s_s_d_s[n * 6 + 3]);
462 PRIM_INT__p_s_d_s[n * 18 + 9] = SIMINT_FMADD( aop_PQ[1], PRIM_INT__s_s_d_s[(n+1) * 6 + 3], PRIM_INT__p_s_d_s[n * 18 + 9]);
463 PRIM_INT__p_s_d_s[n * 18 + 9] = SIMINT_FMADD( vrr_const_2_over_2pq, PRIM_INT__s_s_p_s[(n+1) * 3 + 1], PRIM_INT__p_s_d_s[n * 18 + 9]);
464
465 PRIM_INT__p_s_d_s[n * 18 + 10] = SIMINT_MUL(P_PA[1], PRIM_INT__s_s_d_s[n * 6 + 4]);
466 PRIM_INT__p_s_d_s[n * 18 + 10] = SIMINT_FMADD( aop_PQ[1], PRIM_INT__s_s_d_s[(n+1) * 6 + 4], PRIM_INT__p_s_d_s[n * 18 + 10]);
467 PRIM_INT__p_s_d_s[n * 18 + 10] = SIMINT_FMADD( vrr_const_1_over_2pq, PRIM_INT__s_s_p_s[(n+1) * 3 + 2], PRIM_INT__p_s_d_s[n * 18 + 10]);
468
469 PRIM_INT__p_s_d_s[n * 18 + 11] = SIMINT_MUL(P_PA[1], PRIM_INT__s_s_d_s[n * 6 + 5]);
470 PRIM_INT__p_s_d_s[n * 18 + 11] = SIMINT_FMADD( aop_PQ[1], PRIM_INT__s_s_d_s[(n+1) * 6 + 5], PRIM_INT__p_s_d_s[n * 18 + 11]);
471
472 PRIM_INT__p_s_d_s[n * 18 + 12] = SIMINT_MUL(P_PA[2], PRIM_INT__s_s_d_s[n * 6 + 0]);
473 PRIM_INT__p_s_d_s[n * 18 + 12] = SIMINT_FMADD( aop_PQ[2], PRIM_INT__s_s_d_s[(n+1) * 6 + 0], PRIM_INT__p_s_d_s[n * 18 + 12]);
474
475 PRIM_INT__p_s_d_s[n * 18 + 13] = SIMINT_MUL(P_PA[2], PRIM_INT__s_s_d_s[n * 6 + 1]);
476 PRIM_INT__p_s_d_s[n * 18 + 13] = SIMINT_FMADD( aop_PQ[2], PRIM_INT__s_s_d_s[(n+1) * 6 + 1], PRIM_INT__p_s_d_s[n * 18 + 13]);
477
478 PRIM_INT__p_s_d_s[n * 18 + 14] = SIMINT_MUL(P_PA[2], PRIM_INT__s_s_d_s[n * 6 + 2]);
479 PRIM_INT__p_s_d_s[n * 18 + 14] = SIMINT_FMADD( aop_PQ[2], PRIM_INT__s_s_d_s[(n+1) * 6 + 2], PRIM_INT__p_s_d_s[n * 18 + 14]);
480 PRIM_INT__p_s_d_s[n * 18 + 14] = SIMINT_FMADD( vrr_const_1_over_2pq, PRIM_INT__s_s_p_s[(n+1) * 3 + 0], PRIM_INT__p_s_d_s[n * 18 + 14]);
481
482 PRIM_INT__p_s_d_s[n * 18 + 15] = SIMINT_MUL(P_PA[2], PRIM_INT__s_s_d_s[n * 6 + 3]);
483 PRIM_INT__p_s_d_s[n * 18 + 15] = SIMINT_FMADD( aop_PQ[2], PRIM_INT__s_s_d_s[(n+1) * 6 + 3], PRIM_INT__p_s_d_s[n * 18 + 15]);
484
485 PRIM_INT__p_s_d_s[n * 18 + 16] = SIMINT_MUL(P_PA[2], PRIM_INT__s_s_d_s[n * 6 + 4]);
486 PRIM_INT__p_s_d_s[n * 18 + 16] = SIMINT_FMADD( aop_PQ[2], PRIM_INT__s_s_d_s[(n+1) * 6 + 4], PRIM_INT__p_s_d_s[n * 18 + 16]);
487 PRIM_INT__p_s_d_s[n * 18 + 16] = SIMINT_FMADD( vrr_const_1_over_2pq, PRIM_INT__s_s_p_s[(n+1) * 3 + 1], PRIM_INT__p_s_d_s[n * 18 + 16]);
488
489 PRIM_INT__p_s_d_s[n * 18 + 17] = SIMINT_MUL(P_PA[2], PRIM_INT__s_s_d_s[n * 6 + 5]);
490 PRIM_INT__p_s_d_s[n * 18 + 17] = SIMINT_FMADD( aop_PQ[2], PRIM_INT__s_s_d_s[(n+1) * 6 + 5], PRIM_INT__p_s_d_s[n * 18 + 17]);
491 PRIM_INT__p_s_d_s[n * 18 + 17] = SIMINT_FMADD( vrr_const_2_over_2pq, PRIM_INT__s_s_p_s[(n+1) * 3 + 2], PRIM_INT__p_s_d_s[n * 18 + 17]);
492
493 }
494
495
496 VRR_I_d_s_f_s(
497 PRIM_INT__d_s_f_s,
498 PRIM_INT__p_s_f_s,
499 PRIM_INT__s_s_f_s,
500 PRIM_INT__p_s_d_s,
501 P_PA,
502 a_over_p,
503 aop_PQ,
504 one_over_2p,
505 one_over_2pq,
506 5);
507
508
509 ostei_general_vrr_I(3, 0, 4, 0, 4,
510 one_over_2p, a_over_p, one_over_2pq, aop_PQ, P_PA,
511 PRIM_INT__d_s_g_s, PRIM_INT__p_s_g_s, NULL, PRIM_INT__d_s_f_s, NULL, PRIM_INT__f_s_g_s);
512
513
514
515 // Forming PRIM_INT__p_s_p_s[6 * 9];
516 for(n = 0; n < 6; ++n) // loop over orders of auxiliary function
517 {
518
519 PRIM_INT__p_s_p_s[n * 9 + 0] = SIMINT_MUL(P_PA[0], PRIM_INT__s_s_p_s[n * 3 + 0]);
520 PRIM_INT__p_s_p_s[n * 9 + 0] = SIMINT_FMADD( aop_PQ[0], PRIM_INT__s_s_p_s[(n+1) * 3 + 0], PRIM_INT__p_s_p_s[n * 9 + 0]);
521 PRIM_INT__p_s_p_s[n * 9 + 0] = SIMINT_FMADD( vrr_const_1_over_2pq, PRIM_INT__s_s_s_s[(n+1) * 1 + 0], PRIM_INT__p_s_p_s[n * 9 + 0]);
522
523 PRIM_INT__p_s_p_s[n * 9 + 1] = SIMINT_MUL(P_PA[0], PRIM_INT__s_s_p_s[n * 3 + 1]);
524 PRIM_INT__p_s_p_s[n * 9 + 1] = SIMINT_FMADD( aop_PQ[0], PRIM_INT__s_s_p_s[(n+1) * 3 + 1], PRIM_INT__p_s_p_s[n * 9 + 1]);
525
526 PRIM_INT__p_s_p_s[n * 9 + 2] = SIMINT_MUL(P_PA[0], PRIM_INT__s_s_p_s[n * 3 + 2]);
527 PRIM_INT__p_s_p_s[n * 9 + 2] = SIMINT_FMADD( aop_PQ[0], PRIM_INT__s_s_p_s[(n+1) * 3 + 2], PRIM_INT__p_s_p_s[n * 9 + 2]);
528
529 PRIM_INT__p_s_p_s[n * 9 + 3] = SIMINT_MUL(P_PA[1], PRIM_INT__s_s_p_s[n * 3 + 0]);
530 PRIM_INT__p_s_p_s[n * 9 + 3] = SIMINT_FMADD( aop_PQ[1], PRIM_INT__s_s_p_s[(n+1) * 3 + 0], PRIM_INT__p_s_p_s[n * 9 + 3]);
531
532 PRIM_INT__p_s_p_s[n * 9 + 4] = SIMINT_MUL(P_PA[1], PRIM_INT__s_s_p_s[n * 3 + 1]);
533 PRIM_INT__p_s_p_s[n * 9 + 4] = SIMINT_FMADD( aop_PQ[1], PRIM_INT__s_s_p_s[(n+1) * 3 + 1], PRIM_INT__p_s_p_s[n * 9 + 4]);
534 PRIM_INT__p_s_p_s[n * 9 + 4] = SIMINT_FMADD( vrr_const_1_over_2pq, PRIM_INT__s_s_s_s[(n+1) * 1 + 0], PRIM_INT__p_s_p_s[n * 9 + 4]);
535
536 PRIM_INT__p_s_p_s[n * 9 + 5] = SIMINT_MUL(P_PA[1], PRIM_INT__s_s_p_s[n * 3 + 2]);
537 PRIM_INT__p_s_p_s[n * 9 + 5] = SIMINT_FMADD( aop_PQ[1], PRIM_INT__s_s_p_s[(n+1) * 3 + 2], PRIM_INT__p_s_p_s[n * 9 + 5]);
538
539 PRIM_INT__p_s_p_s[n * 9 + 6] = SIMINT_MUL(P_PA[2], PRIM_INT__s_s_p_s[n * 3 + 0]);
540 PRIM_INT__p_s_p_s[n * 9 + 6] = SIMINT_FMADD( aop_PQ[2], PRIM_INT__s_s_p_s[(n+1) * 3 + 0], PRIM_INT__p_s_p_s[n * 9 + 6]);
541
542 PRIM_INT__p_s_p_s[n * 9 + 7] = SIMINT_MUL(P_PA[2], PRIM_INT__s_s_p_s[n * 3 + 1]);
543 PRIM_INT__p_s_p_s[n * 9 + 7] = SIMINT_FMADD( aop_PQ[2], PRIM_INT__s_s_p_s[(n+1) * 3 + 1], PRIM_INT__p_s_p_s[n * 9 + 7]);
544
545 PRIM_INT__p_s_p_s[n * 9 + 8] = SIMINT_MUL(P_PA[2], PRIM_INT__s_s_p_s[n * 3 + 2]);
546 PRIM_INT__p_s_p_s[n * 9 + 8] = SIMINT_FMADD( aop_PQ[2], PRIM_INT__s_s_p_s[(n+1) * 3 + 2], PRIM_INT__p_s_p_s[n * 9 + 8]);
547 PRIM_INT__p_s_p_s[n * 9 + 8] = SIMINT_FMADD( vrr_const_1_over_2pq, PRIM_INT__s_s_s_s[(n+1) * 1 + 0], PRIM_INT__p_s_p_s[n * 9 + 8]);
548
549 }
550
551
552 VRR_I_d_s_d_s(
553 PRIM_INT__d_s_d_s,
554 PRIM_INT__p_s_d_s,
555 PRIM_INT__s_s_d_s,
556 PRIM_INT__p_s_p_s,
557 P_PA,
558 a_over_p,
559 aop_PQ,
560 one_over_2p,
561 one_over_2pq,
562 5);
563
564
565 ostei_general_vrr_I(3, 0, 3, 0, 4,
566 one_over_2p, a_over_p, one_over_2pq, aop_PQ, P_PA,
567 PRIM_INT__d_s_f_s, PRIM_INT__p_s_f_s, NULL, PRIM_INT__d_s_d_s, NULL, PRIM_INT__f_s_f_s);
568
569
570 ostei_general_vrr_I(4, 0, 4, 0, 3,
571 one_over_2p, a_over_p, one_over_2pq, aop_PQ, P_PA,
572 PRIM_INT__f_s_g_s, PRIM_INT__d_s_g_s, NULL, PRIM_INT__f_s_f_s, NULL, PRIM_INT__g_s_g_s);
573
574
575
576 // Forming PRIM_INT__p_s_s_s[6 * 3];
577 for(n = 0; n < 6; ++n) // loop over orders of auxiliary function
578 {
579
580 PRIM_INT__p_s_s_s[n * 3 + 0] = SIMINT_MUL(P_PA[0], PRIM_INT__s_s_s_s[n * 1 + 0]);
581 PRIM_INT__p_s_s_s[n * 3 + 0] = SIMINT_FMADD( aop_PQ[0], PRIM_INT__s_s_s_s[(n+1) * 1 + 0], PRIM_INT__p_s_s_s[n * 3 + 0]);
582
583 PRIM_INT__p_s_s_s[n * 3 + 1] = SIMINT_MUL(P_PA[1], PRIM_INT__s_s_s_s[n * 1 + 0]);
584 PRIM_INT__p_s_s_s[n * 3 + 1] = SIMINT_FMADD( aop_PQ[1], PRIM_INT__s_s_s_s[(n+1) * 1 + 0], PRIM_INT__p_s_s_s[n * 3 + 1]);
585
586 PRIM_INT__p_s_s_s[n * 3 + 2] = SIMINT_MUL(P_PA[2], PRIM_INT__s_s_s_s[n * 1 + 0]);
587 PRIM_INT__p_s_s_s[n * 3 + 2] = SIMINT_FMADD( aop_PQ[2], PRIM_INT__s_s_s_s[(n+1) * 1 + 0], PRIM_INT__p_s_s_s[n * 3 + 2]);
588
589 }
590
591
592
593 // Forming PRIM_INT__d_s_p_s[5 * 18];
594 for(n = 0; n < 5; ++n) // loop over orders of auxiliary function
595 {
596
597 PRIM_INT__d_s_p_s[n * 18 + 0] = SIMINT_MUL(P_PA[0], PRIM_INT__p_s_p_s[n * 9 + 0]);
598 PRIM_INT__d_s_p_s[n * 18 + 0] = SIMINT_FMADD( aop_PQ[0], PRIM_INT__p_s_p_s[(n+1) * 9 + 0], PRIM_INT__d_s_p_s[n * 18 + 0]);
599 PRIM_INT__d_s_p_s[n * 18 + 0] = SIMINT_FMADD( vrr_const_1_over_2p, SIMINT_FMADD(a_over_p, PRIM_INT__s_s_p_s[(n+1) * 3 + 0], PRIM_INT__s_s_p_s[n * 3 + 0]), PRIM_INT__d_s_p_s[n * 18 + 0]);
600 PRIM_INT__d_s_p_s[n * 18 + 0] = SIMINT_FMADD( vrr_const_1_over_2pq, PRIM_INT__p_s_s_s[(n+1) * 3 + 0], PRIM_INT__d_s_p_s[n * 18 + 0]);
601
602 PRIM_INT__d_s_p_s[n * 18 + 1] = SIMINT_MUL(P_PA[0], PRIM_INT__p_s_p_s[n * 9 + 1]);
603 PRIM_INT__d_s_p_s[n * 18 + 1] = SIMINT_FMADD( aop_PQ[0], PRIM_INT__p_s_p_s[(n+1) * 9 + 1], PRIM_INT__d_s_p_s[n * 18 + 1]);
604 PRIM_INT__d_s_p_s[n * 18 + 1] = SIMINT_FMADD( vrr_const_1_over_2p, SIMINT_FMADD(a_over_p, PRIM_INT__s_s_p_s[(n+1) * 3 + 1], PRIM_INT__s_s_p_s[n * 3 + 1]), PRIM_INT__d_s_p_s[n * 18 + 1]);
605
606 PRIM_INT__d_s_p_s[n * 18 + 2] = SIMINT_MUL(P_PA[0], PRIM_INT__p_s_p_s[n * 9 + 2]);
607 PRIM_INT__d_s_p_s[n * 18 + 2] = SIMINT_FMADD( aop_PQ[0], PRIM_INT__p_s_p_s[(n+1) * 9 + 2], PRIM_INT__d_s_p_s[n * 18 + 2]);
608 PRIM_INT__d_s_p_s[n * 18 + 2] = SIMINT_FMADD( vrr_const_1_over_2p, SIMINT_FMADD(a_over_p, PRIM_INT__s_s_p_s[(n+1) * 3 + 2], PRIM_INT__s_s_p_s[n * 3 + 2]), PRIM_INT__d_s_p_s[n * 18 + 2]);
609
610 PRIM_INT__d_s_p_s[n * 18 + 9] = SIMINT_MUL(P_PA[1], PRIM_INT__p_s_p_s[n * 9 + 3]);
611 PRIM_INT__d_s_p_s[n * 18 + 9] = SIMINT_FMADD( aop_PQ[1], PRIM_INT__p_s_p_s[(n+1) * 9 + 3], PRIM_INT__d_s_p_s[n * 18 + 9]);
612 PRIM_INT__d_s_p_s[n * 18 + 9] = SIMINT_FMADD( vrr_const_1_over_2p, SIMINT_FMADD(a_over_p, PRIM_INT__s_s_p_s[(n+1) * 3 + 0], PRIM_INT__s_s_p_s[n * 3 + 0]), PRIM_INT__d_s_p_s[n * 18 + 9]);
613
614 PRIM_INT__d_s_p_s[n * 18 + 10] = SIMINT_MUL(P_PA[1], PRIM_INT__p_s_p_s[n * 9 + 4]);
615 PRIM_INT__d_s_p_s[n * 18 + 10] = SIMINT_FMADD( aop_PQ[1], PRIM_INT__p_s_p_s[(n+1) * 9 + 4], PRIM_INT__d_s_p_s[n * 18 + 10]);
616 PRIM_INT__d_s_p_s[n * 18 + 10] = SIMINT_FMADD( vrr_const_1_over_2p, SIMINT_FMADD(a_over_p, PRIM_INT__s_s_p_s[(n+1) * 3 + 1], PRIM_INT__s_s_p_s[n * 3 + 1]), PRIM_INT__d_s_p_s[n * 18 + 10]);
617 PRIM_INT__d_s_p_s[n * 18 + 10] = SIMINT_FMADD( vrr_const_1_over_2pq, PRIM_INT__p_s_s_s[(n+1) * 3 + 1], PRIM_INT__d_s_p_s[n * 18 + 10]);
618
619 PRIM_INT__d_s_p_s[n * 18 + 11] = SIMINT_MUL(P_PA[1], PRIM_INT__p_s_p_s[n * 9 + 5]);
620 PRIM_INT__d_s_p_s[n * 18 + 11] = SIMINT_FMADD( aop_PQ[1], PRIM_INT__p_s_p_s[(n+1) * 9 + 5], PRIM_INT__d_s_p_s[n * 18 + 11]);
621 PRIM_INT__d_s_p_s[n * 18 + 11] = SIMINT_FMADD( vrr_const_1_over_2p, SIMINT_FMADD(a_over_p, PRIM_INT__s_s_p_s[(n+1) * 3 + 2], PRIM_INT__s_s_p_s[n * 3 + 2]), PRIM_INT__d_s_p_s[n * 18 + 11]);
622
623 PRIM_INT__d_s_p_s[n * 18 + 15] = SIMINT_MUL(P_PA[2], PRIM_INT__p_s_p_s[n * 9 + 6]);
624 PRIM_INT__d_s_p_s[n * 18 + 15] = SIMINT_FMADD( aop_PQ[2], PRIM_INT__p_s_p_s[(n+1) * 9 + 6], PRIM_INT__d_s_p_s[n * 18 + 15]);
625 PRIM_INT__d_s_p_s[n * 18 + 15] = SIMINT_FMADD( vrr_const_1_over_2p, SIMINT_FMADD(a_over_p, PRIM_INT__s_s_p_s[(n+1) * 3 + 0], PRIM_INT__s_s_p_s[n * 3 + 0]), PRIM_INT__d_s_p_s[n * 18 + 15]);
626
627 PRIM_INT__d_s_p_s[n * 18 + 16] = SIMINT_MUL(P_PA[2], PRIM_INT__p_s_p_s[n * 9 + 7]);
628 PRIM_INT__d_s_p_s[n * 18 + 16] = SIMINT_FMADD( aop_PQ[2], PRIM_INT__p_s_p_s[(n+1) * 9 + 7], PRIM_INT__d_s_p_s[n * 18 + 16]);
629 PRIM_INT__d_s_p_s[n * 18 + 16] = SIMINT_FMADD( vrr_const_1_over_2p, SIMINT_FMADD(a_over_p, PRIM_INT__s_s_p_s[(n+1) * 3 + 1], PRIM_INT__s_s_p_s[n * 3 + 1]), PRIM_INT__d_s_p_s[n * 18 + 16]);
630
631 PRIM_INT__d_s_p_s[n * 18 + 17] = SIMINT_MUL(P_PA[2], PRIM_INT__p_s_p_s[n * 9 + 8]);
632 PRIM_INT__d_s_p_s[n * 18 + 17] = SIMINT_FMADD( aop_PQ[2], PRIM_INT__p_s_p_s[(n+1) * 9 + 8], PRIM_INT__d_s_p_s[n * 18 + 17]);
633 PRIM_INT__d_s_p_s[n * 18 + 17] = SIMINT_FMADD( vrr_const_1_over_2p, SIMINT_FMADD(a_over_p, PRIM_INT__s_s_p_s[(n+1) * 3 + 2], PRIM_INT__s_s_p_s[n * 3 + 2]), PRIM_INT__d_s_p_s[n * 18 + 17]);
634 PRIM_INT__d_s_p_s[n * 18 + 17] = SIMINT_FMADD( vrr_const_1_over_2pq, PRIM_INT__p_s_s_s[(n+1) * 3 + 2], PRIM_INT__d_s_p_s[n * 18 + 17]);
635
636 }
637
638
639 VRR_I_f_s_d_s(
640 PRIM_INT__f_s_d_s,
641 PRIM_INT__d_s_d_s,
642 PRIM_INT__p_s_d_s,
643 PRIM_INT__d_s_p_s,
644 P_PA,
645 a_over_p,
646 aop_PQ,
647 one_over_2p,
648 one_over_2pq,
649 4);
650
651
652 ostei_general_vrr_I(4, 0, 3, 0, 3,
653 one_over_2p, a_over_p, one_over_2pq, aop_PQ, P_PA,
654 PRIM_INT__f_s_f_s, PRIM_INT__d_s_f_s, NULL, PRIM_INT__f_s_d_s, NULL, PRIM_INT__g_s_f_s);
655
656
657 ostei_general_vrr_I(5, 0, 4, 0, 2,
658 one_over_2p, a_over_p, one_over_2pq, aop_PQ, P_PA,
659 PRIM_INT__g_s_g_s, PRIM_INT__f_s_g_s, NULL, PRIM_INT__g_s_f_s, NULL, PRIM_INT__h_s_g_s);
660
661
662
663 // Forming PRIM_INT__d_s_s_s[5 * 6];
664 for(n = 0; n < 5; ++n) // loop over orders of auxiliary function
665 {
666
667 PRIM_INT__d_s_s_s[n * 6 + 0] = SIMINT_MUL(P_PA[0], PRIM_INT__p_s_s_s[n * 3 + 0]);
668 PRIM_INT__d_s_s_s[n * 6 + 0] = SIMINT_FMADD( aop_PQ[0], PRIM_INT__p_s_s_s[(n+1) * 3 + 0], PRIM_INT__d_s_s_s[n * 6 + 0]);
669 PRIM_INT__d_s_s_s[n * 6 + 0] = SIMINT_FMADD( vrr_const_1_over_2p, SIMINT_FMADD(a_over_p, PRIM_INT__s_s_s_s[(n+1) * 1 + 0], PRIM_INT__s_s_s_s[n * 1 + 0]), PRIM_INT__d_s_s_s[n * 6 + 0]);
670
671 PRIM_INT__d_s_s_s[n * 6 + 3] = SIMINT_MUL(P_PA[1], PRIM_INT__p_s_s_s[n * 3 + 1]);
672 PRIM_INT__d_s_s_s[n * 6 + 3] = SIMINT_FMADD( aop_PQ[1], PRIM_INT__p_s_s_s[(n+1) * 3 + 1], PRIM_INT__d_s_s_s[n * 6 + 3]);
673 PRIM_INT__d_s_s_s[n * 6 + 3] = SIMINT_FMADD( vrr_const_1_over_2p, SIMINT_FMADD(a_over_p, PRIM_INT__s_s_s_s[(n+1) * 1 + 0], PRIM_INT__s_s_s_s[n * 1 + 0]), PRIM_INT__d_s_s_s[n * 6 + 3]);
674
675 PRIM_INT__d_s_s_s[n * 6 + 5] = SIMINT_MUL(P_PA[2], PRIM_INT__p_s_s_s[n * 3 + 2]);
676 PRIM_INT__d_s_s_s[n * 6 + 5] = SIMINT_FMADD( aop_PQ[2], PRIM_INT__p_s_s_s[(n+1) * 3 + 2], PRIM_INT__d_s_s_s[n * 6 + 5]);
677 PRIM_INT__d_s_s_s[n * 6 + 5] = SIMINT_FMADD( vrr_const_1_over_2p, SIMINT_FMADD(a_over_p, PRIM_INT__s_s_s_s[(n+1) * 1 + 0], PRIM_INT__s_s_s_s[n * 1 + 0]), PRIM_INT__d_s_s_s[n * 6 + 5]);
678
679 }
680
681
682 VRR_I_f_s_p_s(
683 PRIM_INT__f_s_p_s,
684 PRIM_INT__d_s_p_s,
685 PRIM_INT__p_s_p_s,
686 PRIM_INT__d_s_s_s,
687 P_PA,
688 a_over_p,
689 aop_PQ,
690 one_over_2p,
691 one_over_2pq,
692 4);
693
694
695 ostei_general_vrr_I(4, 0, 2, 0, 3,
696 one_over_2p, a_over_p, one_over_2pq, aop_PQ, P_PA,
697 PRIM_INT__f_s_d_s, PRIM_INT__d_s_d_s, NULL, PRIM_INT__f_s_p_s, NULL, PRIM_INT__g_s_d_s);
698
699
700 ostei_general_vrr_I(5, 0, 3, 0, 2,
701 one_over_2p, a_over_p, one_over_2pq, aop_PQ, P_PA,
702 PRIM_INT__g_s_f_s, PRIM_INT__f_s_f_s, NULL, PRIM_INT__g_s_d_s, NULL, PRIM_INT__h_s_f_s);
703
704
705 ostei_general_vrr_I(6, 0, 4, 0, 1,
706 one_over_2p, a_over_p, one_over_2pq, aop_PQ, P_PA,
707 PRIM_INT__h_s_g_s, PRIM_INT__g_s_g_s, NULL, PRIM_INT__h_s_f_s, NULL, PRIM_INT__i_s_g_s);
708
709
710 VRR_K_s_s_h_s(
711 PRIM_INT__s_s_h_s,
712 PRIM_INT__s_s_g_s,
713 PRIM_INT__s_s_f_s,
714 Q_PA,
715 a_over_q,
716 aoq_PQ,
717 one_over_2q,
718 10);
719
720
721 ostei_general_vrr_I(1, 0, 5, 0, 6,
722 one_over_2p, a_over_p, one_over_2pq, aop_PQ, P_PA,
723 PRIM_INT__s_s_h_s, NULL, NULL, PRIM_INT__s_s_g_s, NULL, PRIM_INT__p_s_h_s);
724
725
726 ostei_general_vrr_I(2, 0, 5, 0, 5,
727 one_over_2p, a_over_p, one_over_2pq, aop_PQ, P_PA,
728 PRIM_INT__p_s_h_s, PRIM_INT__s_s_h_s, NULL, PRIM_INT__p_s_g_s, NULL, PRIM_INT__d_s_h_s);
729
730
731 ostei_general_vrr_I(3, 0, 5, 0, 4,
732 one_over_2p, a_over_p, one_over_2pq, aop_PQ, P_PA,
733 PRIM_INT__d_s_h_s, PRIM_INT__p_s_h_s, NULL, PRIM_INT__d_s_g_s, NULL, PRIM_INT__f_s_h_s);
734
735
736 ostei_general_vrr_I(4, 0, 5, 0, 3,
737 one_over_2p, a_over_p, one_over_2pq, aop_PQ, P_PA,
738 PRIM_INT__f_s_h_s, PRIM_INT__d_s_h_s, NULL, PRIM_INT__f_s_g_s, NULL, PRIM_INT__g_s_h_s);
739
740
741 ostei_general_vrr_I(5, 0, 5, 0, 2,
742 one_over_2p, a_over_p, one_over_2pq, aop_PQ, P_PA,
743 PRIM_INT__g_s_h_s, PRIM_INT__f_s_h_s, NULL, PRIM_INT__g_s_g_s, NULL, PRIM_INT__h_s_h_s);
744
745
746 ostei_general_vrr_I(6, 0, 5, 0, 1,
747 one_over_2p, a_over_p, one_over_2pq, aop_PQ, P_PA,
748 PRIM_INT__h_s_h_s, PRIM_INT__g_s_h_s, NULL, PRIM_INT__h_s_g_s, NULL, PRIM_INT__i_s_h_s);
749
750
751 ostei_general_vrr1_K(6, 9,
752 one_over_2q, a_over_q, aoq_PQ, Q_PA,
753 PRIM_INT__s_s_h_s, PRIM_INT__s_s_g_s, PRIM_INT__s_s_i_s);
754
755
756 ostei_general_vrr_I(1, 0, 6, 0, 6,
757 one_over_2p, a_over_p, one_over_2pq, aop_PQ, P_PA,
758 PRIM_INT__s_s_i_s, NULL, NULL, PRIM_INT__s_s_h_s, NULL, PRIM_INT__p_s_i_s);
759
760
761 ostei_general_vrr_I(2, 0, 6, 0, 5,
762 one_over_2p, a_over_p, one_over_2pq, aop_PQ, P_PA,
763 PRIM_INT__p_s_i_s, PRIM_INT__s_s_i_s, NULL, PRIM_INT__p_s_h_s, NULL, PRIM_INT__d_s_i_s);
764
765
766 ostei_general_vrr_I(3, 0, 6, 0, 4,
767 one_over_2p, a_over_p, one_over_2pq, aop_PQ, P_PA,
768 PRIM_INT__d_s_i_s, PRIM_INT__p_s_i_s, NULL, PRIM_INT__d_s_h_s, NULL, PRIM_INT__f_s_i_s);
769
770
771 ostei_general_vrr_I(4, 0, 6, 0, 3,
772 one_over_2p, a_over_p, one_over_2pq, aop_PQ, P_PA,
773 PRIM_INT__f_s_i_s, PRIM_INT__d_s_i_s, NULL, PRIM_INT__f_s_h_s, NULL, PRIM_INT__g_s_i_s);
774
775
776 ostei_general_vrr_I(5, 0, 6, 0, 2,
777 one_over_2p, a_over_p, one_over_2pq, aop_PQ, P_PA,
778 PRIM_INT__g_s_i_s, PRIM_INT__f_s_i_s, NULL, PRIM_INT__g_s_h_s, NULL, PRIM_INT__h_s_i_s);
779
780
781 ostei_general_vrr_I(6, 0, 6, 0, 1,
782 one_over_2p, a_over_p, one_over_2pq, aop_PQ, P_PA,
783 PRIM_INT__h_s_i_s, PRIM_INT__g_s_i_s, NULL, PRIM_INT__h_s_h_s, NULL, PRIM_INT__i_s_i_s);
784
785
786 ostei_general_vrr1_K(7, 8,
787 one_over_2q, a_over_q, aoq_PQ, Q_PA,
788 PRIM_INT__s_s_i_s, PRIM_INT__s_s_h_s, PRIM_INT__s_s_k_s);
789
790
791 ostei_general_vrr_I(1, 0, 7, 0, 6,
792 one_over_2p, a_over_p, one_over_2pq, aop_PQ, P_PA,
793 PRIM_INT__s_s_k_s, NULL, NULL, PRIM_INT__s_s_i_s, NULL, PRIM_INT__p_s_k_s);
794
795
796 ostei_general_vrr_I(2, 0, 7, 0, 5,
797 one_over_2p, a_over_p, one_over_2pq, aop_PQ, P_PA,
798 PRIM_INT__p_s_k_s, PRIM_INT__s_s_k_s, NULL, PRIM_INT__p_s_i_s, NULL, PRIM_INT__d_s_k_s);
799
800
801 ostei_general_vrr_I(3, 0, 7, 0, 4,
802 one_over_2p, a_over_p, one_over_2pq, aop_PQ, P_PA,
803 PRIM_INT__d_s_k_s, PRIM_INT__p_s_k_s, NULL, PRIM_INT__d_s_i_s, NULL, PRIM_INT__f_s_k_s);
804
805
806 ostei_general_vrr_I(4, 0, 7, 0, 3,
807 one_over_2p, a_over_p, one_over_2pq, aop_PQ, P_PA,
808 PRIM_INT__f_s_k_s, PRIM_INT__d_s_k_s, NULL, PRIM_INT__f_s_i_s, NULL, PRIM_INT__g_s_k_s);
809
810
811 ostei_general_vrr_I(5, 0, 7, 0, 2,
812 one_over_2p, a_over_p, one_over_2pq, aop_PQ, P_PA,
813 PRIM_INT__g_s_k_s, PRIM_INT__f_s_k_s, NULL, PRIM_INT__g_s_i_s, NULL, PRIM_INT__h_s_k_s);
814
815
816 ostei_general_vrr_I(6, 0, 7, 0, 1,
817 one_over_2p, a_over_p, one_over_2pq, aop_PQ, P_PA,
818 PRIM_INT__h_s_k_s, PRIM_INT__g_s_k_s, NULL, PRIM_INT__h_s_i_s, NULL, PRIM_INT__i_s_k_s);
819
820
821 ostei_general_vrr1_K(8, 7,
822 one_over_2q, a_over_q, aoq_PQ, Q_PA,
823 PRIM_INT__s_s_k_s, PRIM_INT__s_s_i_s, PRIM_INT__s_s_l_s);
824
825
826 ostei_general_vrr_I(1, 0, 8, 0, 6,
827 one_over_2p, a_over_p, one_over_2pq, aop_PQ, P_PA,
828 PRIM_INT__s_s_l_s, NULL, NULL, PRIM_INT__s_s_k_s, NULL, PRIM_INT__p_s_l_s);
829
830
831 ostei_general_vrr_I(2, 0, 8, 0, 5,
832 one_over_2p, a_over_p, one_over_2pq, aop_PQ, P_PA,
833 PRIM_INT__p_s_l_s, PRIM_INT__s_s_l_s, NULL, PRIM_INT__p_s_k_s, NULL, PRIM_INT__d_s_l_s);
834
835
836 ostei_general_vrr_I(3, 0, 8, 0, 4,
837 one_over_2p, a_over_p, one_over_2pq, aop_PQ, P_PA,
838 PRIM_INT__d_s_l_s, PRIM_INT__p_s_l_s, NULL, PRIM_INT__d_s_k_s, NULL, PRIM_INT__f_s_l_s);
839
840
841 ostei_general_vrr_I(4, 0, 8, 0, 3,
842 one_over_2p, a_over_p, one_over_2pq, aop_PQ, P_PA,
843 PRIM_INT__f_s_l_s, PRIM_INT__d_s_l_s, NULL, PRIM_INT__f_s_k_s, NULL, PRIM_INT__g_s_l_s);
844
845
846 ostei_general_vrr_I(5, 0, 8, 0, 2,
847 one_over_2p, a_over_p, one_over_2pq, aop_PQ, P_PA,
848 PRIM_INT__g_s_l_s, PRIM_INT__f_s_l_s, NULL, PRIM_INT__g_s_k_s, NULL, PRIM_INT__h_s_l_s);
849
850
851 ostei_general_vrr_I(6, 0, 8, 0, 1,
852 one_over_2p, a_over_p, one_over_2pq, aop_PQ, P_PA,
853 PRIM_INT__h_s_l_s, PRIM_INT__g_s_l_s, NULL, PRIM_INT__h_s_k_s, NULL, PRIM_INT__i_s_l_s);
854
855
856
857
858 ////////////////////////////////////
859 // Accumulate contracted integrals
860 ////////////////////////////////////
861 if(lastoffset == 0)
862 {
863 contract_all(420, PRIM_INT__i_s_g_s, PRIM_PTR_INT__i_s_g_s);
864 contract_all(588, PRIM_INT__i_s_h_s, PRIM_PTR_INT__i_s_h_s);
865 contract_all(784, PRIM_INT__i_s_i_s, PRIM_PTR_INT__i_s_i_s);
866 contract_all(1008, PRIM_INT__i_s_k_s, PRIM_PTR_INT__i_s_k_s);
867 contract_all(1260, PRIM_INT__i_s_l_s, PRIM_PTR_INT__i_s_l_s);
868 }
869 else
870 {
871 contract(420, shelloffsets, PRIM_INT__i_s_g_s, PRIM_PTR_INT__i_s_g_s);
872 contract(588, shelloffsets, PRIM_INT__i_s_h_s, PRIM_PTR_INT__i_s_h_s);
873 contract(784, shelloffsets, PRIM_INT__i_s_i_s, PRIM_PTR_INT__i_s_i_s);
874 contract(1008, shelloffsets, PRIM_INT__i_s_k_s, PRIM_PTR_INT__i_s_k_s);
875 contract(1260, shelloffsets, PRIM_INT__i_s_l_s, PRIM_PTR_INT__i_s_l_s);
876 PRIM_PTR_INT__i_s_g_s += lastoffset*420;
877 PRIM_PTR_INT__i_s_h_s += lastoffset*588;
878 PRIM_PTR_INT__i_s_i_s += lastoffset*784;
879 PRIM_PTR_INT__i_s_k_s += lastoffset*1008;
880 PRIM_PTR_INT__i_s_l_s += lastoffset*1260;
881 }
882
883 } // close loop over j
884 } // close loop over i
885
886 //Advance to the next batch
887 jstart = SIMINT_SIMD_ROUND(jend);
888
889 //////////////////////////////////////////////
890 // Contracted integrals: Horizontal recurrance
891 //////////////////////////////////////////////
892
893
894
895
896 for(abcd = 0; abcd < nshellbatch; ++abcd, ++real_abcd)
897 {
898 const double hCD[3] = { Q.AB_x[cd+abcd], Q.AB_y[cd+abcd], Q.AB_z[cd+abcd] };
899
900 // set up HRR pointers
901 double const * restrict HRR_INT__i_s_g_s = INT__i_s_g_s + abcd * 420;
902 double const * restrict HRR_INT__i_s_h_s = INT__i_s_h_s + abcd * 588;
903 double const * restrict HRR_INT__i_s_i_s = INT__i_s_i_s + abcd * 784;
904 double const * restrict HRR_INT__i_s_k_s = INT__i_s_k_s + abcd * 1008;
905 double const * restrict HRR_INT__i_s_l_s = INT__i_s_l_s + abcd * 1260;
906 double * restrict HRR_INT__i_s_g_g = INT__i_s_g_g + real_abcd * 6300;
907
908 // form INT__i_s_g_p
909 HRR_L_g_p(
910 HRR_INT__i_s_g_p,
911 HRR_INT__i_s_g_s,
912 HRR_INT__i_s_h_s,
913 hCD, 28);
914
915 // form INT__i_s_h_p
916 ostei_general_hrr_L(6, 0, 5, 1, hCD, HRR_INT__i_s_i_s, HRR_INT__i_s_h_s, HRR_INT__i_s_h_p);
917
918 // form INT__i_s_i_p
919 ostei_general_hrr_L(6, 0, 6, 1, hCD, HRR_INT__i_s_k_s, HRR_INT__i_s_i_s, HRR_INT__i_s_i_p);
920
921 // form INT__i_s_k_p
922 ostei_general_hrr_L(6, 0, 7, 1, hCD, HRR_INT__i_s_l_s, HRR_INT__i_s_k_s, HRR_INT__i_s_k_p);
923
924 // form INT__i_s_g_d
925 ostei_general_hrr_L(6, 0, 4, 2, hCD, HRR_INT__i_s_h_p, HRR_INT__i_s_g_p, HRR_INT__i_s_g_d);
926
927 // form INT__i_s_h_d
928 ostei_general_hrr_L(6, 0, 5, 2, hCD, HRR_INT__i_s_i_p, HRR_INT__i_s_h_p, HRR_INT__i_s_h_d);
929
930 // form INT__i_s_i_d
931 ostei_general_hrr_L(6, 0, 6, 2, hCD, HRR_INT__i_s_k_p, HRR_INT__i_s_i_p, HRR_INT__i_s_i_d);
932
933 // form INT__i_s_g_f
934 ostei_general_hrr_L(6, 0, 4, 3, hCD, HRR_INT__i_s_h_d, HRR_INT__i_s_g_d, HRR_INT__i_s_g_f);
935
936 // form INT__i_s_h_f
937 ostei_general_hrr_L(6, 0, 5, 3, hCD, HRR_INT__i_s_i_d, HRR_INT__i_s_h_d, HRR_INT__i_s_h_f);
938
939 // form INT__i_s_g_g
940 ostei_general_hrr_L(6, 0, 4, 4, hCD, HRR_INT__i_s_h_f, HRR_INT__i_s_g_f, HRR_INT__i_s_g_g);
941
942
943 } // close HRR loop
944
945
946 } // close loop cdbatch
947
948 istart = iend;
949 } // close loop over ab
950
951 return P.nshell12_clip * Q.nshell12_clip;
952 }
953
ostei_s_i_g_g(struct simint_multi_shellpair const P,struct simint_multi_shellpair const Q,double screen_tol,double * const restrict work,double * const restrict INT__s_i_g_g)954 int ostei_s_i_g_g(struct simint_multi_shellpair const P,
955 struct simint_multi_shellpair const Q,
956 double screen_tol,
957 double * const restrict work,
958 double * const restrict INT__s_i_g_g)
959 {
960 double P_AB[3*P.nshell12];
961 struct simint_multi_shellpair P_tmp = P;
962 P_tmp.PA_x = P.PB_x; P_tmp.PA_y = P.PB_y; P_tmp.PA_z = P.PB_z;
963 P_tmp.PB_x = P.PA_x; P_tmp.PB_y = P.PA_y; P_tmp.PB_z = P.PA_z;
964 P_tmp.AB_x = P_AB;
965 P_tmp.AB_y = P_AB + P.nshell12;
966 P_tmp.AB_z = P_AB + 2*P.nshell12;
967
968 for(int i = 0; i < P.nshell12; i++)
969 {
970 P_tmp.AB_x[i] = -P.AB_x[i];
971 P_tmp.AB_y[i] = -P.AB_y[i];
972 P_tmp.AB_z[i] = -P.AB_z[i];
973 }
974
975 int ret = ostei_i_s_g_g(P_tmp, Q, screen_tol, work, INT__s_i_g_g);
976 double buffer[6300] SIMINT_ALIGN_ARRAY_DBL;
977
978 for(int q = 0; q < ret; q++)
979 {
980 int idx = 0;
981 for(int a = 0; a < 1; ++a)
982 for(int b = 0; b < 28; ++b)
983 for(int c = 0; c < 15; ++c)
984 for(int d = 0; d < 15; ++d)
985 buffer[idx++] = INT__s_i_g_g[q*6300+b*225+a*225+c*15+d];
986
987 memcpy(INT__s_i_g_g+q*6300, buffer, 6300*sizeof(double));
988 }
989
990 return ret;
991 }
992
993