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_h_d_h_g(struct simint_multi_shellpair const P,struct simint_multi_shellpair const Q,double screen_tol,double * const restrict work,double * const restrict INT__h_d_h_g)8 int ostei_h_d_h_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__h_d_h_g)
13 {
14
15 SIMINT_ASSUME_ALIGN_DBL(work);
16 SIMINT_ASSUME_ALIGN_DBL(INT__h_d_h_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 iket;
26 int ibra;
27
28 // partition workspace
29 double * const INT__h_s_h_s = work + (SIMINT_NSHELL_SIMD * 0);
30 double * const INT__h_s_i_s = work + (SIMINT_NSHELL_SIMD * 441);
31 double * const INT__h_s_k_s = work + (SIMINT_NSHELL_SIMD * 1029);
32 double * const INT__h_s_l_s = work + (SIMINT_NSHELL_SIMD * 1785);
33 double * const INT__h_s_m_s = work + (SIMINT_NSHELL_SIMD * 2730);
34 double * const INT__i_s_h_s = work + (SIMINT_NSHELL_SIMD * 3885);
35 double * const INT__i_s_i_s = work + (SIMINT_NSHELL_SIMD * 4473);
36 double * const INT__i_s_k_s = work + (SIMINT_NSHELL_SIMD * 5257);
37 double * const INT__i_s_l_s = work + (SIMINT_NSHELL_SIMD * 6265);
38 double * const INT__i_s_m_s = work + (SIMINT_NSHELL_SIMD * 7525);
39 double * const INT__k_s_h_s = work + (SIMINT_NSHELL_SIMD * 9065);
40 double * const INT__k_s_i_s = work + (SIMINT_NSHELL_SIMD * 9821);
41 double * const INT__k_s_k_s = work + (SIMINT_NSHELL_SIMD * 10829);
42 double * const INT__k_s_l_s = work + (SIMINT_NSHELL_SIMD * 12125);
43 double * const INT__k_s_m_s = work + (SIMINT_NSHELL_SIMD * 13745);
44 SIMINT_DBLTYPE * const primwork = (SIMINT_DBLTYPE *)(work + SIMINT_NSHELL_SIMD*15725);
45 SIMINT_DBLTYPE * const restrict PRIM_INT__s_s_s_s = primwork + 0;
46 SIMINT_DBLTYPE * const restrict PRIM_INT__s_s_p_s = primwork + 17;
47 SIMINT_DBLTYPE * const restrict PRIM_INT__s_s_d_s = primwork + 65;
48 SIMINT_DBLTYPE * const restrict PRIM_INT__s_s_f_s = primwork + 155;
49 SIMINT_DBLTYPE * const restrict PRIM_INT__s_s_g_s = primwork + 295;
50 SIMINT_DBLTYPE * const restrict PRIM_INT__s_s_h_s = primwork + 490;
51 SIMINT_DBLTYPE * const restrict PRIM_INT__s_s_i_s = primwork + 742;
52 SIMINT_DBLTYPE * const restrict PRIM_INT__s_s_k_s = primwork + 1050;
53 SIMINT_DBLTYPE * const restrict PRIM_INT__s_s_l_s = primwork + 1410;
54 SIMINT_DBLTYPE * const restrict PRIM_INT__s_s_m_s = primwork + 1815;
55 SIMINT_DBLTYPE * const restrict PRIM_INT__p_s_s_s = primwork + 2255;
56 SIMINT_DBLTYPE * const restrict PRIM_INT__p_s_p_s = primwork + 2276;
57 SIMINT_DBLTYPE * const restrict PRIM_INT__p_s_d_s = primwork + 2339;
58 SIMINT_DBLTYPE * const restrict PRIM_INT__p_s_f_s = primwork + 2465;
59 SIMINT_DBLTYPE * const restrict PRIM_INT__p_s_g_s = primwork + 2675;
60 SIMINT_DBLTYPE * const restrict PRIM_INT__p_s_h_s = primwork + 2990;
61 SIMINT_DBLTYPE * const restrict PRIM_INT__p_s_i_s = primwork + 3431;
62 SIMINT_DBLTYPE * const restrict PRIM_INT__p_s_k_s = primwork + 4019;
63 SIMINT_DBLTYPE * const restrict PRIM_INT__p_s_l_s = primwork + 4775;
64 SIMINT_DBLTYPE * const restrict PRIM_INT__p_s_m_s = primwork + 5720;
65 SIMINT_DBLTYPE * const restrict PRIM_INT__d_s_s_s = primwork + 6875;
66 SIMINT_DBLTYPE * const restrict PRIM_INT__d_s_p_s = primwork + 6911;
67 SIMINT_DBLTYPE * const restrict PRIM_INT__d_s_d_s = primwork + 7019;
68 SIMINT_DBLTYPE * const restrict PRIM_INT__d_s_f_s = primwork + 7235;
69 SIMINT_DBLTYPE * const restrict PRIM_INT__d_s_g_s = primwork + 7595;
70 SIMINT_DBLTYPE * const restrict PRIM_INT__d_s_h_s = primwork + 8135;
71 SIMINT_DBLTYPE * const restrict PRIM_INT__d_s_i_s = primwork + 8891;
72 SIMINT_DBLTYPE * const restrict PRIM_INT__d_s_k_s = primwork + 9899;
73 SIMINT_DBLTYPE * const restrict PRIM_INT__d_s_l_s = primwork + 11195;
74 SIMINT_DBLTYPE * const restrict PRIM_INT__d_s_m_s = primwork + 12815;
75 SIMINT_DBLTYPE * const restrict PRIM_INT__f_s_p_s = primwork + 14795;
76 SIMINT_DBLTYPE * const restrict PRIM_INT__f_s_d_s = primwork + 14945;
77 SIMINT_DBLTYPE * const restrict PRIM_INT__f_s_f_s = primwork + 15245;
78 SIMINT_DBLTYPE * const restrict PRIM_INT__f_s_g_s = primwork + 15745;
79 SIMINT_DBLTYPE * const restrict PRIM_INT__f_s_h_s = primwork + 16495;
80 SIMINT_DBLTYPE * const restrict PRIM_INT__f_s_i_s = primwork + 17545;
81 SIMINT_DBLTYPE * const restrict PRIM_INT__f_s_k_s = primwork + 18945;
82 SIMINT_DBLTYPE * const restrict PRIM_INT__f_s_l_s = primwork + 20745;
83 SIMINT_DBLTYPE * const restrict PRIM_INT__f_s_m_s = primwork + 22995;
84 SIMINT_DBLTYPE * const restrict PRIM_INT__g_s_d_s = primwork + 25745;
85 SIMINT_DBLTYPE * const restrict PRIM_INT__g_s_f_s = primwork + 26105;
86 SIMINT_DBLTYPE * const restrict PRIM_INT__g_s_g_s = primwork + 26705;
87 SIMINT_DBLTYPE * const restrict PRIM_INT__g_s_h_s = primwork + 27605;
88 SIMINT_DBLTYPE * const restrict PRIM_INT__g_s_i_s = primwork + 28865;
89 SIMINT_DBLTYPE * const restrict PRIM_INT__g_s_k_s = primwork + 30545;
90 SIMINT_DBLTYPE * const restrict PRIM_INT__g_s_l_s = primwork + 32705;
91 SIMINT_DBLTYPE * const restrict PRIM_INT__g_s_m_s = primwork + 35405;
92 SIMINT_DBLTYPE * const restrict PRIM_INT__h_s_f_s = primwork + 38705;
93 SIMINT_DBLTYPE * const restrict PRIM_INT__h_s_g_s = primwork + 39335;
94 SIMINT_DBLTYPE * const restrict PRIM_INT__h_s_h_s = primwork + 40280;
95 SIMINT_DBLTYPE * const restrict PRIM_INT__h_s_i_s = primwork + 41603;
96 SIMINT_DBLTYPE * const restrict PRIM_INT__h_s_k_s = primwork + 43367;
97 SIMINT_DBLTYPE * const restrict PRIM_INT__h_s_l_s = primwork + 45635;
98 SIMINT_DBLTYPE * const restrict PRIM_INT__h_s_m_s = primwork + 48470;
99 SIMINT_DBLTYPE * const restrict PRIM_INT__i_s_g_s = primwork + 51935;
100 SIMINT_DBLTYPE * const restrict PRIM_INT__i_s_h_s = primwork + 52775;
101 SIMINT_DBLTYPE * const restrict PRIM_INT__i_s_i_s = primwork + 53951;
102 SIMINT_DBLTYPE * const restrict PRIM_INT__i_s_k_s = primwork + 55519;
103 SIMINT_DBLTYPE * const restrict PRIM_INT__i_s_l_s = primwork + 57535;
104 SIMINT_DBLTYPE * const restrict PRIM_INT__i_s_m_s = primwork + 60055;
105 SIMINT_DBLTYPE * const restrict PRIM_INT__k_s_h_s = primwork + 63135;
106 SIMINT_DBLTYPE * const restrict PRIM_INT__k_s_i_s = primwork + 63891;
107 SIMINT_DBLTYPE * const restrict PRIM_INT__k_s_k_s = primwork + 64899;
108 SIMINT_DBLTYPE * const restrict PRIM_INT__k_s_l_s = primwork + 66195;
109 SIMINT_DBLTYPE * const restrict PRIM_INT__k_s_m_s = primwork + 67815;
110 double * const hrrwork = (double *)(primwork + 69795);
111 double * const HRR_INT__h_p_h_s = hrrwork + 0;
112 double * const HRR_INT__h_p_i_s = hrrwork + 1323;
113 double * const HRR_INT__h_p_k_s = hrrwork + 3087;
114 double * const HRR_INT__h_p_l_s = hrrwork + 5355;
115 double * const HRR_INT__h_p_m_s = hrrwork + 8190;
116 double * const HRR_INT__h_d_h_s = hrrwork + 11655;
117 double * const HRR_INT__h_d_h_p = hrrwork + 14301;
118 double * const HRR_INT__h_d_h_d = hrrwork + 22239;
119 double * const HRR_INT__h_d_h_f = hrrwork + 38115;
120 double * const HRR_INT__h_d_i_s = hrrwork + 64575;
121 double * const HRR_INT__h_d_i_p = hrrwork + 68103;
122 double * const HRR_INT__h_d_i_d = hrrwork + 78687;
123 double * const HRR_INT__h_d_i_f = hrrwork + 99855;
124 double * const HRR_INT__h_d_k_s = hrrwork + 135135;
125 double * const HRR_INT__h_d_k_p = hrrwork + 139671;
126 double * const HRR_INT__h_d_k_d = hrrwork + 153279;
127 double * const HRR_INT__h_d_l_s = hrrwork + 180495;
128 double * const HRR_INT__h_d_l_p = hrrwork + 186165;
129 double * const HRR_INT__h_d_m_s = hrrwork + 203175;
130 double * const HRR_INT__i_p_h_s = hrrwork + 210105;
131 double * const HRR_INT__i_p_i_s = hrrwork + 211869;
132 double * const HRR_INT__i_p_k_s = hrrwork + 214221;
133 double * const HRR_INT__i_p_l_s = hrrwork + 217245;
134 double * const HRR_INT__i_p_m_s = hrrwork + 221025;
135
136
137 // Create constants
138 const SIMINT_DBLTYPE const_1 = SIMINT_DBLSET1(1);
139 const SIMINT_DBLTYPE const_2 = SIMINT_DBLSET1(2);
140 const SIMINT_DBLTYPE const_3 = SIMINT_DBLSET1(3);
141 const SIMINT_DBLTYPE const_4 = SIMINT_DBLSET1(4);
142 const SIMINT_DBLTYPE const_5 = SIMINT_DBLSET1(5);
143 const SIMINT_DBLTYPE const_6 = SIMINT_DBLSET1(6);
144 const SIMINT_DBLTYPE const_7 = SIMINT_DBLSET1(7);
145 const SIMINT_DBLTYPE const_8 = SIMINT_DBLSET1(8);
146 const SIMINT_DBLTYPE const_9 = SIMINT_DBLSET1(9);
147 const SIMINT_DBLTYPE one_half = SIMINT_DBLSET1(0.5);
148
149
150 ////////////////////////////////////////
151 // Loop over shells and primitives
152 ////////////////////////////////////////
153
154 real_abcd = 0;
155 istart = 0;
156 for(ab = 0; ab < P.nshell12_clip; ++ab)
157 {
158 const int iend = istart + P.nprim12[ab];
159
160 cd = 0;
161 jstart = 0;
162
163 for(cd = 0; cd < Q.nshell12_clip; cd += SIMINT_NSHELL_SIMD)
164 {
165 const int nshellbatch = ((cd + SIMINT_NSHELL_SIMD) > Q.nshell12_clip) ? Q.nshell12_clip - cd : SIMINT_NSHELL_SIMD;
166 int jend = jstart;
167 for(i = 0; i < nshellbatch; i++)
168 jend += Q.nprim12[cd+i];
169
170 // Clear the beginning of the workspace (where we are accumulating integrals)
171 memset(work, 0, SIMINT_NSHELL_SIMD * 15725 * sizeof(double));
172 abcd = 0;
173
174
175 for(i = istart; i < iend; ++i)
176 {
177 SIMINT_DBLTYPE bra_screen_max; // only used if check_screen
178
179 if(check_screen)
180 {
181 // Skip this whole thing if always insignificant
182 if((P.screen[i] * Q.screen_max) < screen_tol)
183 continue;
184 bra_screen_max = SIMINT_DBLSET1(P.screen[i]);
185 }
186
187 icd = 0;
188 iprimcd = 0;
189 nprim_icd = Q.nprim12[cd];
190 double * restrict PRIM_PTR_INT__h_s_h_s = INT__h_s_h_s + abcd * 441;
191 double * restrict PRIM_PTR_INT__h_s_i_s = INT__h_s_i_s + abcd * 588;
192 double * restrict PRIM_PTR_INT__h_s_k_s = INT__h_s_k_s + abcd * 756;
193 double * restrict PRIM_PTR_INT__h_s_l_s = INT__h_s_l_s + abcd * 945;
194 double * restrict PRIM_PTR_INT__h_s_m_s = INT__h_s_m_s + abcd * 1155;
195 double * restrict PRIM_PTR_INT__i_s_h_s = INT__i_s_h_s + abcd * 588;
196 double * restrict PRIM_PTR_INT__i_s_i_s = INT__i_s_i_s + abcd * 784;
197 double * restrict PRIM_PTR_INT__i_s_k_s = INT__i_s_k_s + abcd * 1008;
198 double * restrict PRIM_PTR_INT__i_s_l_s = INT__i_s_l_s + abcd * 1260;
199 double * restrict PRIM_PTR_INT__i_s_m_s = INT__i_s_m_s + abcd * 1540;
200 double * restrict PRIM_PTR_INT__k_s_h_s = INT__k_s_h_s + abcd * 756;
201 double * restrict PRIM_PTR_INT__k_s_i_s = INT__k_s_i_s + abcd * 1008;
202 double * restrict PRIM_PTR_INT__k_s_k_s = INT__k_s_k_s + abcd * 1296;
203 double * restrict PRIM_PTR_INT__k_s_l_s = INT__k_s_l_s + abcd * 1620;
204 double * restrict PRIM_PTR_INT__k_s_m_s = INT__k_s_m_s + abcd * 1980;
205
206
207
208 // Load these one per loop over i
209 const SIMINT_DBLTYPE P_alpha = SIMINT_DBLSET1(P.alpha[i]);
210 const SIMINT_DBLTYPE P_prefac = SIMINT_DBLSET1(P.prefac[i]);
211 const SIMINT_DBLTYPE Pxyz[3] = { SIMINT_DBLSET1(P.x[i]), SIMINT_DBLSET1(P.y[i]), SIMINT_DBLSET1(P.z[i]) };
212
213 const SIMINT_DBLTYPE P_PA[3] = { SIMINT_DBLSET1(P.PA_x[i]), SIMINT_DBLSET1(P.PA_y[i]), SIMINT_DBLSET1(P.PA_z[i]) };
214
215 for(j = jstart; j < jend; j += SIMINT_SIMD_LEN)
216 {
217 // calculate the shell offsets
218 // these are the offset from the shell pointed to by cd
219 // for each element
220 int shelloffsets[SIMINT_SIMD_LEN] = {0};
221 int lastoffset = 0;
222 const int nlane = ( ((j + SIMINT_SIMD_LEN) < jend) ? SIMINT_SIMD_LEN : (jend - j));
223
224 if((iprimcd + SIMINT_SIMD_LEN) >= nprim_icd)
225 {
226 // Handle if the first element of the vector is a new shell
227 if(iprimcd >= nprim_icd && ((icd+1) < nshellbatch))
228 {
229 nprim_icd += Q.nprim12[cd + (++icd)];
230 PRIM_PTR_INT__h_s_h_s += 441;
231 PRIM_PTR_INT__h_s_i_s += 588;
232 PRIM_PTR_INT__h_s_k_s += 756;
233 PRIM_PTR_INT__h_s_l_s += 945;
234 PRIM_PTR_INT__h_s_m_s += 1155;
235 PRIM_PTR_INT__i_s_h_s += 588;
236 PRIM_PTR_INT__i_s_i_s += 784;
237 PRIM_PTR_INT__i_s_k_s += 1008;
238 PRIM_PTR_INT__i_s_l_s += 1260;
239 PRIM_PTR_INT__i_s_m_s += 1540;
240 PRIM_PTR_INT__k_s_h_s += 756;
241 PRIM_PTR_INT__k_s_i_s += 1008;
242 PRIM_PTR_INT__k_s_k_s += 1296;
243 PRIM_PTR_INT__k_s_l_s += 1620;
244 PRIM_PTR_INT__k_s_m_s += 1980;
245 }
246 iprimcd++;
247 for(n = 1; n < SIMINT_SIMD_LEN; ++n)
248 {
249 if(iprimcd >= nprim_icd && ((icd+1) < nshellbatch))
250 {
251 shelloffsets[n] = shelloffsets[n-1] + 1;
252 lastoffset++;
253 nprim_icd += Q.nprim12[cd + (++icd)];
254 }
255 else
256 shelloffsets[n] = shelloffsets[n-1];
257 iprimcd++;
258 }
259 }
260 else
261 iprimcd += SIMINT_SIMD_LEN;
262
263 // Do we have to compute this vector (or has it been screened out)?
264 // (not_screened != 0 means we have to do this vector)
265 if(check_screen)
266 {
267 const double vmax = vector_max(SIMINT_MUL(bra_screen_max, SIMINT_DBLLOAD(Q.screen, j)));
268 if(vmax < screen_tol)
269 {
270 PRIM_PTR_INT__h_s_h_s += lastoffset*441;
271 PRIM_PTR_INT__h_s_i_s += lastoffset*588;
272 PRIM_PTR_INT__h_s_k_s += lastoffset*756;
273 PRIM_PTR_INT__h_s_l_s += lastoffset*945;
274 PRIM_PTR_INT__h_s_m_s += lastoffset*1155;
275 PRIM_PTR_INT__i_s_h_s += lastoffset*588;
276 PRIM_PTR_INT__i_s_i_s += lastoffset*784;
277 PRIM_PTR_INT__i_s_k_s += lastoffset*1008;
278 PRIM_PTR_INT__i_s_l_s += lastoffset*1260;
279 PRIM_PTR_INT__i_s_m_s += lastoffset*1540;
280 PRIM_PTR_INT__k_s_h_s += lastoffset*756;
281 PRIM_PTR_INT__k_s_i_s += lastoffset*1008;
282 PRIM_PTR_INT__k_s_k_s += lastoffset*1296;
283 PRIM_PTR_INT__k_s_l_s += lastoffset*1620;
284 PRIM_PTR_INT__k_s_m_s += lastoffset*1980;
285 continue;
286 }
287 }
288
289 const SIMINT_DBLTYPE Q_alpha = SIMINT_DBLLOAD(Q.alpha, j);
290 const SIMINT_DBLTYPE PQalpha_mul = SIMINT_MUL(P_alpha, Q_alpha);
291 const SIMINT_DBLTYPE PQalpha_sum = SIMINT_ADD(P_alpha, Q_alpha);
292 const SIMINT_DBLTYPE one_over_PQalpha_sum = SIMINT_DIV(const_1, PQalpha_sum);
293
294
295 /* construct R2 = (Px - Qx)**2 + (Py - Qy)**2 + (Pz -Qz)**2 */
296 SIMINT_DBLTYPE PQ[3];
297 PQ[0] = SIMINT_SUB(Pxyz[0], SIMINT_DBLLOAD(Q.x, j));
298 PQ[1] = SIMINT_SUB(Pxyz[1], SIMINT_DBLLOAD(Q.y, j));
299 PQ[2] = SIMINT_SUB(Pxyz[2], SIMINT_DBLLOAD(Q.z, j));
300 SIMINT_DBLTYPE R2 = SIMINT_MUL(PQ[0], PQ[0]);
301 R2 = SIMINT_FMADD(PQ[1], PQ[1], R2);
302 R2 = SIMINT_FMADD(PQ[2], PQ[2], R2);
303
304 const SIMINT_DBLTYPE alpha = SIMINT_MUL(PQalpha_mul, one_over_PQalpha_sum); // alpha from MEST
305 const SIMINT_DBLTYPE one_over_p = SIMINT_DIV(const_1, P_alpha);
306 const SIMINT_DBLTYPE one_over_q = SIMINT_DIV(const_1, Q_alpha);
307 const SIMINT_DBLTYPE one_over_2p = SIMINT_MUL(one_half, one_over_p);
308 const SIMINT_DBLTYPE one_over_2q = SIMINT_MUL(one_half, one_over_q);
309 const SIMINT_DBLTYPE one_over_2pq = SIMINT_MUL(one_half, one_over_PQalpha_sum);
310 const SIMINT_DBLTYPE Q_PA[3] = { SIMINT_DBLLOAD(Q.PA_x, j), SIMINT_DBLLOAD(Q.PA_y, j), SIMINT_DBLLOAD(Q.PA_z, j) };
311
312 // NOTE: Minus sign!
313 const SIMINT_DBLTYPE a_over_p = SIMINT_MUL(SIMINT_NEG(alpha), one_over_p);
314 SIMINT_DBLTYPE aop_PQ[3];
315 aop_PQ[0] = SIMINT_MUL(a_over_p, PQ[0]);
316 aop_PQ[1] = SIMINT_MUL(a_over_p, PQ[1]);
317 aop_PQ[2] = SIMINT_MUL(a_over_p, PQ[2]);
318
319 SIMINT_DBLTYPE a_over_q = SIMINT_MUL(alpha, one_over_q);
320 SIMINT_DBLTYPE aoq_PQ[3];
321 aoq_PQ[0] = SIMINT_MUL(a_over_q, PQ[0]);
322 aoq_PQ[1] = SIMINT_MUL(a_over_q, PQ[1]);
323 aoq_PQ[2] = SIMINT_MUL(a_over_q, PQ[2]);
324 // Put a minus sign here so we don't have to in RR routines
325 a_over_q = SIMINT_NEG(a_over_q);
326
327
328 //////////////////////////////////////////////
329 // Fjt function section
330 // Maximum v value: 16
331 //////////////////////////////////////////////
332 // The parameter to the Fjt function
333 const SIMINT_DBLTYPE F_x = SIMINT_MUL(R2, alpha);
334
335
336 const SIMINT_DBLTYPE Q_prefac = mask_load(nlane, Q.prefac + j);
337
338
339 boys_F_split(PRIM_INT__s_s_s_s, F_x, 16);
340 SIMINT_DBLTYPE prefac = SIMINT_SQRT(one_over_PQalpha_sum);
341 prefac = SIMINT_MUL(SIMINT_MUL(P_prefac, Q_prefac), prefac);
342 for(n = 0; n <= 16; n++)
343 PRIM_INT__s_s_s_s[n] = SIMINT_MUL(PRIM_INT__s_s_s_s[n], prefac);
344
345 //////////////////////////////////////////////
346 // Primitive integrals: Vertical recurrance
347 //////////////////////////////////////////////
348
349 const SIMINT_DBLTYPE vrr_const_1_over_2p = one_over_2p;
350 const SIMINT_DBLTYPE vrr_const_2_over_2p = SIMINT_MUL(const_2, one_over_2p);
351 const SIMINT_DBLTYPE vrr_const_3_over_2p = SIMINT_MUL(const_3, one_over_2p);
352 const SIMINT_DBLTYPE vrr_const_4_over_2p = SIMINT_MUL(const_4, one_over_2p);
353 const SIMINT_DBLTYPE vrr_const_5_over_2p = SIMINT_MUL(const_5, one_over_2p);
354 const SIMINT_DBLTYPE vrr_const_6_over_2p = SIMINT_MUL(const_6, one_over_2p);
355 const SIMINT_DBLTYPE vrr_const_1_over_2q = one_over_2q;
356 const SIMINT_DBLTYPE vrr_const_2_over_2q = SIMINT_MUL(const_2, one_over_2q);
357 const SIMINT_DBLTYPE vrr_const_3_over_2q = SIMINT_MUL(const_3, one_over_2q);
358 const SIMINT_DBLTYPE vrr_const_4_over_2q = SIMINT_MUL(const_4, one_over_2q);
359 const SIMINT_DBLTYPE vrr_const_5_over_2q = SIMINT_MUL(const_5, one_over_2q);
360 const SIMINT_DBLTYPE vrr_const_6_over_2q = SIMINT_MUL(const_6, one_over_2q);
361 const SIMINT_DBLTYPE vrr_const_7_over_2q = SIMINT_MUL(const_7, one_over_2q);
362 const SIMINT_DBLTYPE vrr_const_8_over_2q = SIMINT_MUL(const_8, one_over_2q);
363 const SIMINT_DBLTYPE vrr_const_1_over_2pq = one_over_2pq;
364 const SIMINT_DBLTYPE vrr_const_2_over_2pq = SIMINT_MUL(const_2, one_over_2pq);
365 const SIMINT_DBLTYPE vrr_const_3_over_2pq = SIMINT_MUL(const_3, one_over_2pq);
366 const SIMINT_DBLTYPE vrr_const_4_over_2pq = SIMINT_MUL(const_4, one_over_2pq);
367 const SIMINT_DBLTYPE vrr_const_5_over_2pq = SIMINT_MUL(const_5, one_over_2pq);
368 const SIMINT_DBLTYPE vrr_const_6_over_2pq = SIMINT_MUL(const_6, one_over_2pq);
369 const SIMINT_DBLTYPE vrr_const_7_over_2pq = SIMINT_MUL(const_7, one_over_2pq);
370 const SIMINT_DBLTYPE vrr_const_8_over_2pq = SIMINT_MUL(const_8, one_over_2pq);
371 const SIMINT_DBLTYPE vrr_const_9_over_2pq = SIMINT_MUL(const_9, one_over_2pq);
372
373
374
375 // Forming PRIM_INT__s_s_p_s[16 * 3];
376 for(n = 0; n < 16; ++n) // loop over orders of auxiliary function
377 {
378
379 PRIM_INT__s_s_p_s[n * 3 + 0] = SIMINT_MUL(Q_PA[0], PRIM_INT__s_s_s_s[n * 1 + 0]);
380 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]);
381
382 PRIM_INT__s_s_p_s[n * 3 + 1] = SIMINT_MUL(Q_PA[1], PRIM_INT__s_s_s_s[n * 1 + 0]);
383 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]);
384
385 PRIM_INT__s_s_p_s[n * 3 + 2] = SIMINT_MUL(Q_PA[2], PRIM_INT__s_s_s_s[n * 1 + 0]);
386 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]);
387
388 }
389
390
391
392 // Forming PRIM_INT__s_s_d_s[15 * 6];
393 for(n = 0; n < 15; ++n) // loop over orders of auxiliary function
394 {
395
396 PRIM_INT__s_s_d_s[n * 6 + 0] = SIMINT_MUL(Q_PA[0], PRIM_INT__s_s_p_s[n * 3 + 0]);
397 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]);
398 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]);
399
400 PRIM_INT__s_s_d_s[n * 6 + 1] = SIMINT_MUL(Q_PA[1], PRIM_INT__s_s_p_s[n * 3 + 0]);
401 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]);
402
403 PRIM_INT__s_s_d_s[n * 6 + 2] = SIMINT_MUL(Q_PA[2], PRIM_INT__s_s_p_s[n * 3 + 0]);
404 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]);
405
406 PRIM_INT__s_s_d_s[n * 6 + 3] = SIMINT_MUL(Q_PA[1], PRIM_INT__s_s_p_s[n * 3 + 1]);
407 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]);
408 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]);
409
410 PRIM_INT__s_s_d_s[n * 6 + 4] = SIMINT_MUL(Q_PA[2], PRIM_INT__s_s_p_s[n * 3 + 1]);
411 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]);
412
413 PRIM_INT__s_s_d_s[n * 6 + 5] = SIMINT_MUL(Q_PA[2], PRIM_INT__s_s_p_s[n * 3 + 2]);
414 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]);
415 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]);
416
417 }
418
419
420
421 // Forming PRIM_INT__s_s_f_s[14 * 10];
422 for(n = 0; n < 14; ++n) // loop over orders of auxiliary function
423 {
424
425 PRIM_INT__s_s_f_s[n * 10 + 0] = SIMINT_MUL(Q_PA[0], PRIM_INT__s_s_d_s[n * 6 + 0]);
426 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]);
427 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]);
428
429 PRIM_INT__s_s_f_s[n * 10 + 1] = SIMINT_MUL(Q_PA[1], PRIM_INT__s_s_d_s[n * 6 + 0]);
430 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]);
431
432 PRIM_INT__s_s_f_s[n * 10 + 2] = SIMINT_MUL(Q_PA[2], PRIM_INT__s_s_d_s[n * 6 + 0]);
433 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]);
434
435 PRIM_INT__s_s_f_s[n * 10 + 3] = SIMINT_MUL(Q_PA[0], PRIM_INT__s_s_d_s[n * 6 + 3]);
436 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]);
437
438 PRIM_INT__s_s_f_s[n * 10 + 4] = SIMINT_MUL(Q_PA[2], PRIM_INT__s_s_d_s[n * 6 + 1]);
439 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]);
440
441 PRIM_INT__s_s_f_s[n * 10 + 5] = SIMINT_MUL(Q_PA[0], PRIM_INT__s_s_d_s[n * 6 + 5]);
442 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]);
443
444 PRIM_INT__s_s_f_s[n * 10 + 6] = SIMINT_MUL(Q_PA[1], PRIM_INT__s_s_d_s[n * 6 + 3]);
445 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]);
446 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]);
447
448 PRIM_INT__s_s_f_s[n * 10 + 7] = SIMINT_MUL(Q_PA[2], PRIM_INT__s_s_d_s[n * 6 + 3]);
449 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]);
450
451 PRIM_INT__s_s_f_s[n * 10 + 8] = SIMINT_MUL(Q_PA[1], PRIM_INT__s_s_d_s[n * 6 + 5]);
452 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]);
453
454 PRIM_INT__s_s_f_s[n * 10 + 9] = SIMINT_MUL(Q_PA[2], PRIM_INT__s_s_d_s[n * 6 + 5]);
455 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]);
456 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]);
457
458 }
459
460
461 VRR_K_s_s_g_s(
462 PRIM_INT__s_s_g_s,
463 PRIM_INT__s_s_f_s,
464 PRIM_INT__s_s_d_s,
465 Q_PA,
466 a_over_q,
467 aoq_PQ,
468 one_over_2q,
469 13);
470
471
472 VRR_K_s_s_h_s(
473 PRIM_INT__s_s_h_s,
474 PRIM_INT__s_s_g_s,
475 PRIM_INT__s_s_f_s,
476 Q_PA,
477 a_over_q,
478 aoq_PQ,
479 one_over_2q,
480 12);
481
482
483 ostei_general_vrr_I(1, 0, 5, 0, 7,
484 one_over_2p, a_over_p, one_over_2pq, aop_PQ, P_PA,
485 PRIM_INT__s_s_h_s, NULL, NULL, PRIM_INT__s_s_g_s, NULL, PRIM_INT__p_s_h_s);
486
487
488 VRR_I_p_s_g_s(
489 PRIM_INT__p_s_g_s,
490 PRIM_INT__s_s_g_s,
491 PRIM_INT__s_s_f_s,
492 P_PA,
493 aop_PQ,
494 one_over_2pq,
495 7);
496
497
498 ostei_general_vrr_I(2, 0, 5, 0, 6,
499 one_over_2p, a_over_p, one_over_2pq, aop_PQ, P_PA,
500 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);
501
502
503 VRR_I_p_s_f_s(
504 PRIM_INT__p_s_f_s,
505 PRIM_INT__s_s_f_s,
506 PRIM_INT__s_s_d_s,
507 P_PA,
508 aop_PQ,
509 one_over_2pq,
510 7);
511
512
513 ostei_general_vrr_I(2, 0, 4, 0, 6,
514 one_over_2p, a_over_p, one_over_2pq, aop_PQ, P_PA,
515 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);
516
517
518 ostei_general_vrr_I(3, 0, 5, 0, 5,
519 one_over_2p, a_over_p, one_over_2pq, aop_PQ, P_PA,
520 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);
521
522
523
524 // Forming PRIM_INT__p_s_d_s[7 * 18];
525 for(n = 0; n < 7; ++n) // loop over orders of auxiliary function
526 {
527
528 PRIM_INT__p_s_d_s[n * 18 + 0] = SIMINT_MUL(P_PA[0], PRIM_INT__s_s_d_s[n * 6 + 0]);
529 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]);
530 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]);
531
532 PRIM_INT__p_s_d_s[n * 18 + 1] = SIMINT_MUL(P_PA[0], PRIM_INT__s_s_d_s[n * 6 + 1]);
533 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]);
534 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]);
535
536 PRIM_INT__p_s_d_s[n * 18 + 2] = SIMINT_MUL(P_PA[0], PRIM_INT__s_s_d_s[n * 6 + 2]);
537 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]);
538 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]);
539
540 PRIM_INT__p_s_d_s[n * 18 + 3] = SIMINT_MUL(P_PA[0], PRIM_INT__s_s_d_s[n * 6 + 3]);
541 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]);
542
543 PRIM_INT__p_s_d_s[n * 18 + 4] = SIMINT_MUL(P_PA[0], PRIM_INT__s_s_d_s[n * 6 + 4]);
544 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]);
545
546 PRIM_INT__p_s_d_s[n * 18 + 5] = SIMINT_MUL(P_PA[0], PRIM_INT__s_s_d_s[n * 6 + 5]);
547 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]);
548
549 PRIM_INT__p_s_d_s[n * 18 + 6] = SIMINT_MUL(P_PA[1], PRIM_INT__s_s_d_s[n * 6 + 0]);
550 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]);
551
552 PRIM_INT__p_s_d_s[n * 18 + 7] = SIMINT_MUL(P_PA[1], PRIM_INT__s_s_d_s[n * 6 + 1]);
553 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]);
554 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]);
555
556 PRIM_INT__p_s_d_s[n * 18 + 8] = SIMINT_MUL(P_PA[1], PRIM_INT__s_s_d_s[n * 6 + 2]);
557 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]);
558
559 PRIM_INT__p_s_d_s[n * 18 + 9] = SIMINT_MUL(P_PA[1], PRIM_INT__s_s_d_s[n * 6 + 3]);
560 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]);
561 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]);
562
563 PRIM_INT__p_s_d_s[n * 18 + 10] = SIMINT_MUL(P_PA[1], PRIM_INT__s_s_d_s[n * 6 + 4]);
564 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]);
565 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]);
566
567 PRIM_INT__p_s_d_s[n * 18 + 11] = SIMINT_MUL(P_PA[1], PRIM_INT__s_s_d_s[n * 6 + 5]);
568 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]);
569
570 PRIM_INT__p_s_d_s[n * 18 + 12] = SIMINT_MUL(P_PA[2], PRIM_INT__s_s_d_s[n * 6 + 0]);
571 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]);
572
573 PRIM_INT__p_s_d_s[n * 18 + 13] = SIMINT_MUL(P_PA[2], PRIM_INT__s_s_d_s[n * 6 + 1]);
574 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]);
575
576 PRIM_INT__p_s_d_s[n * 18 + 14] = SIMINT_MUL(P_PA[2], PRIM_INT__s_s_d_s[n * 6 + 2]);
577 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]);
578 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]);
579
580 PRIM_INT__p_s_d_s[n * 18 + 15] = SIMINT_MUL(P_PA[2], PRIM_INT__s_s_d_s[n * 6 + 3]);
581 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]);
582
583 PRIM_INT__p_s_d_s[n * 18 + 16] = SIMINT_MUL(P_PA[2], PRIM_INT__s_s_d_s[n * 6 + 4]);
584 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]);
585 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]);
586
587 PRIM_INT__p_s_d_s[n * 18 + 17] = SIMINT_MUL(P_PA[2], PRIM_INT__s_s_d_s[n * 6 + 5]);
588 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]);
589 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]);
590
591 }
592
593
594 VRR_I_d_s_f_s(
595 PRIM_INT__d_s_f_s,
596 PRIM_INT__p_s_f_s,
597 PRIM_INT__s_s_f_s,
598 PRIM_INT__p_s_d_s,
599 P_PA,
600 a_over_p,
601 aop_PQ,
602 one_over_2p,
603 one_over_2pq,
604 6);
605
606
607 ostei_general_vrr_I(3, 0, 4, 0, 5,
608 one_over_2p, a_over_p, one_over_2pq, aop_PQ, P_PA,
609 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);
610
611
612 ostei_general_vrr_I(4, 0, 5, 0, 4,
613 one_over_2p, a_over_p, one_over_2pq, aop_PQ, P_PA,
614 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);
615
616
617
618 // Forming PRIM_INT__p_s_p_s[7 * 9];
619 for(n = 0; n < 7; ++n) // loop over orders of auxiliary function
620 {
621
622 PRIM_INT__p_s_p_s[n * 9 + 0] = SIMINT_MUL(P_PA[0], PRIM_INT__s_s_p_s[n * 3 + 0]);
623 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]);
624 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]);
625
626 PRIM_INT__p_s_p_s[n * 9 + 1] = SIMINT_MUL(P_PA[0], PRIM_INT__s_s_p_s[n * 3 + 1]);
627 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]);
628
629 PRIM_INT__p_s_p_s[n * 9 + 2] = SIMINT_MUL(P_PA[0], PRIM_INT__s_s_p_s[n * 3 + 2]);
630 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]);
631
632 PRIM_INT__p_s_p_s[n * 9 + 3] = SIMINT_MUL(P_PA[1], PRIM_INT__s_s_p_s[n * 3 + 0]);
633 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]);
634
635 PRIM_INT__p_s_p_s[n * 9 + 4] = SIMINT_MUL(P_PA[1], PRIM_INT__s_s_p_s[n * 3 + 1]);
636 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]);
637 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]);
638
639 PRIM_INT__p_s_p_s[n * 9 + 5] = SIMINT_MUL(P_PA[1], PRIM_INT__s_s_p_s[n * 3 + 2]);
640 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]);
641
642 PRIM_INT__p_s_p_s[n * 9 + 6] = SIMINT_MUL(P_PA[2], PRIM_INT__s_s_p_s[n * 3 + 0]);
643 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]);
644
645 PRIM_INT__p_s_p_s[n * 9 + 7] = SIMINT_MUL(P_PA[2], PRIM_INT__s_s_p_s[n * 3 + 1]);
646 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]);
647
648 PRIM_INT__p_s_p_s[n * 9 + 8] = SIMINT_MUL(P_PA[2], PRIM_INT__s_s_p_s[n * 3 + 2]);
649 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]);
650 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]);
651
652 }
653
654
655 VRR_I_d_s_d_s(
656 PRIM_INT__d_s_d_s,
657 PRIM_INT__p_s_d_s,
658 PRIM_INT__s_s_d_s,
659 PRIM_INT__p_s_p_s,
660 P_PA,
661 a_over_p,
662 aop_PQ,
663 one_over_2p,
664 one_over_2pq,
665 6);
666
667
668 ostei_general_vrr_I(3, 0, 3, 0, 5,
669 one_over_2p, a_over_p, one_over_2pq, aop_PQ, P_PA,
670 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);
671
672
673 ostei_general_vrr_I(4, 0, 4, 0, 4,
674 one_over_2p, a_over_p, one_over_2pq, aop_PQ, P_PA,
675 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);
676
677
678 ostei_general_vrr_I(5, 0, 5, 0, 3,
679 one_over_2p, a_over_p, one_over_2pq, aop_PQ, P_PA,
680 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);
681
682
683 ostei_general_vrr1_K(6, 11,
684 one_over_2q, a_over_q, aoq_PQ, Q_PA,
685 PRIM_INT__s_s_h_s, PRIM_INT__s_s_g_s, PRIM_INT__s_s_i_s);
686
687
688 ostei_general_vrr_I(1, 0, 6, 0, 7,
689 one_over_2p, a_over_p, one_over_2pq, aop_PQ, P_PA,
690 PRIM_INT__s_s_i_s, NULL, NULL, PRIM_INT__s_s_h_s, NULL, PRIM_INT__p_s_i_s);
691
692
693 ostei_general_vrr_I(2, 0, 6, 0, 6,
694 one_over_2p, a_over_p, one_over_2pq, aop_PQ, P_PA,
695 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);
696
697
698 ostei_general_vrr_I(3, 0, 6, 0, 5,
699 one_over_2p, a_over_p, one_over_2pq, aop_PQ, P_PA,
700 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);
701
702
703 ostei_general_vrr_I(4, 0, 6, 0, 4,
704 one_over_2p, a_over_p, one_over_2pq, aop_PQ, P_PA,
705 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);
706
707
708 ostei_general_vrr_I(5, 0, 6, 0, 3,
709 one_over_2p, a_over_p, one_over_2pq, aop_PQ, P_PA,
710 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);
711
712
713
714 // Forming PRIM_INT__p_s_s_s[7 * 3];
715 for(n = 0; n < 7; ++n) // loop over orders of auxiliary function
716 {
717
718 PRIM_INT__p_s_s_s[n * 3 + 0] = SIMINT_MUL(P_PA[0], PRIM_INT__s_s_s_s[n * 1 + 0]);
719 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]);
720
721 PRIM_INT__p_s_s_s[n * 3 + 1] = SIMINT_MUL(P_PA[1], PRIM_INT__s_s_s_s[n * 1 + 0]);
722 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]);
723
724 PRIM_INT__p_s_s_s[n * 3 + 2] = SIMINT_MUL(P_PA[2], PRIM_INT__s_s_s_s[n * 1 + 0]);
725 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]);
726
727 }
728
729
730
731 // Forming PRIM_INT__d_s_p_s[6 * 18];
732 for(n = 0; n < 6; ++n) // loop over orders of auxiliary function
733 {
734
735 PRIM_INT__d_s_p_s[n * 18 + 0] = SIMINT_MUL(P_PA[0], PRIM_INT__p_s_p_s[n * 9 + 0]);
736 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]);
737 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]);
738 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]);
739
740 PRIM_INT__d_s_p_s[n * 18 + 1] = SIMINT_MUL(P_PA[0], PRIM_INT__p_s_p_s[n * 9 + 1]);
741 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]);
742 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]);
743
744 PRIM_INT__d_s_p_s[n * 18 + 2] = SIMINT_MUL(P_PA[0], PRIM_INT__p_s_p_s[n * 9 + 2]);
745 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]);
746 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]);
747
748 PRIM_INT__d_s_p_s[n * 18 + 9] = SIMINT_MUL(P_PA[1], PRIM_INT__p_s_p_s[n * 9 + 3]);
749 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]);
750 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]);
751
752 PRIM_INT__d_s_p_s[n * 18 + 10] = SIMINT_MUL(P_PA[1], PRIM_INT__p_s_p_s[n * 9 + 4]);
753 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]);
754 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]);
755 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]);
756
757 PRIM_INT__d_s_p_s[n * 18 + 11] = SIMINT_MUL(P_PA[1], PRIM_INT__p_s_p_s[n * 9 + 5]);
758 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]);
759 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]);
760
761 PRIM_INT__d_s_p_s[n * 18 + 15] = SIMINT_MUL(P_PA[2], PRIM_INT__p_s_p_s[n * 9 + 6]);
762 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]);
763 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]);
764
765 PRIM_INT__d_s_p_s[n * 18 + 16] = SIMINT_MUL(P_PA[2], PRIM_INT__p_s_p_s[n * 9 + 7]);
766 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]);
767 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]);
768
769 PRIM_INT__d_s_p_s[n * 18 + 17] = SIMINT_MUL(P_PA[2], PRIM_INT__p_s_p_s[n * 9 + 8]);
770 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]);
771 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]);
772 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]);
773
774 }
775
776
777 VRR_I_f_s_d_s(
778 PRIM_INT__f_s_d_s,
779 PRIM_INT__d_s_d_s,
780 PRIM_INT__p_s_d_s,
781 PRIM_INT__d_s_p_s,
782 P_PA,
783 a_over_p,
784 aop_PQ,
785 one_over_2p,
786 one_over_2pq,
787 5);
788
789
790 ostei_general_vrr_I(4, 0, 3, 0, 4,
791 one_over_2p, a_over_p, one_over_2pq, aop_PQ, P_PA,
792 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);
793
794
795 ostei_general_vrr_I(5, 0, 4, 0, 3,
796 one_over_2p, a_over_p, one_over_2pq, aop_PQ, P_PA,
797 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);
798
799
800 ostei_general_vrr_I(6, 0, 5, 0, 2,
801 one_over_2p, a_over_p, one_over_2pq, aop_PQ, P_PA,
802 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);
803
804
805 ostei_general_vrr1_K(7, 10,
806 one_over_2q, a_over_q, aoq_PQ, Q_PA,
807 PRIM_INT__s_s_i_s, PRIM_INT__s_s_h_s, PRIM_INT__s_s_k_s);
808
809
810 ostei_general_vrr_I(1, 0, 7, 0, 7,
811 one_over_2p, a_over_p, one_over_2pq, aop_PQ, P_PA,
812 PRIM_INT__s_s_k_s, NULL, NULL, PRIM_INT__s_s_i_s, NULL, PRIM_INT__p_s_k_s);
813
814
815 ostei_general_vrr_I(2, 0, 7, 0, 6,
816 one_over_2p, a_over_p, one_over_2pq, aop_PQ, P_PA,
817 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);
818
819
820 ostei_general_vrr_I(3, 0, 7, 0, 5,
821 one_over_2p, a_over_p, one_over_2pq, aop_PQ, P_PA,
822 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);
823
824
825 ostei_general_vrr_I(4, 0, 7, 0, 4,
826 one_over_2p, a_over_p, one_over_2pq, aop_PQ, P_PA,
827 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);
828
829
830 ostei_general_vrr_I(5, 0, 7, 0, 3,
831 one_over_2p, a_over_p, one_over_2pq, aop_PQ, P_PA,
832 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);
833
834
835 ostei_general_vrr_I(6, 0, 6, 0, 2,
836 one_over_2p, a_over_p, one_over_2pq, aop_PQ, P_PA,
837 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);
838
839
840
841 // Forming PRIM_INT__d_s_s_s[6 * 6];
842 for(n = 0; n < 6; ++n) // loop over orders of auxiliary function
843 {
844
845 PRIM_INT__d_s_s_s[n * 6 + 0] = SIMINT_MUL(P_PA[0], PRIM_INT__p_s_s_s[n * 3 + 0]);
846 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]);
847 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]);
848
849 PRIM_INT__d_s_s_s[n * 6 + 3] = SIMINT_MUL(P_PA[1], PRIM_INT__p_s_s_s[n * 3 + 1]);
850 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]);
851 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]);
852
853 PRIM_INT__d_s_s_s[n * 6 + 5] = SIMINT_MUL(P_PA[2], PRIM_INT__p_s_s_s[n * 3 + 2]);
854 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]);
855 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]);
856
857 }
858
859
860 VRR_I_f_s_p_s(
861 PRIM_INT__f_s_p_s,
862 PRIM_INT__d_s_p_s,
863 PRIM_INT__p_s_p_s,
864 PRIM_INT__d_s_s_s,
865 P_PA,
866 a_over_p,
867 aop_PQ,
868 one_over_2p,
869 one_over_2pq,
870 5);
871
872
873 ostei_general_vrr_I(4, 0, 2, 0, 4,
874 one_over_2p, a_over_p, one_over_2pq, aop_PQ, P_PA,
875 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);
876
877
878 ostei_general_vrr_I(5, 0, 3, 0, 3,
879 one_over_2p, a_over_p, one_over_2pq, aop_PQ, P_PA,
880 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);
881
882
883 ostei_general_vrr_I(6, 0, 4, 0, 2,
884 one_over_2p, a_over_p, one_over_2pq, aop_PQ, P_PA,
885 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);
886
887
888 ostei_general_vrr_I(7, 0, 5, 0, 1,
889 one_over_2p, a_over_p, one_over_2pq, aop_PQ, P_PA,
890 PRIM_INT__i_s_h_s, PRIM_INT__h_s_h_s, NULL, PRIM_INT__i_s_g_s, NULL, PRIM_INT__k_s_h_s);
891
892
893 ostei_general_vrr1_K(8, 9,
894 one_over_2q, a_over_q, aoq_PQ, Q_PA,
895 PRIM_INT__s_s_k_s, PRIM_INT__s_s_i_s, PRIM_INT__s_s_l_s);
896
897
898 ostei_general_vrr_I(1, 0, 8, 0, 7,
899 one_over_2p, a_over_p, one_over_2pq, aop_PQ, P_PA,
900 PRIM_INT__s_s_l_s, NULL, NULL, PRIM_INT__s_s_k_s, NULL, PRIM_INT__p_s_l_s);
901
902
903 ostei_general_vrr_I(2, 0, 8, 0, 6,
904 one_over_2p, a_over_p, one_over_2pq, aop_PQ, P_PA,
905 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);
906
907
908 ostei_general_vrr_I(3, 0, 8, 0, 5,
909 one_over_2p, a_over_p, one_over_2pq, aop_PQ, P_PA,
910 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);
911
912
913 ostei_general_vrr_I(4, 0, 8, 0, 4,
914 one_over_2p, a_over_p, one_over_2pq, aop_PQ, P_PA,
915 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);
916
917
918 ostei_general_vrr_I(5, 0, 8, 0, 3,
919 one_over_2p, a_over_p, one_over_2pq, aop_PQ, P_PA,
920 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);
921
922
923 ostei_general_vrr_I(6, 0, 7, 0, 2,
924 one_over_2p, a_over_p, one_over_2pq, aop_PQ, P_PA,
925 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);
926
927
928 ostei_general_vrr_I(7, 0, 6, 0, 1,
929 one_over_2p, a_over_p, one_over_2pq, aop_PQ, P_PA,
930 PRIM_INT__i_s_i_s, PRIM_INT__h_s_i_s, NULL, PRIM_INT__i_s_h_s, NULL, PRIM_INT__k_s_i_s);
931
932
933 ostei_general_vrr1_K(9, 8,
934 one_over_2q, a_over_q, aoq_PQ, Q_PA,
935 PRIM_INT__s_s_l_s, PRIM_INT__s_s_k_s, PRIM_INT__s_s_m_s);
936
937
938 ostei_general_vrr_I(1, 0, 9, 0, 7,
939 one_over_2p, a_over_p, one_over_2pq, aop_PQ, P_PA,
940 PRIM_INT__s_s_m_s, NULL, NULL, PRIM_INT__s_s_l_s, NULL, PRIM_INT__p_s_m_s);
941
942
943 ostei_general_vrr_I(2, 0, 9, 0, 6,
944 one_over_2p, a_over_p, one_over_2pq, aop_PQ, P_PA,
945 PRIM_INT__p_s_m_s, PRIM_INT__s_s_m_s, NULL, PRIM_INT__p_s_l_s, NULL, PRIM_INT__d_s_m_s);
946
947
948 ostei_general_vrr_I(3, 0, 9, 0, 5,
949 one_over_2p, a_over_p, one_over_2pq, aop_PQ, P_PA,
950 PRIM_INT__d_s_m_s, PRIM_INT__p_s_m_s, NULL, PRIM_INT__d_s_l_s, NULL, PRIM_INT__f_s_m_s);
951
952
953 ostei_general_vrr_I(4, 0, 9, 0, 4,
954 one_over_2p, a_over_p, one_over_2pq, aop_PQ, P_PA,
955 PRIM_INT__f_s_m_s, PRIM_INT__d_s_m_s, NULL, PRIM_INT__f_s_l_s, NULL, PRIM_INT__g_s_m_s);
956
957
958 ostei_general_vrr_I(5, 0, 9, 0, 3,
959 one_over_2p, a_over_p, one_over_2pq, aop_PQ, P_PA,
960 PRIM_INT__g_s_m_s, PRIM_INT__f_s_m_s, NULL, PRIM_INT__g_s_l_s, NULL, PRIM_INT__h_s_m_s);
961
962
963 ostei_general_vrr_I(6, 0, 8, 0, 2,
964 one_over_2p, a_over_p, one_over_2pq, aop_PQ, P_PA,
965 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);
966
967
968 ostei_general_vrr_I(7, 0, 7, 0, 1,
969 one_over_2p, a_over_p, one_over_2pq, aop_PQ, P_PA,
970 PRIM_INT__i_s_k_s, PRIM_INT__h_s_k_s, NULL, PRIM_INT__i_s_i_s, NULL, PRIM_INT__k_s_k_s);
971
972
973 ostei_general_vrr_I(6, 0, 9, 0, 2,
974 one_over_2p, a_over_p, one_over_2pq, aop_PQ, P_PA,
975 PRIM_INT__h_s_m_s, PRIM_INT__g_s_m_s, NULL, PRIM_INT__h_s_l_s, NULL, PRIM_INT__i_s_m_s);
976
977
978 ostei_general_vrr_I(7, 0, 8, 0, 1,
979 one_over_2p, a_over_p, one_over_2pq, aop_PQ, P_PA,
980 PRIM_INT__i_s_l_s, PRIM_INT__h_s_l_s, NULL, PRIM_INT__i_s_k_s, NULL, PRIM_INT__k_s_l_s);
981
982
983 ostei_general_vrr_I(7, 0, 9, 0, 1,
984 one_over_2p, a_over_p, one_over_2pq, aop_PQ, P_PA,
985 PRIM_INT__i_s_m_s, PRIM_INT__h_s_m_s, NULL, PRIM_INT__i_s_l_s, NULL, PRIM_INT__k_s_m_s);
986
987
988
989
990 ////////////////////////////////////
991 // Accumulate contracted integrals
992 ////////////////////////////////////
993 if(lastoffset == 0)
994 {
995 contract_all(441, PRIM_INT__h_s_h_s, PRIM_PTR_INT__h_s_h_s);
996 contract_all(588, PRIM_INT__h_s_i_s, PRIM_PTR_INT__h_s_i_s);
997 contract_all(756, PRIM_INT__h_s_k_s, PRIM_PTR_INT__h_s_k_s);
998 contract_all(945, PRIM_INT__h_s_l_s, PRIM_PTR_INT__h_s_l_s);
999 contract_all(1155, PRIM_INT__h_s_m_s, PRIM_PTR_INT__h_s_m_s);
1000 contract_all(588, PRIM_INT__i_s_h_s, PRIM_PTR_INT__i_s_h_s);
1001 contract_all(784, PRIM_INT__i_s_i_s, PRIM_PTR_INT__i_s_i_s);
1002 contract_all(1008, PRIM_INT__i_s_k_s, PRIM_PTR_INT__i_s_k_s);
1003 contract_all(1260, PRIM_INT__i_s_l_s, PRIM_PTR_INT__i_s_l_s);
1004 contract_all(1540, PRIM_INT__i_s_m_s, PRIM_PTR_INT__i_s_m_s);
1005 contract_all(756, PRIM_INT__k_s_h_s, PRIM_PTR_INT__k_s_h_s);
1006 contract_all(1008, PRIM_INT__k_s_i_s, PRIM_PTR_INT__k_s_i_s);
1007 contract_all(1296, PRIM_INT__k_s_k_s, PRIM_PTR_INT__k_s_k_s);
1008 contract_all(1620, PRIM_INT__k_s_l_s, PRIM_PTR_INT__k_s_l_s);
1009 contract_all(1980, PRIM_INT__k_s_m_s, PRIM_PTR_INT__k_s_m_s);
1010 }
1011 else
1012 {
1013 contract(441, shelloffsets, PRIM_INT__h_s_h_s, PRIM_PTR_INT__h_s_h_s);
1014 contract(588, shelloffsets, PRIM_INT__h_s_i_s, PRIM_PTR_INT__h_s_i_s);
1015 contract(756, shelloffsets, PRIM_INT__h_s_k_s, PRIM_PTR_INT__h_s_k_s);
1016 contract(945, shelloffsets, PRIM_INT__h_s_l_s, PRIM_PTR_INT__h_s_l_s);
1017 contract(1155, shelloffsets, PRIM_INT__h_s_m_s, PRIM_PTR_INT__h_s_m_s);
1018 contract(588, shelloffsets, PRIM_INT__i_s_h_s, PRIM_PTR_INT__i_s_h_s);
1019 contract(784, shelloffsets, PRIM_INT__i_s_i_s, PRIM_PTR_INT__i_s_i_s);
1020 contract(1008, shelloffsets, PRIM_INT__i_s_k_s, PRIM_PTR_INT__i_s_k_s);
1021 contract(1260, shelloffsets, PRIM_INT__i_s_l_s, PRIM_PTR_INT__i_s_l_s);
1022 contract(1540, shelloffsets, PRIM_INT__i_s_m_s, PRIM_PTR_INT__i_s_m_s);
1023 contract(756, shelloffsets, PRIM_INT__k_s_h_s, PRIM_PTR_INT__k_s_h_s);
1024 contract(1008, shelloffsets, PRIM_INT__k_s_i_s, PRIM_PTR_INT__k_s_i_s);
1025 contract(1296, shelloffsets, PRIM_INT__k_s_k_s, PRIM_PTR_INT__k_s_k_s);
1026 contract(1620, shelloffsets, PRIM_INT__k_s_l_s, PRIM_PTR_INT__k_s_l_s);
1027 contract(1980, shelloffsets, PRIM_INT__k_s_m_s, PRIM_PTR_INT__k_s_m_s);
1028 PRIM_PTR_INT__h_s_h_s += lastoffset*441;
1029 PRIM_PTR_INT__h_s_i_s += lastoffset*588;
1030 PRIM_PTR_INT__h_s_k_s += lastoffset*756;
1031 PRIM_PTR_INT__h_s_l_s += lastoffset*945;
1032 PRIM_PTR_INT__h_s_m_s += lastoffset*1155;
1033 PRIM_PTR_INT__i_s_h_s += lastoffset*588;
1034 PRIM_PTR_INT__i_s_i_s += lastoffset*784;
1035 PRIM_PTR_INT__i_s_k_s += lastoffset*1008;
1036 PRIM_PTR_INT__i_s_l_s += lastoffset*1260;
1037 PRIM_PTR_INT__i_s_m_s += lastoffset*1540;
1038 PRIM_PTR_INT__k_s_h_s += lastoffset*756;
1039 PRIM_PTR_INT__k_s_i_s += lastoffset*1008;
1040 PRIM_PTR_INT__k_s_k_s += lastoffset*1296;
1041 PRIM_PTR_INT__k_s_l_s += lastoffset*1620;
1042 PRIM_PTR_INT__k_s_m_s += lastoffset*1980;
1043 }
1044
1045 } // close loop over j
1046 } // close loop over i
1047
1048 //Advance to the next batch
1049 jstart = SIMINT_SIMD_ROUND(jend);
1050
1051 //////////////////////////////////////////////
1052 // Contracted integrals: Horizontal recurrance
1053 //////////////////////////////////////////////
1054
1055
1056 const double hAB[3] = { P.AB_x[ab], P.AB_y[ab], P.AB_z[ab] };
1057
1058
1059 for(abcd = 0; abcd < nshellbatch; ++abcd, ++real_abcd)
1060 {
1061 const double hCD[3] = { Q.AB_x[cd+abcd], Q.AB_y[cd+abcd], Q.AB_z[cd+abcd] };
1062
1063 // set up HRR pointers
1064 double const * restrict HRR_INT__h_s_h_s = INT__h_s_h_s + abcd * 441;
1065 double const * restrict HRR_INT__h_s_i_s = INT__h_s_i_s + abcd * 588;
1066 double const * restrict HRR_INT__h_s_k_s = INT__h_s_k_s + abcd * 756;
1067 double const * restrict HRR_INT__h_s_l_s = INT__h_s_l_s + abcd * 945;
1068 double const * restrict HRR_INT__h_s_m_s = INT__h_s_m_s + abcd * 1155;
1069 double const * restrict HRR_INT__i_s_h_s = INT__i_s_h_s + abcd * 588;
1070 double const * restrict HRR_INT__i_s_i_s = INT__i_s_i_s + abcd * 784;
1071 double const * restrict HRR_INT__i_s_k_s = INT__i_s_k_s + abcd * 1008;
1072 double const * restrict HRR_INT__i_s_l_s = INT__i_s_l_s + abcd * 1260;
1073 double const * restrict HRR_INT__i_s_m_s = INT__i_s_m_s + abcd * 1540;
1074 double const * restrict HRR_INT__k_s_h_s = INT__k_s_h_s + abcd * 756;
1075 double const * restrict HRR_INT__k_s_i_s = INT__k_s_i_s + abcd * 1008;
1076 double const * restrict HRR_INT__k_s_k_s = INT__k_s_k_s + abcd * 1296;
1077 double const * restrict HRR_INT__k_s_l_s = INT__k_s_l_s + abcd * 1620;
1078 double const * restrict HRR_INT__k_s_m_s = INT__k_s_m_s + abcd * 1980;
1079 double * restrict HRR_INT__h_d_h_g = INT__h_d_h_g + real_abcd * 39690;
1080
1081 // form INT__h_p_h_s
1082 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);
1083
1084 // form INT__h_p_i_s
1085 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);
1086
1087 // form INT__h_p_k_s
1088 ostei_general_hrr_J(5, 1, 7, 0, hAB, HRR_INT__i_s_k_s, HRR_INT__h_s_k_s, HRR_INT__h_p_k_s);
1089
1090 // form INT__h_p_l_s
1091 ostei_general_hrr_J(5, 1, 8, 0, hAB, HRR_INT__i_s_l_s, HRR_INT__h_s_l_s, HRR_INT__h_p_l_s);
1092
1093 // form INT__h_p_m_s
1094 ostei_general_hrr_J(5, 1, 9, 0, hAB, HRR_INT__i_s_m_s, HRR_INT__h_s_m_s, HRR_INT__h_p_m_s);
1095
1096 // form INT__i_p_h_s
1097 ostei_general_hrr_J(6, 1, 5, 0, hAB, HRR_INT__k_s_h_s, HRR_INT__i_s_h_s, HRR_INT__i_p_h_s);
1098
1099 // form INT__i_p_i_s
1100 ostei_general_hrr_J(6, 1, 6, 0, hAB, HRR_INT__k_s_i_s, HRR_INT__i_s_i_s, HRR_INT__i_p_i_s);
1101
1102 // form INT__i_p_k_s
1103 ostei_general_hrr_J(6, 1, 7, 0, hAB, HRR_INT__k_s_k_s, HRR_INT__i_s_k_s, HRR_INT__i_p_k_s);
1104
1105 // form INT__i_p_l_s
1106 ostei_general_hrr_J(6, 1, 8, 0, hAB, HRR_INT__k_s_l_s, HRR_INT__i_s_l_s, HRR_INT__i_p_l_s);
1107
1108 // form INT__i_p_m_s
1109 ostei_general_hrr_J(6, 1, 9, 0, hAB, HRR_INT__k_s_m_s, HRR_INT__i_s_m_s, HRR_INT__i_p_m_s);
1110
1111 // form INT__h_d_h_s
1112 ostei_general_hrr_J(5, 2, 5, 0, hAB, HRR_INT__i_p_h_s, HRR_INT__h_p_h_s, HRR_INT__h_d_h_s);
1113
1114 // form INT__h_d_i_s
1115 ostei_general_hrr_J(5, 2, 6, 0, hAB, HRR_INT__i_p_i_s, HRR_INT__h_p_i_s, HRR_INT__h_d_i_s);
1116
1117 // form INT__h_d_k_s
1118 ostei_general_hrr_J(5, 2, 7, 0, hAB, HRR_INT__i_p_k_s, HRR_INT__h_p_k_s, HRR_INT__h_d_k_s);
1119
1120 // form INT__h_d_l_s
1121 ostei_general_hrr_J(5, 2, 8, 0, hAB, HRR_INT__i_p_l_s, HRR_INT__h_p_l_s, HRR_INT__h_d_l_s);
1122
1123 // form INT__h_d_m_s
1124 ostei_general_hrr_J(5, 2, 9, 0, hAB, HRR_INT__i_p_m_s, HRR_INT__h_p_m_s, HRR_INT__h_d_m_s);
1125
1126 // form INT__h_d_h_p
1127 ostei_general_hrr_L(5, 2, 5, 1, hCD, HRR_INT__h_d_i_s, HRR_INT__h_d_h_s, HRR_INT__h_d_h_p);
1128
1129 // form INT__h_d_i_p
1130 ostei_general_hrr_L(5, 2, 6, 1, hCD, HRR_INT__h_d_k_s, HRR_INT__h_d_i_s, HRR_INT__h_d_i_p);
1131
1132 // form INT__h_d_k_p
1133 ostei_general_hrr_L(5, 2, 7, 1, hCD, HRR_INT__h_d_l_s, HRR_INT__h_d_k_s, HRR_INT__h_d_k_p);
1134
1135 // form INT__h_d_l_p
1136 ostei_general_hrr_L(5, 2, 8, 1, hCD, HRR_INT__h_d_m_s, HRR_INT__h_d_l_s, HRR_INT__h_d_l_p);
1137
1138 // form INT__h_d_h_d
1139 ostei_general_hrr_L(5, 2, 5, 2, hCD, HRR_INT__h_d_i_p, HRR_INT__h_d_h_p, HRR_INT__h_d_h_d);
1140
1141 // form INT__h_d_i_d
1142 ostei_general_hrr_L(5, 2, 6, 2, hCD, HRR_INT__h_d_k_p, HRR_INT__h_d_i_p, HRR_INT__h_d_i_d);
1143
1144 // form INT__h_d_k_d
1145 ostei_general_hrr_L(5, 2, 7, 2, hCD, HRR_INT__h_d_l_p, HRR_INT__h_d_k_p, HRR_INT__h_d_k_d);
1146
1147 // form INT__h_d_h_f
1148 ostei_general_hrr_L(5, 2, 5, 3, hCD, HRR_INT__h_d_i_d, HRR_INT__h_d_h_d, HRR_INT__h_d_h_f);
1149
1150 // form INT__h_d_i_f
1151 ostei_general_hrr_L(5, 2, 6, 3, hCD, HRR_INT__h_d_k_d, HRR_INT__h_d_i_d, HRR_INT__h_d_i_f);
1152
1153 // form INT__h_d_h_g
1154 ostei_general_hrr_L(5, 2, 5, 4, hCD, HRR_INT__h_d_i_f, HRR_INT__h_d_h_f, HRR_INT__h_d_h_g);
1155
1156
1157 } // close HRR loop
1158
1159
1160 } // close loop cdbatch
1161
1162 istart = iend;
1163 } // close loop over ab
1164
1165 return P.nshell12_clip * Q.nshell12_clip;
1166 }
1167
ostei_d_h_h_g(struct simint_multi_shellpair const P,struct simint_multi_shellpair const Q,double screen_tol,double * const restrict work,double * const restrict INT__d_h_h_g)1168 int ostei_d_h_h_g(struct simint_multi_shellpair const P,
1169 struct simint_multi_shellpair const Q,
1170 double screen_tol,
1171 double * const restrict work,
1172 double * const restrict INT__d_h_h_g)
1173 {
1174 double P_AB[3*P.nshell12];
1175 struct simint_multi_shellpair P_tmp = P;
1176 P_tmp.PA_x = P.PB_x; P_tmp.PA_y = P.PB_y; P_tmp.PA_z = P.PB_z;
1177 P_tmp.PB_x = P.PA_x; P_tmp.PB_y = P.PA_y; P_tmp.PB_z = P.PA_z;
1178 P_tmp.AB_x = P_AB;
1179 P_tmp.AB_y = P_AB + P.nshell12;
1180 P_tmp.AB_z = P_AB + 2*P.nshell12;
1181
1182 for(int i = 0; i < P.nshell12; i++)
1183 {
1184 P_tmp.AB_x[i] = -P.AB_x[i];
1185 P_tmp.AB_y[i] = -P.AB_y[i];
1186 P_tmp.AB_z[i] = -P.AB_z[i];
1187 }
1188
1189 int ret = ostei_h_d_h_g(P_tmp, Q, screen_tol, work, INT__d_h_h_g);
1190 double buffer[39690] SIMINT_ALIGN_ARRAY_DBL;
1191
1192 for(int q = 0; q < ret; q++)
1193 {
1194 int idx = 0;
1195 for(int a = 0; a < 6; ++a)
1196 for(int b = 0; b < 21; ++b)
1197 for(int c = 0; c < 21; ++c)
1198 for(int d = 0; d < 15; ++d)
1199 buffer[idx++] = INT__d_h_h_g[q*39690+b*1890+a*315+c*15+d];
1200
1201 memcpy(INT__d_h_h_g+q*39690, buffer, 39690*sizeof(double));
1202 }
1203
1204 return ret;
1205 }
1206
ostei_h_d_g_h(struct simint_multi_shellpair const P,struct simint_multi_shellpair const Q,double screen_tol,double * const restrict work,double * const restrict INT__h_d_g_h)1207 int ostei_h_d_g_h(struct simint_multi_shellpair const P,
1208 struct simint_multi_shellpair const Q,
1209 double screen_tol,
1210 double * const restrict work,
1211 double * const restrict INT__h_d_g_h)
1212 {
1213 double Q_AB[3*Q.nshell12];
1214 struct simint_multi_shellpair Q_tmp = Q;
1215 Q_tmp.PA_x = Q.PB_x; Q_tmp.PA_y = Q.PB_y; Q_tmp.PA_z = Q.PB_z;
1216 Q_tmp.PB_x = Q.PA_x; Q_tmp.PB_y = Q.PA_y; Q_tmp.PB_z = Q.PA_z;
1217 Q_tmp.AB_x = Q_AB;
1218 Q_tmp.AB_y = Q_AB + Q.nshell12;
1219 Q_tmp.AB_z = Q_AB + 2*Q.nshell12;
1220
1221 for(int i = 0; i < Q.nshell12; i++)
1222 {
1223 Q_tmp.AB_x[i] = -Q.AB_x[i];
1224 Q_tmp.AB_y[i] = -Q.AB_y[i];
1225 Q_tmp.AB_z[i] = -Q.AB_z[i];
1226 }
1227
1228 int ret = ostei_h_d_h_g(P, Q_tmp, screen_tol, work, INT__h_d_g_h);
1229 double buffer[39690] SIMINT_ALIGN_ARRAY_DBL;
1230
1231 for(int q = 0; q < ret; q++)
1232 {
1233 int idx = 0;
1234 for(int a = 0; a < 21; ++a)
1235 for(int b = 0; b < 6; ++b)
1236 for(int c = 0; c < 15; ++c)
1237 for(int d = 0; d < 21; ++d)
1238 buffer[idx++] = INT__h_d_g_h[q*39690+a*1890+b*315+d*15+c];
1239
1240 memcpy(INT__h_d_g_h+q*39690, buffer, 39690*sizeof(double));
1241 }
1242
1243 return ret;
1244 }
1245
ostei_d_h_g_h(struct simint_multi_shellpair const P,struct simint_multi_shellpair const Q,double screen_tol,double * const restrict work,double * const restrict INT__d_h_g_h)1246 int ostei_d_h_g_h(struct simint_multi_shellpair const P,
1247 struct simint_multi_shellpair const Q,
1248 double screen_tol,
1249 double * const restrict work,
1250 double * const restrict INT__d_h_g_h)
1251 {
1252 double P_AB[3*P.nshell12];
1253 struct simint_multi_shellpair P_tmp = P;
1254 P_tmp.PA_x = P.PB_x; P_tmp.PA_y = P.PB_y; P_tmp.PA_z = P.PB_z;
1255 P_tmp.PB_x = P.PA_x; P_tmp.PB_y = P.PA_y; P_tmp.PB_z = P.PA_z;
1256 P_tmp.AB_x = P_AB;
1257 P_tmp.AB_y = P_AB + P.nshell12;
1258 P_tmp.AB_z = P_AB + 2*P.nshell12;
1259
1260 for(int i = 0; i < P.nshell12; i++)
1261 {
1262 P_tmp.AB_x[i] = -P.AB_x[i];
1263 P_tmp.AB_y[i] = -P.AB_y[i];
1264 P_tmp.AB_z[i] = -P.AB_z[i];
1265 }
1266
1267 double Q_AB[3*Q.nshell12];
1268 struct simint_multi_shellpair Q_tmp = Q;
1269 Q_tmp.PA_x = Q.PB_x; Q_tmp.PA_y = Q.PB_y; Q_tmp.PA_z = Q.PB_z;
1270 Q_tmp.PB_x = Q.PA_x; Q_tmp.PB_y = Q.PA_y; Q_tmp.PB_z = Q.PA_z;
1271 Q_tmp.AB_x = Q_AB;
1272 Q_tmp.AB_y = Q_AB + Q.nshell12;
1273 Q_tmp.AB_z = Q_AB + 2*Q.nshell12;
1274
1275 for(int i = 0; i < Q.nshell12; i++)
1276 {
1277 Q_tmp.AB_x[i] = -Q.AB_x[i];
1278 Q_tmp.AB_y[i] = -Q.AB_y[i];
1279 Q_tmp.AB_z[i] = -Q.AB_z[i];
1280 }
1281
1282 int ret = ostei_h_d_h_g(P_tmp, Q_tmp, screen_tol, work, INT__d_h_g_h);
1283 double buffer[39690] SIMINT_ALIGN_ARRAY_DBL;
1284
1285 for(int q = 0; q < ret; q++)
1286 {
1287 int idx = 0;
1288 for(int a = 0; a < 6; ++a)
1289 for(int b = 0; b < 21; ++b)
1290 for(int c = 0; c < 15; ++c)
1291 for(int d = 0; d < 21; ++d)
1292 buffer[idx++] = INT__d_h_g_h[q*39690+b*1890+a*315+d*15+c];
1293
1294 memcpy(INT__d_h_g_h+q*39690, buffer, 39690*sizeof(double));
1295 }
1296
1297 return ret;
1298 }
1299
1300