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_f_f_f_f(struct simint_multi_shellpair const P,struct simint_multi_shellpair const Q,double screen_tol,double * const restrict work,double * const restrict INT__f_f_f_f)8 int ostei_f_f_f_f(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__f_f_f_f)
13 {
14
15 SIMINT_ASSUME_ALIGN_DBL(work);
16 SIMINT_ASSUME_ALIGN_DBL(INT__f_f_f_f);
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 iket;
26 int ibra;
27
28 // partition workspace
29 double * const INT__f_s_f_s = work + (SIMINT_NSHELL_SIMD * 0);
30 double * const INT__f_s_g_s = work + (SIMINT_NSHELL_SIMD * 100);
31 double * const INT__f_s_h_s = work + (SIMINT_NSHELL_SIMD * 250);
32 double * const INT__f_s_i_s = work + (SIMINT_NSHELL_SIMD * 460);
33 double * const INT__g_s_f_s = work + (SIMINT_NSHELL_SIMD * 740);
34 double * const INT__g_s_g_s = work + (SIMINT_NSHELL_SIMD * 890);
35 double * const INT__g_s_h_s = work + (SIMINT_NSHELL_SIMD * 1115);
36 double * const INT__g_s_i_s = work + (SIMINT_NSHELL_SIMD * 1430);
37 double * const INT__h_s_f_s = work + (SIMINT_NSHELL_SIMD * 1850);
38 double * const INT__h_s_g_s = work + (SIMINT_NSHELL_SIMD * 2060);
39 double * const INT__h_s_h_s = work + (SIMINT_NSHELL_SIMD * 2375);
40 double * const INT__h_s_i_s = work + (SIMINT_NSHELL_SIMD * 2816);
41 double * const INT__i_s_f_s = work + (SIMINT_NSHELL_SIMD * 3404);
42 double * const INT__i_s_g_s = work + (SIMINT_NSHELL_SIMD * 3684);
43 double * const INT__i_s_h_s = work + (SIMINT_NSHELL_SIMD * 4104);
44 double * const INT__i_s_i_s = work + (SIMINT_NSHELL_SIMD * 4692);
45 SIMINT_DBLTYPE * const primwork = (SIMINT_DBLTYPE *)(work + SIMINT_NSHELL_SIMD*5476);
46 SIMINT_DBLTYPE * const restrict PRIM_INT__s_s_s_s = primwork + 0;
47 SIMINT_DBLTYPE * const restrict PRIM_INT__s_s_p_s = primwork + 13;
48 SIMINT_DBLTYPE * const restrict PRIM_INT__s_s_d_s = primwork + 31;
49 SIMINT_DBLTYPE * const restrict PRIM_INT__s_s_f_s = primwork + 61;
50 SIMINT_DBLTYPE * const restrict PRIM_INT__p_s_s_s = primwork + 101;
51 SIMINT_DBLTYPE * const restrict PRIM_INT__p_s_p_s = primwork + 137;
52 SIMINT_DBLTYPE * const restrict PRIM_INT__p_s_d_s = primwork + 191;
53 SIMINT_DBLTYPE * const restrict PRIM_INT__p_s_f_s = primwork + 281;
54 SIMINT_DBLTYPE * const restrict PRIM_INT__p_s_g_s = primwork + 401;
55 SIMINT_DBLTYPE * const restrict PRIM_INT__d_s_s_s = primwork + 536;
56 SIMINT_DBLTYPE * const restrict PRIM_INT__d_s_p_s = primwork + 602;
57 SIMINT_DBLTYPE * const restrict PRIM_INT__d_s_d_s = primwork + 710;
58 SIMINT_DBLTYPE * const restrict PRIM_INT__d_s_f_s = primwork + 890;
59 SIMINT_DBLTYPE * const restrict PRIM_INT__d_s_g_s = primwork + 1130;
60 SIMINT_DBLTYPE * const restrict PRIM_INT__d_s_h_s = primwork + 1400;
61 SIMINT_DBLTYPE * const restrict PRIM_INT__f_s_s_s = primwork + 1652;
62 SIMINT_DBLTYPE * const restrict PRIM_INT__f_s_p_s = primwork + 1752;
63 SIMINT_DBLTYPE * const restrict PRIM_INT__f_s_d_s = primwork + 1932;
64 SIMINT_DBLTYPE * const restrict PRIM_INT__f_s_f_s = primwork + 2232;
65 SIMINT_DBLTYPE * const restrict PRIM_INT__f_s_g_s = primwork + 2632;
66 SIMINT_DBLTYPE * const restrict PRIM_INT__f_s_h_s = primwork + 3082;
67 SIMINT_DBLTYPE * const restrict PRIM_INT__f_s_i_s = primwork + 3502;
68 SIMINT_DBLTYPE * const restrict PRIM_INT__g_s_s_s = primwork + 3782;
69 SIMINT_DBLTYPE * const restrict PRIM_INT__g_s_p_s = primwork + 3917;
70 SIMINT_DBLTYPE * const restrict PRIM_INT__g_s_d_s = primwork + 4187;
71 SIMINT_DBLTYPE * const restrict PRIM_INT__g_s_f_s = primwork + 4637;
72 SIMINT_DBLTYPE * const restrict PRIM_INT__g_s_g_s = primwork + 5237;
73 SIMINT_DBLTYPE * const restrict PRIM_INT__g_s_h_s = primwork + 5912;
74 SIMINT_DBLTYPE * const restrict PRIM_INT__g_s_i_s = primwork + 6542;
75 SIMINT_DBLTYPE * const restrict PRIM_INT__h_s_s_s = primwork + 6962;
76 SIMINT_DBLTYPE * const restrict PRIM_INT__h_s_p_s = primwork + 7130;
77 SIMINT_DBLTYPE * const restrict PRIM_INT__h_s_d_s = primwork + 7508;
78 SIMINT_DBLTYPE * const restrict PRIM_INT__h_s_f_s = primwork + 8138;
79 SIMINT_DBLTYPE * const restrict PRIM_INT__h_s_g_s = primwork + 8978;
80 SIMINT_DBLTYPE * const restrict PRIM_INT__h_s_h_s = primwork + 9923;
81 SIMINT_DBLTYPE * const restrict PRIM_INT__h_s_i_s = primwork + 10805;
82 SIMINT_DBLTYPE * const restrict PRIM_INT__i_s_s_s = primwork + 11393;
83 SIMINT_DBLTYPE * const restrict PRIM_INT__i_s_p_s = primwork + 11589;
84 SIMINT_DBLTYPE * const restrict PRIM_INT__i_s_d_s = primwork + 12093;
85 SIMINT_DBLTYPE * const restrict PRIM_INT__i_s_f_s = primwork + 12933;
86 SIMINT_DBLTYPE * const restrict PRIM_INT__i_s_g_s = primwork + 14053;
87 SIMINT_DBLTYPE * const restrict PRIM_INT__i_s_h_s = primwork + 15313;
88 SIMINT_DBLTYPE * const restrict PRIM_INT__i_s_i_s = primwork + 16489;
89 double * const hrrwork = (double *)(primwork + 17273);
90 double * const HRR_INT__f_p_f_s = hrrwork + 0;
91 double * const HRR_INT__f_p_g_s = hrrwork + 300;
92 double * const HRR_INT__f_p_h_s = hrrwork + 750;
93 double * const HRR_INT__f_p_i_s = hrrwork + 1380;
94 double * const HRR_INT__f_d_f_s = hrrwork + 2220;
95 double * const HRR_INT__f_d_g_s = hrrwork + 2820;
96 double * const HRR_INT__f_d_h_s = hrrwork + 3720;
97 double * const HRR_INT__f_d_i_s = hrrwork + 4980;
98 double * const HRR_INT__f_f_f_s = hrrwork + 6660;
99 double * const HRR_INT__f_f_f_p = hrrwork + 7660;
100 double * const HRR_INT__f_f_f_d = hrrwork + 10660;
101 double * const HRR_INT__f_f_g_s = hrrwork + 16660;
102 double * const HRR_INT__f_f_g_p = hrrwork + 18160;
103 double * const HRR_INT__f_f_g_d = hrrwork + 22660;
104 double * const HRR_INT__f_f_h_s = hrrwork + 31660;
105 double * const HRR_INT__f_f_h_p = hrrwork + 33760;
106 double * const HRR_INT__f_f_i_s = hrrwork + 40060;
107 double * const HRR_INT__g_p_f_s = hrrwork + 42860;
108 double * const HRR_INT__g_p_g_s = hrrwork + 43310;
109 double * const HRR_INT__g_p_h_s = hrrwork + 43985;
110 double * const HRR_INT__g_p_i_s = hrrwork + 44930;
111 double * const HRR_INT__g_d_f_s = hrrwork + 46190;
112 double * const HRR_INT__g_d_g_s = hrrwork + 47090;
113 double * const HRR_INT__g_d_h_s = hrrwork + 48440;
114 double * const HRR_INT__g_d_i_s = hrrwork + 50330;
115 double * const HRR_INT__h_p_f_s = hrrwork + 52850;
116 double * const HRR_INT__h_p_g_s = hrrwork + 53480;
117 double * const HRR_INT__h_p_h_s = hrrwork + 54425;
118 double * const HRR_INT__h_p_i_s = hrrwork + 55748;
119
120
121 // Create constants
122 const SIMINT_DBLTYPE const_1 = SIMINT_DBLSET1(1);
123 const SIMINT_DBLTYPE const_2 = SIMINT_DBLSET1(2);
124 const SIMINT_DBLTYPE const_3 = SIMINT_DBLSET1(3);
125 const SIMINT_DBLTYPE const_4 = SIMINT_DBLSET1(4);
126 const SIMINT_DBLTYPE const_5 = SIMINT_DBLSET1(5);
127 const SIMINT_DBLTYPE const_6 = SIMINT_DBLSET1(6);
128 const SIMINT_DBLTYPE one_half = SIMINT_DBLSET1(0.5);
129
130
131 ////////////////////////////////////////
132 // Loop over shells and primitives
133 ////////////////////////////////////////
134
135 real_abcd = 0;
136 istart = 0;
137 for(ab = 0; ab < P.nshell12_clip; ++ab)
138 {
139 const int iend = istart + P.nprim12[ab];
140
141 cd = 0;
142 jstart = 0;
143
144 for(cd = 0; cd < Q.nshell12_clip; cd += SIMINT_NSHELL_SIMD)
145 {
146 const int nshellbatch = ((cd + SIMINT_NSHELL_SIMD) > Q.nshell12_clip) ? Q.nshell12_clip - cd : SIMINT_NSHELL_SIMD;
147 int jend = jstart;
148 for(i = 0; i < nshellbatch; i++)
149 jend += Q.nprim12[cd+i];
150
151 // Clear the beginning of the workspace (where we are accumulating integrals)
152 memset(work, 0, SIMINT_NSHELL_SIMD * 5476 * sizeof(double));
153 abcd = 0;
154
155
156 for(i = istart; i < iend; ++i)
157 {
158 SIMINT_DBLTYPE bra_screen_max; // only used if check_screen
159
160 if(check_screen)
161 {
162 // Skip this whole thing if always insignificant
163 if((P.screen[i] * Q.screen_max) < screen_tol)
164 continue;
165 bra_screen_max = SIMINT_DBLSET1(P.screen[i]);
166 }
167
168 icd = 0;
169 iprimcd = 0;
170 nprim_icd = Q.nprim12[cd];
171 double * restrict PRIM_PTR_INT__f_s_f_s = INT__f_s_f_s + abcd * 100;
172 double * restrict PRIM_PTR_INT__f_s_g_s = INT__f_s_g_s + abcd * 150;
173 double * restrict PRIM_PTR_INT__f_s_h_s = INT__f_s_h_s + abcd * 210;
174 double * restrict PRIM_PTR_INT__f_s_i_s = INT__f_s_i_s + abcd * 280;
175 double * restrict PRIM_PTR_INT__g_s_f_s = INT__g_s_f_s + abcd * 150;
176 double * restrict PRIM_PTR_INT__g_s_g_s = INT__g_s_g_s + abcd * 225;
177 double * restrict PRIM_PTR_INT__g_s_h_s = INT__g_s_h_s + abcd * 315;
178 double * restrict PRIM_PTR_INT__g_s_i_s = INT__g_s_i_s + abcd * 420;
179 double * restrict PRIM_PTR_INT__h_s_f_s = INT__h_s_f_s + abcd * 210;
180 double * restrict PRIM_PTR_INT__h_s_g_s = INT__h_s_g_s + abcd * 315;
181 double * restrict PRIM_PTR_INT__h_s_h_s = INT__h_s_h_s + abcd * 441;
182 double * restrict PRIM_PTR_INT__h_s_i_s = INT__h_s_i_s + abcd * 588;
183 double * restrict PRIM_PTR_INT__i_s_f_s = INT__i_s_f_s + abcd * 280;
184 double * restrict PRIM_PTR_INT__i_s_g_s = INT__i_s_g_s + abcd * 420;
185 double * restrict PRIM_PTR_INT__i_s_h_s = INT__i_s_h_s + abcd * 588;
186 double * restrict PRIM_PTR_INT__i_s_i_s = INT__i_s_i_s + abcd * 784;
187
188
189
190 // Load these one per loop over i
191 const SIMINT_DBLTYPE P_alpha = SIMINT_DBLSET1(P.alpha[i]);
192 const SIMINT_DBLTYPE P_prefac = SIMINT_DBLSET1(P.prefac[i]);
193 const SIMINT_DBLTYPE Pxyz[3] = { SIMINT_DBLSET1(P.x[i]), SIMINT_DBLSET1(P.y[i]), SIMINT_DBLSET1(P.z[i]) };
194
195 const SIMINT_DBLTYPE P_PA[3] = { SIMINT_DBLSET1(P.PA_x[i]), SIMINT_DBLSET1(P.PA_y[i]), SIMINT_DBLSET1(P.PA_z[i]) };
196
197 for(j = jstart; j < jend; j += SIMINT_SIMD_LEN)
198 {
199 // calculate the shell offsets
200 // these are the offset from the shell pointed to by cd
201 // for each element
202 int shelloffsets[SIMINT_SIMD_LEN] = {0};
203 int lastoffset = 0;
204 const int nlane = ( ((j + SIMINT_SIMD_LEN) < jend) ? SIMINT_SIMD_LEN : (jend - j));
205
206 if((iprimcd + SIMINT_SIMD_LEN) >= nprim_icd)
207 {
208 // Handle if the first element of the vector is a new shell
209 if(iprimcd >= nprim_icd && ((icd+1) < nshellbatch))
210 {
211 nprim_icd += Q.nprim12[cd + (++icd)];
212 PRIM_PTR_INT__f_s_f_s += 100;
213 PRIM_PTR_INT__f_s_g_s += 150;
214 PRIM_PTR_INT__f_s_h_s += 210;
215 PRIM_PTR_INT__f_s_i_s += 280;
216 PRIM_PTR_INT__g_s_f_s += 150;
217 PRIM_PTR_INT__g_s_g_s += 225;
218 PRIM_PTR_INT__g_s_h_s += 315;
219 PRIM_PTR_INT__g_s_i_s += 420;
220 PRIM_PTR_INT__h_s_f_s += 210;
221 PRIM_PTR_INT__h_s_g_s += 315;
222 PRIM_PTR_INT__h_s_h_s += 441;
223 PRIM_PTR_INT__h_s_i_s += 588;
224 PRIM_PTR_INT__i_s_f_s += 280;
225 PRIM_PTR_INT__i_s_g_s += 420;
226 PRIM_PTR_INT__i_s_h_s += 588;
227 PRIM_PTR_INT__i_s_i_s += 784;
228 }
229 iprimcd++;
230 for(n = 1; n < SIMINT_SIMD_LEN; ++n)
231 {
232 if(iprimcd >= nprim_icd && ((icd+1) < nshellbatch))
233 {
234 shelloffsets[n] = shelloffsets[n-1] + 1;
235 lastoffset++;
236 nprim_icd += Q.nprim12[cd + (++icd)];
237 }
238 else
239 shelloffsets[n] = shelloffsets[n-1];
240 iprimcd++;
241 }
242 }
243 else
244 iprimcd += SIMINT_SIMD_LEN;
245
246 // Do we have to compute this vector (or has it been screened out)?
247 // (not_screened != 0 means we have to do this vector)
248 if(check_screen)
249 {
250 const double vmax = vector_max(SIMINT_MUL(bra_screen_max, SIMINT_DBLLOAD(Q.screen, j)));
251 if(vmax < screen_tol)
252 {
253 PRIM_PTR_INT__f_s_f_s += lastoffset*100;
254 PRIM_PTR_INT__f_s_g_s += lastoffset*150;
255 PRIM_PTR_INT__f_s_h_s += lastoffset*210;
256 PRIM_PTR_INT__f_s_i_s += lastoffset*280;
257 PRIM_PTR_INT__g_s_f_s += lastoffset*150;
258 PRIM_PTR_INT__g_s_g_s += lastoffset*225;
259 PRIM_PTR_INT__g_s_h_s += lastoffset*315;
260 PRIM_PTR_INT__g_s_i_s += lastoffset*420;
261 PRIM_PTR_INT__h_s_f_s += lastoffset*210;
262 PRIM_PTR_INT__h_s_g_s += lastoffset*315;
263 PRIM_PTR_INT__h_s_h_s += lastoffset*441;
264 PRIM_PTR_INT__h_s_i_s += lastoffset*588;
265 PRIM_PTR_INT__i_s_f_s += lastoffset*280;
266 PRIM_PTR_INT__i_s_g_s += lastoffset*420;
267 PRIM_PTR_INT__i_s_h_s += lastoffset*588;
268 PRIM_PTR_INT__i_s_i_s += lastoffset*784;
269 continue;
270 }
271 }
272
273 const SIMINT_DBLTYPE Q_alpha = SIMINT_DBLLOAD(Q.alpha, j);
274 const SIMINT_DBLTYPE PQalpha_mul = SIMINT_MUL(P_alpha, Q_alpha);
275 const SIMINT_DBLTYPE PQalpha_sum = SIMINT_ADD(P_alpha, Q_alpha);
276 const SIMINT_DBLTYPE one_over_PQalpha_sum = SIMINT_DIV(const_1, PQalpha_sum);
277
278
279 /* construct R2 = (Px - Qx)**2 + (Py - Qy)**2 + (Pz -Qz)**2 */
280 SIMINT_DBLTYPE PQ[3];
281 PQ[0] = SIMINT_SUB(Pxyz[0], SIMINT_DBLLOAD(Q.x, j));
282 PQ[1] = SIMINT_SUB(Pxyz[1], SIMINT_DBLLOAD(Q.y, j));
283 PQ[2] = SIMINT_SUB(Pxyz[2], SIMINT_DBLLOAD(Q.z, j));
284 SIMINT_DBLTYPE R2 = SIMINT_MUL(PQ[0], PQ[0]);
285 R2 = SIMINT_FMADD(PQ[1], PQ[1], R2);
286 R2 = SIMINT_FMADD(PQ[2], PQ[2], R2);
287
288 const SIMINT_DBLTYPE alpha = SIMINT_MUL(PQalpha_mul, one_over_PQalpha_sum); // alpha from MEST
289 const SIMINT_DBLTYPE one_over_p = SIMINT_DIV(const_1, P_alpha);
290 const SIMINT_DBLTYPE one_over_q = SIMINT_DIV(const_1, Q_alpha);
291 const SIMINT_DBLTYPE one_over_2p = SIMINT_MUL(one_half, one_over_p);
292 const SIMINT_DBLTYPE one_over_2q = SIMINT_MUL(one_half, one_over_q);
293 const SIMINT_DBLTYPE one_over_2pq = SIMINT_MUL(one_half, one_over_PQalpha_sum);
294 const SIMINT_DBLTYPE Q_PA[3] = { SIMINT_DBLLOAD(Q.PA_x, j), SIMINT_DBLLOAD(Q.PA_y, j), SIMINT_DBLLOAD(Q.PA_z, j) };
295
296 // NOTE: Minus sign!
297 const SIMINT_DBLTYPE a_over_p = SIMINT_MUL(SIMINT_NEG(alpha), one_over_p);
298 SIMINT_DBLTYPE aop_PQ[3];
299 aop_PQ[0] = SIMINT_MUL(a_over_p, PQ[0]);
300 aop_PQ[1] = SIMINT_MUL(a_over_p, PQ[1]);
301 aop_PQ[2] = SIMINT_MUL(a_over_p, PQ[2]);
302
303 SIMINT_DBLTYPE a_over_q = SIMINT_MUL(alpha, one_over_q);
304 SIMINT_DBLTYPE aoq_PQ[3];
305 aoq_PQ[0] = SIMINT_MUL(a_over_q, PQ[0]);
306 aoq_PQ[1] = SIMINT_MUL(a_over_q, PQ[1]);
307 aoq_PQ[2] = SIMINT_MUL(a_over_q, PQ[2]);
308 // Put a minus sign here so we don't have to in RR routines
309 a_over_q = SIMINT_NEG(a_over_q);
310
311
312 //////////////////////////////////////////////
313 // Fjt function section
314 // Maximum v value: 12
315 //////////////////////////////////////////////
316 // The parameter to the Fjt function
317 const SIMINT_DBLTYPE F_x = SIMINT_MUL(R2, alpha);
318
319
320 const SIMINT_DBLTYPE Q_prefac = mask_load(nlane, Q.prefac + j);
321
322
323 boys_F_split(PRIM_INT__s_s_s_s, F_x, 12);
324 SIMINT_DBLTYPE prefac = SIMINT_SQRT(one_over_PQalpha_sum);
325 prefac = SIMINT_MUL(SIMINT_MUL(P_prefac, Q_prefac), prefac);
326 for(n = 0; n <= 12; n++)
327 PRIM_INT__s_s_s_s[n] = SIMINT_MUL(PRIM_INT__s_s_s_s[n], prefac);
328
329 //////////////////////////////////////////////
330 // Primitive integrals: Vertical recurrance
331 //////////////////////////////////////////////
332
333 const SIMINT_DBLTYPE vrr_const_1_over_2p = one_over_2p;
334 const SIMINT_DBLTYPE vrr_const_2_over_2p = SIMINT_MUL(const_2, one_over_2p);
335 const SIMINT_DBLTYPE vrr_const_3_over_2p = SIMINT_MUL(const_3, one_over_2p);
336 const SIMINT_DBLTYPE vrr_const_4_over_2p = SIMINT_MUL(const_4, one_over_2p);
337 const SIMINT_DBLTYPE vrr_const_5_over_2p = SIMINT_MUL(const_5, one_over_2p);
338 const SIMINT_DBLTYPE vrr_const_1_over_2q = one_over_2q;
339 const SIMINT_DBLTYPE vrr_const_2_over_2q = SIMINT_MUL(const_2, one_over_2q);
340 const SIMINT_DBLTYPE vrr_const_3_over_2q = SIMINT_MUL(const_3, one_over_2q);
341 const SIMINT_DBLTYPE vrr_const_4_over_2q = SIMINT_MUL(const_4, one_over_2q);
342 const SIMINT_DBLTYPE vrr_const_5_over_2q = SIMINT_MUL(const_5, one_over_2q);
343 const SIMINT_DBLTYPE vrr_const_1_over_2pq = one_over_2pq;
344 const SIMINT_DBLTYPE vrr_const_2_over_2pq = SIMINT_MUL(const_2, one_over_2pq);
345 const SIMINT_DBLTYPE vrr_const_3_over_2pq = SIMINT_MUL(const_3, one_over_2pq);
346 const SIMINT_DBLTYPE vrr_const_4_over_2pq = SIMINT_MUL(const_4, one_over_2pq);
347 const SIMINT_DBLTYPE vrr_const_5_over_2pq = SIMINT_MUL(const_5, one_over_2pq);
348 const SIMINT_DBLTYPE vrr_const_6_over_2pq = SIMINT_MUL(const_6, one_over_2pq);
349
350
351
352 // Forming PRIM_INT__p_s_s_s[12 * 3];
353 for(n = 0; n < 12; ++n) // loop over orders of auxiliary function
354 {
355
356 PRIM_INT__p_s_s_s[n * 3 + 0] = SIMINT_MUL(P_PA[0], PRIM_INT__s_s_s_s[n * 1 + 0]);
357 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]);
358
359 PRIM_INT__p_s_s_s[n * 3 + 1] = SIMINT_MUL(P_PA[1], PRIM_INT__s_s_s_s[n * 1 + 0]);
360 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]);
361
362 PRIM_INT__p_s_s_s[n * 3 + 2] = SIMINT_MUL(P_PA[2], PRIM_INT__s_s_s_s[n * 1 + 0]);
363 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]);
364
365 }
366
367
368
369 // Forming PRIM_INT__d_s_s_s[11 * 6];
370 for(n = 0; n < 11; ++n) // loop over orders of auxiliary function
371 {
372
373 PRIM_INT__d_s_s_s[n * 6 + 0] = SIMINT_MUL(P_PA[0], PRIM_INT__p_s_s_s[n * 3 + 0]);
374 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]);
375 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]);
376
377 PRIM_INT__d_s_s_s[n * 6 + 1] = SIMINT_MUL(P_PA[1], PRIM_INT__p_s_s_s[n * 3 + 0]);
378 PRIM_INT__d_s_s_s[n * 6 + 1] = SIMINT_FMADD( aop_PQ[1], PRIM_INT__p_s_s_s[(n+1) * 3 + 0], PRIM_INT__d_s_s_s[n * 6 + 1]);
379
380 PRIM_INT__d_s_s_s[n * 6 + 2] = SIMINT_MUL(P_PA[2], PRIM_INT__p_s_s_s[n * 3 + 0]);
381 PRIM_INT__d_s_s_s[n * 6 + 2] = SIMINT_FMADD( aop_PQ[2], PRIM_INT__p_s_s_s[(n+1) * 3 + 0], PRIM_INT__d_s_s_s[n * 6 + 2]);
382
383 PRIM_INT__d_s_s_s[n * 6 + 3] = SIMINT_MUL(P_PA[1], PRIM_INT__p_s_s_s[n * 3 + 1]);
384 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]);
385 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]);
386
387 PRIM_INT__d_s_s_s[n * 6 + 4] = SIMINT_MUL(P_PA[2], PRIM_INT__p_s_s_s[n * 3 + 1]);
388 PRIM_INT__d_s_s_s[n * 6 + 4] = SIMINT_FMADD( aop_PQ[2], PRIM_INT__p_s_s_s[(n+1) * 3 + 1], PRIM_INT__d_s_s_s[n * 6 + 4]);
389
390 PRIM_INT__d_s_s_s[n * 6 + 5] = SIMINT_MUL(P_PA[2], PRIM_INT__p_s_s_s[n * 3 + 2]);
391 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]);
392 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]);
393
394 }
395
396
397
398 // Forming PRIM_INT__f_s_s_s[10 * 10];
399 for(n = 0; n < 10; ++n) // loop over orders of auxiliary function
400 {
401
402 PRIM_INT__f_s_s_s[n * 10 + 0] = SIMINT_MUL(P_PA[0], PRIM_INT__d_s_s_s[n * 6 + 0]);
403 PRIM_INT__f_s_s_s[n * 10 + 0] = SIMINT_FMADD( aop_PQ[0], PRIM_INT__d_s_s_s[(n+1) * 6 + 0], PRIM_INT__f_s_s_s[n * 10 + 0]);
404 PRIM_INT__f_s_s_s[n * 10 + 0] = SIMINT_FMADD( vrr_const_2_over_2p, SIMINT_FMADD(a_over_p, PRIM_INT__p_s_s_s[(n+1) * 3 + 0], PRIM_INT__p_s_s_s[n * 3 + 0]), PRIM_INT__f_s_s_s[n * 10 + 0]);
405
406 PRIM_INT__f_s_s_s[n * 10 + 1] = SIMINT_MUL(P_PA[1], PRIM_INT__d_s_s_s[n * 6 + 0]);
407 PRIM_INT__f_s_s_s[n * 10 + 1] = SIMINT_FMADD( aop_PQ[1], PRIM_INT__d_s_s_s[(n+1) * 6 + 0], PRIM_INT__f_s_s_s[n * 10 + 1]);
408
409 PRIM_INT__f_s_s_s[n * 10 + 2] = SIMINT_MUL(P_PA[2], PRIM_INT__d_s_s_s[n * 6 + 0]);
410 PRIM_INT__f_s_s_s[n * 10 + 2] = SIMINT_FMADD( aop_PQ[2], PRIM_INT__d_s_s_s[(n+1) * 6 + 0], PRIM_INT__f_s_s_s[n * 10 + 2]);
411
412 PRIM_INT__f_s_s_s[n * 10 + 3] = SIMINT_MUL(P_PA[0], PRIM_INT__d_s_s_s[n * 6 + 3]);
413 PRIM_INT__f_s_s_s[n * 10 + 3] = SIMINT_FMADD( aop_PQ[0], PRIM_INT__d_s_s_s[(n+1) * 6 + 3], PRIM_INT__f_s_s_s[n * 10 + 3]);
414
415 PRIM_INT__f_s_s_s[n * 10 + 4] = SIMINT_MUL(P_PA[2], PRIM_INT__d_s_s_s[n * 6 + 1]);
416 PRIM_INT__f_s_s_s[n * 10 + 4] = SIMINT_FMADD( aop_PQ[2], PRIM_INT__d_s_s_s[(n+1) * 6 + 1], PRIM_INT__f_s_s_s[n * 10 + 4]);
417
418 PRIM_INT__f_s_s_s[n * 10 + 5] = SIMINT_MUL(P_PA[0], PRIM_INT__d_s_s_s[n * 6 + 5]);
419 PRIM_INT__f_s_s_s[n * 10 + 5] = SIMINT_FMADD( aop_PQ[0], PRIM_INT__d_s_s_s[(n+1) * 6 + 5], PRIM_INT__f_s_s_s[n * 10 + 5]);
420
421 PRIM_INT__f_s_s_s[n * 10 + 6] = SIMINT_MUL(P_PA[1], PRIM_INT__d_s_s_s[n * 6 + 3]);
422 PRIM_INT__f_s_s_s[n * 10 + 6] = SIMINT_FMADD( aop_PQ[1], PRIM_INT__d_s_s_s[(n+1) * 6 + 3], PRIM_INT__f_s_s_s[n * 10 + 6]);
423 PRIM_INT__f_s_s_s[n * 10 + 6] = SIMINT_FMADD( vrr_const_2_over_2p, SIMINT_FMADD(a_over_p, PRIM_INT__p_s_s_s[(n+1) * 3 + 1], PRIM_INT__p_s_s_s[n * 3 + 1]), PRIM_INT__f_s_s_s[n * 10 + 6]);
424
425 PRIM_INT__f_s_s_s[n * 10 + 7] = SIMINT_MUL(P_PA[2], PRIM_INT__d_s_s_s[n * 6 + 3]);
426 PRIM_INT__f_s_s_s[n * 10 + 7] = SIMINT_FMADD( aop_PQ[2], PRIM_INT__d_s_s_s[(n+1) * 6 + 3], PRIM_INT__f_s_s_s[n * 10 + 7]);
427
428 PRIM_INT__f_s_s_s[n * 10 + 8] = SIMINT_MUL(P_PA[1], PRIM_INT__d_s_s_s[n * 6 + 5]);
429 PRIM_INT__f_s_s_s[n * 10 + 8] = SIMINT_FMADD( aop_PQ[1], PRIM_INT__d_s_s_s[(n+1) * 6 + 5], PRIM_INT__f_s_s_s[n * 10 + 8]);
430
431 PRIM_INT__f_s_s_s[n * 10 + 9] = SIMINT_MUL(P_PA[2], PRIM_INT__d_s_s_s[n * 6 + 5]);
432 PRIM_INT__f_s_s_s[n * 10 + 9] = SIMINT_FMADD( aop_PQ[2], PRIM_INT__d_s_s_s[(n+1) * 6 + 5], PRIM_INT__f_s_s_s[n * 10 + 9]);
433 PRIM_INT__f_s_s_s[n * 10 + 9] = SIMINT_FMADD( vrr_const_2_over_2p, SIMINT_FMADD(a_over_p, PRIM_INT__p_s_s_s[(n+1) * 3 + 2], PRIM_INT__p_s_s_s[n * 3 + 2]), PRIM_INT__f_s_s_s[n * 10 + 9]);
434
435 }
436
437
438 VRR_K_f_s_p_s(
439 PRIM_INT__f_s_p_s,
440 PRIM_INT__f_s_s_s,
441 PRIM_INT__d_s_s_s,
442 Q_PA,
443 aoq_PQ,
444 one_over_2pq,
445 6);
446
447
448
449 // Forming PRIM_INT__d_s_p_s[6 * 18];
450 for(n = 0; n < 6; ++n) // loop over orders of auxiliary function
451 {
452
453 PRIM_INT__d_s_p_s[n * 18 + 0] = SIMINT_MUL(Q_PA[0], PRIM_INT__d_s_s_s[n * 6 + 0]);
454 PRIM_INT__d_s_p_s[n * 18 + 0] = SIMINT_FMADD( aoq_PQ[0], PRIM_INT__d_s_s_s[(n+1) * 6 + 0], PRIM_INT__d_s_p_s[n * 18 + 0]);
455 PRIM_INT__d_s_p_s[n * 18 + 0] = SIMINT_FMADD( vrr_const_2_over_2pq, PRIM_INT__p_s_s_s[(n+1) * 3 + 0], PRIM_INT__d_s_p_s[n * 18 + 0]);
456
457 PRIM_INT__d_s_p_s[n * 18 + 1] = SIMINT_MUL(Q_PA[1], PRIM_INT__d_s_s_s[n * 6 + 0]);
458 PRIM_INT__d_s_p_s[n * 18 + 1] = SIMINT_FMADD( aoq_PQ[1], PRIM_INT__d_s_s_s[(n+1) * 6 + 0], PRIM_INT__d_s_p_s[n * 18 + 1]);
459
460 PRIM_INT__d_s_p_s[n * 18 + 2] = SIMINT_MUL(Q_PA[2], PRIM_INT__d_s_s_s[n * 6 + 0]);
461 PRIM_INT__d_s_p_s[n * 18 + 2] = SIMINT_FMADD( aoq_PQ[2], PRIM_INT__d_s_s_s[(n+1) * 6 + 0], PRIM_INT__d_s_p_s[n * 18 + 2]);
462
463 PRIM_INT__d_s_p_s[n * 18 + 3] = SIMINT_MUL(Q_PA[0], PRIM_INT__d_s_s_s[n * 6 + 1]);
464 PRIM_INT__d_s_p_s[n * 18 + 3] = SIMINT_FMADD( aoq_PQ[0], PRIM_INT__d_s_s_s[(n+1) * 6 + 1], PRIM_INT__d_s_p_s[n * 18 + 3]);
465 PRIM_INT__d_s_p_s[n * 18 + 3] = 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 + 3]);
466
467 PRIM_INT__d_s_p_s[n * 18 + 4] = SIMINT_MUL(Q_PA[1], PRIM_INT__d_s_s_s[n * 6 + 1]);
468 PRIM_INT__d_s_p_s[n * 18 + 4] = SIMINT_FMADD( aoq_PQ[1], PRIM_INT__d_s_s_s[(n+1) * 6 + 1], PRIM_INT__d_s_p_s[n * 18 + 4]);
469 PRIM_INT__d_s_p_s[n * 18 + 4] = 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 + 4]);
470
471 PRIM_INT__d_s_p_s[n * 18 + 5] = SIMINT_MUL(Q_PA[2], PRIM_INT__d_s_s_s[n * 6 + 1]);
472 PRIM_INT__d_s_p_s[n * 18 + 5] = SIMINT_FMADD( aoq_PQ[2], PRIM_INT__d_s_s_s[(n+1) * 6 + 1], PRIM_INT__d_s_p_s[n * 18 + 5]);
473
474 PRIM_INT__d_s_p_s[n * 18 + 6] = SIMINT_MUL(Q_PA[0], PRIM_INT__d_s_s_s[n * 6 + 2]);
475 PRIM_INT__d_s_p_s[n * 18 + 6] = SIMINT_FMADD( aoq_PQ[0], PRIM_INT__d_s_s_s[(n+1) * 6 + 2], PRIM_INT__d_s_p_s[n * 18 + 6]);
476 PRIM_INT__d_s_p_s[n * 18 + 6] = 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 + 6]);
477
478 PRIM_INT__d_s_p_s[n * 18 + 7] = SIMINT_MUL(Q_PA[1], PRIM_INT__d_s_s_s[n * 6 + 2]);
479 PRIM_INT__d_s_p_s[n * 18 + 7] = SIMINT_FMADD( aoq_PQ[1], PRIM_INT__d_s_s_s[(n+1) * 6 + 2], PRIM_INT__d_s_p_s[n * 18 + 7]);
480
481 PRIM_INT__d_s_p_s[n * 18 + 8] = SIMINT_MUL(Q_PA[2], PRIM_INT__d_s_s_s[n * 6 + 2]);
482 PRIM_INT__d_s_p_s[n * 18 + 8] = SIMINT_FMADD( aoq_PQ[2], PRIM_INT__d_s_s_s[(n+1) * 6 + 2], PRIM_INT__d_s_p_s[n * 18 + 8]);
483 PRIM_INT__d_s_p_s[n * 18 + 8] = 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 + 8]);
484
485 PRIM_INT__d_s_p_s[n * 18 + 9] = SIMINT_MUL(Q_PA[0], PRIM_INT__d_s_s_s[n * 6 + 3]);
486 PRIM_INT__d_s_p_s[n * 18 + 9] = SIMINT_FMADD( aoq_PQ[0], PRIM_INT__d_s_s_s[(n+1) * 6 + 3], PRIM_INT__d_s_p_s[n * 18 + 9]);
487
488 PRIM_INT__d_s_p_s[n * 18 + 10] = SIMINT_MUL(Q_PA[1], PRIM_INT__d_s_s_s[n * 6 + 3]);
489 PRIM_INT__d_s_p_s[n * 18 + 10] = SIMINT_FMADD( aoq_PQ[1], PRIM_INT__d_s_s_s[(n+1) * 6 + 3], PRIM_INT__d_s_p_s[n * 18 + 10]);
490 PRIM_INT__d_s_p_s[n * 18 + 10] = SIMINT_FMADD( vrr_const_2_over_2pq, PRIM_INT__p_s_s_s[(n+1) * 3 + 1], PRIM_INT__d_s_p_s[n * 18 + 10]);
491
492 PRIM_INT__d_s_p_s[n * 18 + 11] = SIMINT_MUL(Q_PA[2], PRIM_INT__d_s_s_s[n * 6 + 3]);
493 PRIM_INT__d_s_p_s[n * 18 + 11] = SIMINT_FMADD( aoq_PQ[2], PRIM_INT__d_s_s_s[(n+1) * 6 + 3], PRIM_INT__d_s_p_s[n * 18 + 11]);
494
495 PRIM_INT__d_s_p_s[n * 18 + 12] = SIMINT_MUL(Q_PA[0], PRIM_INT__d_s_s_s[n * 6 + 4]);
496 PRIM_INT__d_s_p_s[n * 18 + 12] = SIMINT_FMADD( aoq_PQ[0], PRIM_INT__d_s_s_s[(n+1) * 6 + 4], PRIM_INT__d_s_p_s[n * 18 + 12]);
497
498 PRIM_INT__d_s_p_s[n * 18 + 13] = SIMINT_MUL(Q_PA[1], PRIM_INT__d_s_s_s[n * 6 + 4]);
499 PRIM_INT__d_s_p_s[n * 18 + 13] = SIMINT_FMADD( aoq_PQ[1], PRIM_INT__d_s_s_s[(n+1) * 6 + 4], PRIM_INT__d_s_p_s[n * 18 + 13]);
500 PRIM_INT__d_s_p_s[n * 18 + 13] = 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 + 13]);
501
502 PRIM_INT__d_s_p_s[n * 18 + 14] = SIMINT_MUL(Q_PA[2], PRIM_INT__d_s_s_s[n * 6 + 4]);
503 PRIM_INT__d_s_p_s[n * 18 + 14] = SIMINT_FMADD( aoq_PQ[2], PRIM_INT__d_s_s_s[(n+1) * 6 + 4], PRIM_INT__d_s_p_s[n * 18 + 14]);
504 PRIM_INT__d_s_p_s[n * 18 + 14] = 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 + 14]);
505
506 PRIM_INT__d_s_p_s[n * 18 + 15] = SIMINT_MUL(Q_PA[0], PRIM_INT__d_s_s_s[n * 6 + 5]);
507 PRIM_INT__d_s_p_s[n * 18 + 15] = SIMINT_FMADD( aoq_PQ[0], PRIM_INT__d_s_s_s[(n+1) * 6 + 5], PRIM_INT__d_s_p_s[n * 18 + 15]);
508
509 PRIM_INT__d_s_p_s[n * 18 + 16] = SIMINT_MUL(Q_PA[1], PRIM_INT__d_s_s_s[n * 6 + 5]);
510 PRIM_INT__d_s_p_s[n * 18 + 16] = SIMINT_FMADD( aoq_PQ[1], PRIM_INT__d_s_s_s[(n+1) * 6 + 5], PRIM_INT__d_s_p_s[n * 18 + 16]);
511
512 PRIM_INT__d_s_p_s[n * 18 + 17] = SIMINT_MUL(Q_PA[2], PRIM_INT__d_s_s_s[n * 6 + 5]);
513 PRIM_INT__d_s_p_s[n * 18 + 17] = SIMINT_FMADD( aoq_PQ[2], PRIM_INT__d_s_s_s[(n+1) * 6 + 5], PRIM_INT__d_s_p_s[n * 18 + 17]);
514 PRIM_INT__d_s_p_s[n * 18 + 17] = SIMINT_FMADD( vrr_const_2_over_2pq, PRIM_INT__p_s_s_s[(n+1) * 3 + 2], PRIM_INT__d_s_p_s[n * 18 + 17]);
515
516 }
517
518
519 VRR_K_f_s_d_s(
520 PRIM_INT__f_s_d_s,
521 PRIM_INT__f_s_p_s,
522 PRIM_INT__f_s_s_s,
523 PRIM_INT__d_s_p_s,
524 Q_PA,
525 a_over_q,
526 aoq_PQ,
527 one_over_2pq,
528 one_over_2q,
529 5);
530
531
532
533 // Forming PRIM_INT__p_s_p_s[6 * 9];
534 for(n = 0; n < 6; ++n) // loop over orders of auxiliary function
535 {
536
537 PRIM_INT__p_s_p_s[n * 9 + 0] = SIMINT_MUL(Q_PA[0], PRIM_INT__p_s_s_s[n * 3 + 0]);
538 PRIM_INT__p_s_p_s[n * 9 + 0] = SIMINT_FMADD( aoq_PQ[0], PRIM_INT__p_s_s_s[(n+1) * 3 + 0], PRIM_INT__p_s_p_s[n * 9 + 0]);
539 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]);
540
541 PRIM_INT__p_s_p_s[n * 9 + 1] = SIMINT_MUL(Q_PA[1], PRIM_INT__p_s_s_s[n * 3 + 0]);
542 PRIM_INT__p_s_p_s[n * 9 + 1] = SIMINT_FMADD( aoq_PQ[1], PRIM_INT__p_s_s_s[(n+1) * 3 + 0], PRIM_INT__p_s_p_s[n * 9 + 1]);
543
544 PRIM_INT__p_s_p_s[n * 9 + 2] = SIMINT_MUL(Q_PA[2], PRIM_INT__p_s_s_s[n * 3 + 0]);
545 PRIM_INT__p_s_p_s[n * 9 + 2] = SIMINT_FMADD( aoq_PQ[2], PRIM_INT__p_s_s_s[(n+1) * 3 + 0], PRIM_INT__p_s_p_s[n * 9 + 2]);
546
547 PRIM_INT__p_s_p_s[n * 9 + 3] = SIMINT_MUL(Q_PA[0], PRIM_INT__p_s_s_s[n * 3 + 1]);
548 PRIM_INT__p_s_p_s[n * 9 + 3] = SIMINT_FMADD( aoq_PQ[0], PRIM_INT__p_s_s_s[(n+1) * 3 + 1], PRIM_INT__p_s_p_s[n * 9 + 3]);
549
550 PRIM_INT__p_s_p_s[n * 9 + 4] = SIMINT_MUL(Q_PA[1], PRIM_INT__p_s_s_s[n * 3 + 1]);
551 PRIM_INT__p_s_p_s[n * 9 + 4] = SIMINT_FMADD( aoq_PQ[1], PRIM_INT__p_s_s_s[(n+1) * 3 + 1], PRIM_INT__p_s_p_s[n * 9 + 4]);
552 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]);
553
554 PRIM_INT__p_s_p_s[n * 9 + 5] = SIMINT_MUL(Q_PA[2], PRIM_INT__p_s_s_s[n * 3 + 1]);
555 PRIM_INT__p_s_p_s[n * 9 + 5] = SIMINT_FMADD( aoq_PQ[2], PRIM_INT__p_s_s_s[(n+1) * 3 + 1], PRIM_INT__p_s_p_s[n * 9 + 5]);
556
557 PRIM_INT__p_s_p_s[n * 9 + 6] = SIMINT_MUL(Q_PA[0], PRIM_INT__p_s_s_s[n * 3 + 2]);
558 PRIM_INT__p_s_p_s[n * 9 + 6] = SIMINT_FMADD( aoq_PQ[0], PRIM_INT__p_s_s_s[(n+1) * 3 + 2], PRIM_INT__p_s_p_s[n * 9 + 6]);
559
560 PRIM_INT__p_s_p_s[n * 9 + 7] = SIMINT_MUL(Q_PA[1], PRIM_INT__p_s_s_s[n * 3 + 2]);
561 PRIM_INT__p_s_p_s[n * 9 + 7] = SIMINT_FMADD( aoq_PQ[1], PRIM_INT__p_s_s_s[(n+1) * 3 + 2], PRIM_INT__p_s_p_s[n * 9 + 7]);
562
563 PRIM_INT__p_s_p_s[n * 9 + 8] = SIMINT_MUL(Q_PA[2], PRIM_INT__p_s_s_s[n * 3 + 2]);
564 PRIM_INT__p_s_p_s[n * 9 + 8] = SIMINT_FMADD( aoq_PQ[2], PRIM_INT__p_s_s_s[(n+1) * 3 + 2], PRIM_INT__p_s_p_s[n * 9 + 8]);
565 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]);
566
567 }
568
569
570 VRR_K_d_s_d_s(
571 PRIM_INT__d_s_d_s,
572 PRIM_INT__d_s_p_s,
573 PRIM_INT__d_s_s_s,
574 PRIM_INT__p_s_p_s,
575 Q_PA,
576 a_over_q,
577 aoq_PQ,
578 one_over_2pq,
579 one_over_2q,
580 5);
581
582
583 ostei_general_vrr_K(3, 0, 3, 0, 4,
584 one_over_2q, a_over_q, one_over_2pq, aoq_PQ, Q_PA,
585 PRIM_INT__f_s_d_s, PRIM_INT__f_s_p_s, NULL, PRIM_INT__d_s_d_s, NULL, PRIM_INT__f_s_f_s);
586
587
588
589 // Forming PRIM_INT__s_s_p_s[6 * 3];
590 for(n = 0; n < 6; ++n) // loop over orders of auxiliary function
591 {
592
593 PRIM_INT__s_s_p_s[n * 3 + 0] = SIMINT_MUL(Q_PA[0], PRIM_INT__s_s_s_s[n * 1 + 0]);
594 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]);
595
596 PRIM_INT__s_s_p_s[n * 3 + 1] = SIMINT_MUL(Q_PA[1], PRIM_INT__s_s_s_s[n * 1 + 0]);
597 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]);
598
599 PRIM_INT__s_s_p_s[n * 3 + 2] = SIMINT_MUL(Q_PA[2], PRIM_INT__s_s_s_s[n * 1 + 0]);
600 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]);
601
602 }
603
604
605
606 // Forming PRIM_INT__p_s_d_s[5 * 18];
607 for(n = 0; n < 5; ++n) // loop over orders of auxiliary function
608 {
609
610 PRIM_INT__p_s_d_s[n * 18 + 0] = SIMINT_MUL(Q_PA[0], PRIM_INT__p_s_p_s[n * 9 + 0]);
611 PRIM_INT__p_s_d_s[n * 18 + 0] = SIMINT_FMADD( aoq_PQ[0], PRIM_INT__p_s_p_s[(n+1) * 9 + 0], PRIM_INT__p_s_d_s[n * 18 + 0]);
612 PRIM_INT__p_s_d_s[n * 18 + 0] = SIMINT_FMADD( vrr_const_1_over_2q, SIMINT_FMADD(a_over_q, PRIM_INT__p_s_s_s[(n+1) * 3 + 0], PRIM_INT__p_s_s_s[n * 3 + 0]), PRIM_INT__p_s_d_s[n * 18 + 0]);
613 PRIM_INT__p_s_d_s[n * 18 + 0] = 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 + 0]);
614
615 PRIM_INT__p_s_d_s[n * 18 + 3] = SIMINT_MUL(Q_PA[1], PRIM_INT__p_s_p_s[n * 9 + 1]);
616 PRIM_INT__p_s_d_s[n * 18 + 3] = SIMINT_FMADD( aoq_PQ[1], PRIM_INT__p_s_p_s[(n+1) * 9 + 1], PRIM_INT__p_s_d_s[n * 18 + 3]);
617 PRIM_INT__p_s_d_s[n * 18 + 3] = SIMINT_FMADD( vrr_const_1_over_2q, SIMINT_FMADD(a_over_q, PRIM_INT__p_s_s_s[(n+1) * 3 + 0], PRIM_INT__p_s_s_s[n * 3 + 0]), PRIM_INT__p_s_d_s[n * 18 + 3]);
618
619 PRIM_INT__p_s_d_s[n * 18 + 5] = SIMINT_MUL(Q_PA[2], PRIM_INT__p_s_p_s[n * 9 + 2]);
620 PRIM_INT__p_s_d_s[n * 18 + 5] = SIMINT_FMADD( aoq_PQ[2], PRIM_INT__p_s_p_s[(n+1) * 9 + 2], PRIM_INT__p_s_d_s[n * 18 + 5]);
621 PRIM_INT__p_s_d_s[n * 18 + 5] = SIMINT_FMADD( vrr_const_1_over_2q, SIMINT_FMADD(a_over_q, PRIM_INT__p_s_s_s[(n+1) * 3 + 0], PRIM_INT__p_s_s_s[n * 3 + 0]), PRIM_INT__p_s_d_s[n * 18 + 5]);
622
623 PRIM_INT__p_s_d_s[n * 18 + 6] = SIMINT_MUL(Q_PA[0], PRIM_INT__p_s_p_s[n * 9 + 3]);
624 PRIM_INT__p_s_d_s[n * 18 + 6] = SIMINT_FMADD( aoq_PQ[0], PRIM_INT__p_s_p_s[(n+1) * 9 + 3], PRIM_INT__p_s_d_s[n * 18 + 6]);
625 PRIM_INT__p_s_d_s[n * 18 + 6] = SIMINT_FMADD( vrr_const_1_over_2q, SIMINT_FMADD(a_over_q, PRIM_INT__p_s_s_s[(n+1) * 3 + 1], PRIM_INT__p_s_s_s[n * 3 + 1]), PRIM_INT__p_s_d_s[n * 18 + 6]);
626
627 PRIM_INT__p_s_d_s[n * 18 + 9] = SIMINT_MUL(Q_PA[1], PRIM_INT__p_s_p_s[n * 9 + 4]);
628 PRIM_INT__p_s_d_s[n * 18 + 9] = SIMINT_FMADD( aoq_PQ[1], PRIM_INT__p_s_p_s[(n+1) * 9 + 4], PRIM_INT__p_s_d_s[n * 18 + 9]);
629 PRIM_INT__p_s_d_s[n * 18 + 9] = SIMINT_FMADD( vrr_const_1_over_2q, SIMINT_FMADD(a_over_q, PRIM_INT__p_s_s_s[(n+1) * 3 + 1], PRIM_INT__p_s_s_s[n * 3 + 1]), PRIM_INT__p_s_d_s[n * 18 + 9]);
630 PRIM_INT__p_s_d_s[n * 18 + 9] = 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 + 9]);
631
632 PRIM_INT__p_s_d_s[n * 18 + 11] = SIMINT_MUL(Q_PA[2], PRIM_INT__p_s_p_s[n * 9 + 5]);
633 PRIM_INT__p_s_d_s[n * 18 + 11] = SIMINT_FMADD( aoq_PQ[2], PRIM_INT__p_s_p_s[(n+1) * 9 + 5], PRIM_INT__p_s_d_s[n * 18 + 11]);
634 PRIM_INT__p_s_d_s[n * 18 + 11] = SIMINT_FMADD( vrr_const_1_over_2q, SIMINT_FMADD(a_over_q, PRIM_INT__p_s_s_s[(n+1) * 3 + 1], PRIM_INT__p_s_s_s[n * 3 + 1]), PRIM_INT__p_s_d_s[n * 18 + 11]);
635
636 PRIM_INT__p_s_d_s[n * 18 + 12] = SIMINT_MUL(Q_PA[0], PRIM_INT__p_s_p_s[n * 9 + 6]);
637 PRIM_INT__p_s_d_s[n * 18 + 12] = SIMINT_FMADD( aoq_PQ[0], PRIM_INT__p_s_p_s[(n+1) * 9 + 6], PRIM_INT__p_s_d_s[n * 18 + 12]);
638 PRIM_INT__p_s_d_s[n * 18 + 12] = SIMINT_FMADD( vrr_const_1_over_2q, SIMINT_FMADD(a_over_q, PRIM_INT__p_s_s_s[(n+1) * 3 + 2], PRIM_INT__p_s_s_s[n * 3 + 2]), PRIM_INT__p_s_d_s[n * 18 + 12]);
639
640 PRIM_INT__p_s_d_s[n * 18 + 15] = SIMINT_MUL(Q_PA[1], PRIM_INT__p_s_p_s[n * 9 + 7]);
641 PRIM_INT__p_s_d_s[n * 18 + 15] = SIMINT_FMADD( aoq_PQ[1], PRIM_INT__p_s_p_s[(n+1) * 9 + 7], PRIM_INT__p_s_d_s[n * 18 + 15]);
642 PRIM_INT__p_s_d_s[n * 18 + 15] = SIMINT_FMADD( vrr_const_1_over_2q, SIMINT_FMADD(a_over_q, PRIM_INT__p_s_s_s[(n+1) * 3 + 2], PRIM_INT__p_s_s_s[n * 3 + 2]), PRIM_INT__p_s_d_s[n * 18 + 15]);
643
644 PRIM_INT__p_s_d_s[n * 18 + 17] = SIMINT_MUL(Q_PA[2], PRIM_INT__p_s_p_s[n * 9 + 8]);
645 PRIM_INT__p_s_d_s[n * 18 + 17] = SIMINT_FMADD( aoq_PQ[2], PRIM_INT__p_s_p_s[(n+1) * 9 + 8], PRIM_INT__p_s_d_s[n * 18 + 17]);
646 PRIM_INT__p_s_d_s[n * 18 + 17] = SIMINT_FMADD( vrr_const_1_over_2q, SIMINT_FMADD(a_over_q, PRIM_INT__p_s_s_s[(n+1) * 3 + 2], PRIM_INT__p_s_s_s[n * 3 + 2]), PRIM_INT__p_s_d_s[n * 18 + 17]);
647 PRIM_INT__p_s_d_s[n * 18 + 17] = 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 + 17]);
648
649 }
650
651
652 VRR_K_d_s_f_s(
653 PRIM_INT__d_s_f_s,
654 PRIM_INT__d_s_d_s,
655 PRIM_INT__d_s_p_s,
656 PRIM_INT__p_s_d_s,
657 Q_PA,
658 a_over_q,
659 aoq_PQ,
660 one_over_2pq,
661 one_over_2q,
662 4);
663
664
665 ostei_general_vrr_K(3, 0, 4, 0, 3,
666 one_over_2q, a_over_q, one_over_2pq, aoq_PQ, Q_PA,
667 PRIM_INT__f_s_f_s, PRIM_INT__f_s_d_s, NULL, PRIM_INT__d_s_f_s, NULL, PRIM_INT__f_s_g_s);
668
669
670 VRR_I_g_s_s_s(
671 PRIM_INT__g_s_s_s,
672 PRIM_INT__f_s_s_s,
673 PRIM_INT__d_s_s_s,
674 P_PA,
675 a_over_p,
676 aop_PQ,
677 one_over_2p,
678 9);
679
680
681 VRR_K_g_s_p_s(
682 PRIM_INT__g_s_p_s,
683 PRIM_INT__g_s_s_s,
684 PRIM_INT__f_s_s_s,
685 Q_PA,
686 aoq_PQ,
687 one_over_2pq,
688 6);
689
690
691 ostei_general_vrr_K(4, 0, 2, 0, 5,
692 one_over_2q, a_over_q, one_over_2pq, aoq_PQ, Q_PA,
693 PRIM_INT__g_s_p_s, PRIM_INT__g_s_s_s, NULL, PRIM_INT__f_s_p_s, NULL, PRIM_INT__g_s_d_s);
694
695
696 ostei_general_vrr_K(4, 0, 3, 0, 4,
697 one_over_2q, a_over_q, one_over_2pq, aoq_PQ, Q_PA,
698 PRIM_INT__g_s_d_s, PRIM_INT__g_s_p_s, NULL, PRIM_INT__f_s_d_s, NULL, PRIM_INT__g_s_f_s);
699
700
701
702 // Forming PRIM_INT__s_s_d_s[5 * 6];
703 for(n = 0; n < 5; ++n) // loop over orders of auxiliary function
704 {
705
706 PRIM_INT__s_s_d_s[n * 6 + 0] = SIMINT_MUL(Q_PA[0], PRIM_INT__s_s_p_s[n * 3 + 0]);
707 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]);
708 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]);
709
710 PRIM_INT__s_s_d_s[n * 6 + 3] = SIMINT_MUL(Q_PA[1], PRIM_INT__s_s_p_s[n * 3 + 1]);
711 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]);
712 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]);
713
714 PRIM_INT__s_s_d_s[n * 6 + 5] = SIMINT_MUL(Q_PA[2], PRIM_INT__s_s_p_s[n * 3 + 2]);
715 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]);
716 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]);
717
718 }
719
720
721 VRR_K_p_s_f_s(
722 PRIM_INT__p_s_f_s,
723 PRIM_INT__p_s_d_s,
724 PRIM_INT__p_s_p_s,
725 PRIM_INT__s_s_d_s,
726 Q_PA,
727 a_over_q,
728 aoq_PQ,
729 one_over_2pq,
730 one_over_2q,
731 4);
732
733
734 ostei_general_vrr_K(2, 0, 4, 0, 3,
735 one_over_2q, a_over_q, one_over_2pq, aoq_PQ, Q_PA,
736 PRIM_INT__d_s_f_s, PRIM_INT__d_s_d_s, NULL, PRIM_INT__p_s_f_s, NULL, PRIM_INT__d_s_g_s);
737
738
739 ostei_general_vrr_K(3, 0, 5, 0, 2,
740 one_over_2q, a_over_q, one_over_2pq, aoq_PQ, Q_PA,
741 PRIM_INT__f_s_g_s, PRIM_INT__f_s_f_s, NULL, PRIM_INT__d_s_g_s, NULL, PRIM_INT__f_s_h_s);
742
743
744 ostei_general_vrr_K(4, 0, 4, 0, 3,
745 one_over_2q, a_over_q, one_over_2pq, aoq_PQ, Q_PA,
746 PRIM_INT__g_s_f_s, PRIM_INT__g_s_d_s, NULL, PRIM_INT__f_s_f_s, NULL, PRIM_INT__g_s_g_s);
747
748
749 VRR_I_h_s_s_s(
750 PRIM_INT__h_s_s_s,
751 PRIM_INT__g_s_s_s,
752 PRIM_INT__f_s_s_s,
753 P_PA,
754 a_over_p,
755 aop_PQ,
756 one_over_2p,
757 8);
758
759
760 ostei_general_vrr_K(5, 0, 1, 0, 6,
761 one_over_2q, a_over_q, one_over_2pq, aoq_PQ, Q_PA,
762 PRIM_INT__h_s_s_s, NULL, NULL, PRIM_INT__g_s_s_s, NULL, PRIM_INT__h_s_p_s);
763
764
765 ostei_general_vrr_K(5, 0, 2, 0, 5,
766 one_over_2q, a_over_q, one_over_2pq, aoq_PQ, Q_PA,
767 PRIM_INT__h_s_p_s, PRIM_INT__h_s_s_s, NULL, PRIM_INT__g_s_p_s, NULL, PRIM_INT__h_s_d_s);
768
769
770 ostei_general_vrr_K(5, 0, 3, 0, 4,
771 one_over_2q, a_over_q, one_over_2pq, aoq_PQ, Q_PA,
772 PRIM_INT__h_s_d_s, PRIM_INT__h_s_p_s, NULL, PRIM_INT__g_s_d_s, NULL, PRIM_INT__h_s_f_s);
773
774
775
776 // Forming PRIM_INT__s_s_f_s[4 * 10];
777 for(n = 0; n < 4; ++n) // loop over orders of auxiliary function
778 {
779
780 PRIM_INT__s_s_f_s[n * 10 + 0] = SIMINT_MUL(Q_PA[0], PRIM_INT__s_s_d_s[n * 6 + 0]);
781 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]);
782 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]);
783
784 PRIM_INT__s_s_f_s[n * 10 + 1] = SIMINT_MUL(Q_PA[1], PRIM_INT__s_s_d_s[n * 6 + 0]);
785 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]);
786
787 PRIM_INT__s_s_f_s[n * 10 + 6] = SIMINT_MUL(Q_PA[1], PRIM_INT__s_s_d_s[n * 6 + 3]);
788 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]);
789 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]);
790
791 PRIM_INT__s_s_f_s[n * 10 + 9] = SIMINT_MUL(Q_PA[2], PRIM_INT__s_s_d_s[n * 6 + 5]);
792 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]);
793 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]);
794
795 }
796
797
798 VRR_K_p_s_g_s(
799 PRIM_INT__p_s_g_s,
800 PRIM_INT__p_s_f_s,
801 PRIM_INT__p_s_d_s,
802 PRIM_INT__s_s_f_s,
803 Q_PA,
804 a_over_q,
805 aoq_PQ,
806 one_over_2pq,
807 one_over_2q,
808 3);
809
810
811 ostei_general_vrr_K(2, 0, 5, 0, 2,
812 one_over_2q, a_over_q, one_over_2pq, aoq_PQ, Q_PA,
813 PRIM_INT__d_s_g_s, PRIM_INT__d_s_f_s, NULL, PRIM_INT__p_s_g_s, NULL, PRIM_INT__d_s_h_s);
814
815
816 ostei_general_vrr_K(3, 0, 6, 0, 1,
817 one_over_2q, a_over_q, one_over_2pq, aoq_PQ, Q_PA,
818 PRIM_INT__f_s_h_s, PRIM_INT__f_s_g_s, NULL, PRIM_INT__d_s_h_s, NULL, PRIM_INT__f_s_i_s);
819
820
821 ostei_general_vrr_K(4, 0, 5, 0, 2,
822 one_over_2q, a_over_q, one_over_2pq, aoq_PQ, Q_PA,
823 PRIM_INT__g_s_g_s, PRIM_INT__g_s_f_s, NULL, PRIM_INT__f_s_g_s, NULL, PRIM_INT__g_s_h_s);
824
825
826 ostei_general_vrr_K(5, 0, 4, 0, 3,
827 one_over_2q, a_over_q, one_over_2pq, aoq_PQ, Q_PA,
828 PRIM_INT__h_s_f_s, PRIM_INT__h_s_d_s, NULL, PRIM_INT__g_s_f_s, NULL, PRIM_INT__h_s_g_s);
829
830
831 ostei_general_vrr1_I(6, 7,
832 one_over_2p, a_over_p, aop_PQ, P_PA,
833 PRIM_INT__h_s_s_s, PRIM_INT__g_s_s_s, PRIM_INT__i_s_s_s);
834
835
836 ostei_general_vrr_K(6, 0, 1, 0, 6,
837 one_over_2q, a_over_q, one_over_2pq, aoq_PQ, Q_PA,
838 PRIM_INT__i_s_s_s, NULL, NULL, PRIM_INT__h_s_s_s, NULL, PRIM_INT__i_s_p_s);
839
840
841 ostei_general_vrr_K(6, 0, 2, 0, 5,
842 one_over_2q, a_over_q, one_over_2pq, aoq_PQ, Q_PA,
843 PRIM_INT__i_s_p_s, PRIM_INT__i_s_s_s, NULL, PRIM_INT__h_s_p_s, NULL, PRIM_INT__i_s_d_s);
844
845
846 ostei_general_vrr_K(6, 0, 3, 0, 4,
847 one_over_2q, a_over_q, one_over_2pq, aoq_PQ, Q_PA,
848 PRIM_INT__i_s_d_s, PRIM_INT__i_s_p_s, NULL, PRIM_INT__h_s_d_s, NULL, PRIM_INT__i_s_f_s);
849
850
851 ostei_general_vrr_K(4, 0, 6, 0, 1,
852 one_over_2q, a_over_q, one_over_2pq, aoq_PQ, Q_PA,
853 PRIM_INT__g_s_h_s, PRIM_INT__g_s_g_s, NULL, PRIM_INT__f_s_h_s, NULL, PRIM_INT__g_s_i_s);
854
855
856 ostei_general_vrr_K(5, 0, 5, 0, 2,
857 one_over_2q, a_over_q, one_over_2pq, aoq_PQ, Q_PA,
858 PRIM_INT__h_s_g_s, PRIM_INT__h_s_f_s, NULL, PRIM_INT__g_s_g_s, NULL, PRIM_INT__h_s_h_s);
859
860
861 ostei_general_vrr_K(6, 0, 4, 0, 3,
862 one_over_2q, a_over_q, one_over_2pq, aoq_PQ, Q_PA,
863 PRIM_INT__i_s_f_s, PRIM_INT__i_s_d_s, NULL, PRIM_INT__h_s_f_s, NULL, PRIM_INT__i_s_g_s);
864
865
866 ostei_general_vrr_K(5, 0, 6, 0, 1,
867 one_over_2q, a_over_q, one_over_2pq, aoq_PQ, Q_PA,
868 PRIM_INT__h_s_h_s, PRIM_INT__h_s_g_s, NULL, PRIM_INT__g_s_h_s, NULL, PRIM_INT__h_s_i_s);
869
870
871 ostei_general_vrr_K(6, 0, 5, 0, 2,
872 one_over_2q, a_over_q, one_over_2pq, aoq_PQ, Q_PA,
873 PRIM_INT__i_s_g_s, PRIM_INT__i_s_f_s, NULL, PRIM_INT__h_s_g_s, NULL, PRIM_INT__i_s_h_s);
874
875
876 ostei_general_vrr_K(6, 0, 6, 0, 1,
877 one_over_2q, a_over_q, one_over_2pq, aoq_PQ, Q_PA,
878 PRIM_INT__i_s_h_s, PRIM_INT__i_s_g_s, NULL, PRIM_INT__h_s_h_s, NULL, PRIM_INT__i_s_i_s);
879
880
881
882
883 ////////////////////////////////////
884 // Accumulate contracted integrals
885 ////////////////////////////////////
886 if(lastoffset == 0)
887 {
888 contract_all(100, PRIM_INT__f_s_f_s, PRIM_PTR_INT__f_s_f_s);
889 contract_all(150, PRIM_INT__f_s_g_s, PRIM_PTR_INT__f_s_g_s);
890 contract_all(210, PRIM_INT__f_s_h_s, PRIM_PTR_INT__f_s_h_s);
891 contract_all(280, PRIM_INT__f_s_i_s, PRIM_PTR_INT__f_s_i_s);
892 contract_all(150, PRIM_INT__g_s_f_s, PRIM_PTR_INT__g_s_f_s);
893 contract_all(225, PRIM_INT__g_s_g_s, PRIM_PTR_INT__g_s_g_s);
894 contract_all(315, PRIM_INT__g_s_h_s, PRIM_PTR_INT__g_s_h_s);
895 contract_all(420, PRIM_INT__g_s_i_s, PRIM_PTR_INT__g_s_i_s);
896 contract_all(210, PRIM_INT__h_s_f_s, PRIM_PTR_INT__h_s_f_s);
897 contract_all(315, PRIM_INT__h_s_g_s, PRIM_PTR_INT__h_s_g_s);
898 contract_all(441, PRIM_INT__h_s_h_s, PRIM_PTR_INT__h_s_h_s);
899 contract_all(588, PRIM_INT__h_s_i_s, PRIM_PTR_INT__h_s_i_s);
900 contract_all(280, PRIM_INT__i_s_f_s, PRIM_PTR_INT__i_s_f_s);
901 contract_all(420, PRIM_INT__i_s_g_s, PRIM_PTR_INT__i_s_g_s);
902 contract_all(588, PRIM_INT__i_s_h_s, PRIM_PTR_INT__i_s_h_s);
903 contract_all(784, PRIM_INT__i_s_i_s, PRIM_PTR_INT__i_s_i_s);
904 }
905 else
906 {
907 contract(100, shelloffsets, PRIM_INT__f_s_f_s, PRIM_PTR_INT__f_s_f_s);
908 contract(150, shelloffsets, PRIM_INT__f_s_g_s, PRIM_PTR_INT__f_s_g_s);
909 contract(210, shelloffsets, PRIM_INT__f_s_h_s, PRIM_PTR_INT__f_s_h_s);
910 contract(280, shelloffsets, PRIM_INT__f_s_i_s, PRIM_PTR_INT__f_s_i_s);
911 contract(150, shelloffsets, PRIM_INT__g_s_f_s, PRIM_PTR_INT__g_s_f_s);
912 contract(225, shelloffsets, PRIM_INT__g_s_g_s, PRIM_PTR_INT__g_s_g_s);
913 contract(315, shelloffsets, PRIM_INT__g_s_h_s, PRIM_PTR_INT__g_s_h_s);
914 contract(420, shelloffsets, PRIM_INT__g_s_i_s, PRIM_PTR_INT__g_s_i_s);
915 contract(210, shelloffsets, PRIM_INT__h_s_f_s, PRIM_PTR_INT__h_s_f_s);
916 contract(315, shelloffsets, PRIM_INT__h_s_g_s, PRIM_PTR_INT__h_s_g_s);
917 contract(441, shelloffsets, PRIM_INT__h_s_h_s, PRIM_PTR_INT__h_s_h_s);
918 contract(588, shelloffsets, PRIM_INT__h_s_i_s, PRIM_PTR_INT__h_s_i_s);
919 contract(280, shelloffsets, PRIM_INT__i_s_f_s, PRIM_PTR_INT__i_s_f_s);
920 contract(420, shelloffsets, PRIM_INT__i_s_g_s, PRIM_PTR_INT__i_s_g_s);
921 contract(588, shelloffsets, PRIM_INT__i_s_h_s, PRIM_PTR_INT__i_s_h_s);
922 contract(784, shelloffsets, PRIM_INT__i_s_i_s, PRIM_PTR_INT__i_s_i_s);
923 PRIM_PTR_INT__f_s_f_s += lastoffset*100;
924 PRIM_PTR_INT__f_s_g_s += lastoffset*150;
925 PRIM_PTR_INT__f_s_h_s += lastoffset*210;
926 PRIM_PTR_INT__f_s_i_s += lastoffset*280;
927 PRIM_PTR_INT__g_s_f_s += lastoffset*150;
928 PRIM_PTR_INT__g_s_g_s += lastoffset*225;
929 PRIM_PTR_INT__g_s_h_s += lastoffset*315;
930 PRIM_PTR_INT__g_s_i_s += lastoffset*420;
931 PRIM_PTR_INT__h_s_f_s += lastoffset*210;
932 PRIM_PTR_INT__h_s_g_s += lastoffset*315;
933 PRIM_PTR_INT__h_s_h_s += lastoffset*441;
934 PRIM_PTR_INT__h_s_i_s += lastoffset*588;
935 PRIM_PTR_INT__i_s_f_s += lastoffset*280;
936 PRIM_PTR_INT__i_s_g_s += lastoffset*420;
937 PRIM_PTR_INT__i_s_h_s += lastoffset*588;
938 PRIM_PTR_INT__i_s_i_s += lastoffset*784;
939 }
940
941 } // close loop over j
942 } // close loop over i
943
944 //Advance to the next batch
945 jstart = SIMINT_SIMD_ROUND(jend);
946
947 //////////////////////////////////////////////
948 // Contracted integrals: Horizontal recurrance
949 //////////////////////////////////////////////
950
951
952 const double hAB[3] = { P.AB_x[ab], P.AB_y[ab], P.AB_z[ab] };
953
954
955 for(abcd = 0; abcd < nshellbatch; ++abcd, ++real_abcd)
956 {
957 const double hCD[3] = { Q.AB_x[cd+abcd], Q.AB_y[cd+abcd], Q.AB_z[cd+abcd] };
958
959 // set up HRR pointers
960 double const * restrict HRR_INT__f_s_f_s = INT__f_s_f_s + abcd * 100;
961 double const * restrict HRR_INT__f_s_g_s = INT__f_s_g_s + abcd * 150;
962 double const * restrict HRR_INT__f_s_h_s = INT__f_s_h_s + abcd * 210;
963 double const * restrict HRR_INT__f_s_i_s = INT__f_s_i_s + abcd * 280;
964 double const * restrict HRR_INT__g_s_f_s = INT__g_s_f_s + abcd * 150;
965 double const * restrict HRR_INT__g_s_g_s = INT__g_s_g_s + abcd * 225;
966 double const * restrict HRR_INT__g_s_h_s = INT__g_s_h_s + abcd * 315;
967 double const * restrict HRR_INT__g_s_i_s = INT__g_s_i_s + abcd * 420;
968 double const * restrict HRR_INT__h_s_f_s = INT__h_s_f_s + abcd * 210;
969 double const * restrict HRR_INT__h_s_g_s = INT__h_s_g_s + abcd * 315;
970 double const * restrict HRR_INT__h_s_h_s = INT__h_s_h_s + abcd * 441;
971 double const * restrict HRR_INT__h_s_i_s = INT__h_s_i_s + abcd * 588;
972 double const * restrict HRR_INT__i_s_f_s = INT__i_s_f_s + abcd * 280;
973 double const * restrict HRR_INT__i_s_g_s = INT__i_s_g_s + abcd * 420;
974 double const * restrict HRR_INT__i_s_h_s = INT__i_s_h_s + abcd * 588;
975 double const * restrict HRR_INT__i_s_i_s = INT__i_s_i_s + abcd * 784;
976 double * restrict HRR_INT__f_f_f_f = INT__f_f_f_f + real_abcd * 10000;
977
978 // form INT__f_p_f_s
979 HRR_J_f_p(
980 HRR_INT__f_p_f_s,
981 HRR_INT__f_s_f_s,
982 HRR_INT__g_s_f_s,
983 hAB, 10);
984
985 // form INT__f_p_g_s
986 HRR_J_f_p(
987 HRR_INT__f_p_g_s,
988 HRR_INT__f_s_g_s,
989 HRR_INT__g_s_g_s,
990 hAB, 15);
991
992 // form INT__f_p_h_s
993 HRR_J_f_p(
994 HRR_INT__f_p_h_s,
995 HRR_INT__f_s_h_s,
996 HRR_INT__g_s_h_s,
997 hAB, 21);
998
999 // form INT__f_p_i_s
1000 HRR_J_f_p(
1001 HRR_INT__f_p_i_s,
1002 HRR_INT__f_s_i_s,
1003 HRR_INT__g_s_i_s,
1004 hAB, 28);
1005
1006 // form INT__g_p_f_s
1007 HRR_J_g_p(
1008 HRR_INT__g_p_f_s,
1009 HRR_INT__g_s_f_s,
1010 HRR_INT__h_s_f_s,
1011 hAB, 10);
1012
1013 // form INT__g_p_g_s
1014 HRR_J_g_p(
1015 HRR_INT__g_p_g_s,
1016 HRR_INT__g_s_g_s,
1017 HRR_INT__h_s_g_s,
1018 hAB, 15);
1019
1020 // form INT__g_p_h_s
1021 HRR_J_g_p(
1022 HRR_INT__g_p_h_s,
1023 HRR_INT__g_s_h_s,
1024 HRR_INT__h_s_h_s,
1025 hAB, 21);
1026
1027 // form INT__g_p_i_s
1028 HRR_J_g_p(
1029 HRR_INT__g_p_i_s,
1030 HRR_INT__g_s_i_s,
1031 HRR_INT__h_s_i_s,
1032 hAB, 28);
1033
1034 // form INT__h_p_f_s
1035 ostei_general_hrr_J(5, 1, 3, 0, hAB, HRR_INT__i_s_f_s, HRR_INT__h_s_f_s, HRR_INT__h_p_f_s);
1036
1037 // form INT__h_p_g_s
1038 ostei_general_hrr_J(5, 1, 4, 0, hAB, HRR_INT__i_s_g_s, HRR_INT__h_s_g_s, HRR_INT__h_p_g_s);
1039
1040 // form INT__h_p_h_s
1041 ostei_general_hrr_J(5, 1, 5, 0, hAB, HRR_INT__i_s_h_s, HRR_INT__h_s_h_s, HRR_INT__h_p_h_s);
1042
1043 // form INT__h_p_i_s
1044 ostei_general_hrr_J(5, 1, 6, 0, hAB, HRR_INT__i_s_i_s, HRR_INT__h_s_i_s, HRR_INT__h_p_i_s);
1045
1046 // form INT__f_d_f_s
1047 HRR_J_f_d(
1048 HRR_INT__f_d_f_s,
1049 HRR_INT__f_p_f_s,
1050 HRR_INT__g_p_f_s,
1051 hAB, 10);
1052
1053 // form INT__f_d_g_s
1054 HRR_J_f_d(
1055 HRR_INT__f_d_g_s,
1056 HRR_INT__f_p_g_s,
1057 HRR_INT__g_p_g_s,
1058 hAB, 15);
1059
1060 // form INT__f_d_h_s
1061 HRR_J_f_d(
1062 HRR_INT__f_d_h_s,
1063 HRR_INT__f_p_h_s,
1064 HRR_INT__g_p_h_s,
1065 hAB, 21);
1066
1067 // form INT__f_d_i_s
1068 HRR_J_f_d(
1069 HRR_INT__f_d_i_s,
1070 HRR_INT__f_p_i_s,
1071 HRR_INT__g_p_i_s,
1072 hAB, 28);
1073
1074 // form INT__g_d_f_s
1075 ostei_general_hrr_J(4, 2, 3, 0, hAB, HRR_INT__h_p_f_s, HRR_INT__g_p_f_s, HRR_INT__g_d_f_s);
1076
1077 // form INT__g_d_g_s
1078 ostei_general_hrr_J(4, 2, 4, 0, hAB, HRR_INT__h_p_g_s, HRR_INT__g_p_g_s, HRR_INT__g_d_g_s);
1079
1080 // form INT__g_d_h_s
1081 ostei_general_hrr_J(4, 2, 5, 0, hAB, HRR_INT__h_p_h_s, HRR_INT__g_p_h_s, HRR_INT__g_d_h_s);
1082
1083 // form INT__g_d_i_s
1084 ostei_general_hrr_J(4, 2, 6, 0, hAB, HRR_INT__h_p_i_s, HRR_INT__g_p_i_s, HRR_INT__g_d_i_s);
1085
1086 // form INT__f_f_f_s
1087 ostei_general_hrr_J(3, 3, 3, 0, hAB, HRR_INT__g_d_f_s, HRR_INT__f_d_f_s, HRR_INT__f_f_f_s);
1088
1089 // form INT__f_f_g_s
1090 ostei_general_hrr_J(3, 3, 4, 0, hAB, HRR_INT__g_d_g_s, HRR_INT__f_d_g_s, HRR_INT__f_f_g_s);
1091
1092 // form INT__f_f_h_s
1093 ostei_general_hrr_J(3, 3, 5, 0, hAB, HRR_INT__g_d_h_s, HRR_INT__f_d_h_s, HRR_INT__f_f_h_s);
1094
1095 // form INT__f_f_i_s
1096 ostei_general_hrr_J(3, 3, 6, 0, hAB, HRR_INT__g_d_i_s, HRR_INT__f_d_i_s, HRR_INT__f_f_i_s);
1097
1098 // form INT__f_f_f_p
1099 HRR_L_f_p(
1100 HRR_INT__f_f_f_p,
1101 HRR_INT__f_f_f_s,
1102 HRR_INT__f_f_g_s,
1103 hCD, 100);
1104
1105 // form INT__f_f_g_p
1106 HRR_L_g_p(
1107 HRR_INT__f_f_g_p,
1108 HRR_INT__f_f_g_s,
1109 HRR_INT__f_f_h_s,
1110 hCD, 100);
1111
1112 // form INT__f_f_h_p
1113 ostei_general_hrr_L(3, 3, 5, 1, hCD, HRR_INT__f_f_i_s, HRR_INT__f_f_h_s, HRR_INT__f_f_h_p);
1114
1115 // form INT__f_f_f_d
1116 HRR_L_f_d(
1117 HRR_INT__f_f_f_d,
1118 HRR_INT__f_f_f_p,
1119 HRR_INT__f_f_g_p,
1120 hCD, 100);
1121
1122 // form INT__f_f_g_d
1123 ostei_general_hrr_L(3, 3, 4, 2, hCD, HRR_INT__f_f_h_p, HRR_INT__f_f_g_p, HRR_INT__f_f_g_d);
1124
1125 // form INT__f_f_f_f
1126 ostei_general_hrr_L(3, 3, 3, 3, hCD, HRR_INT__f_f_g_d, HRR_INT__f_f_f_d, HRR_INT__f_f_f_f);
1127
1128
1129 } // close HRR loop
1130
1131
1132 } // close loop cdbatch
1133
1134 istart = iend;
1135 } // close loop over ab
1136
1137 return P.nshell12_clip * Q.nshell12_clip;
1138 }
1139
1140