72 cfftmf_(
lot, 1, n, strid, data, strid*n, wsave,
lensav(
n),
work.get(), 2*
lot*
n,
ier);
75 cosqmb_(2*
lot, 1,
n, 2*strid, (
double*)data, 2*strid*
n, wsave,
lensav(
n),
work.get(), 2*
lot*
n,
ier);
77 for (
int i = 0,
N = strid*
n; i <
N; i += strid)
78 for (
int j = 0; j <
lot; ++j)
82 costmf_(2*
lot, 1,
n, 2*strid, (
double*)data, 2*strid*
n, wsave,
lensav(
n),
work.get(), 2*
lot*(
n+1),
ier);
83 for (
int i =
lot, end =
n*
lot; i < end; ++i) *(data+i) *= 0.5;
86 sinqmb_(2*
lot, 1,
n, 2*strid, (
double*)data, 2*strid*
n, wsave,
lensav(
n),
work.get(), 2*
lot*
n,
ier);
88 for (
int i = 0,
N = strid*
n; i <
N; i += strid)
89 for (
int j = 0; j <
lot; ++j)
93 sintmf_(2*
lot, 1,
n, 2*strid, (
double*)data, 2*strid*
n, wsave,
lensav(
n),
work.get(), 2*
lot*(2*
n+4),
ier);
94 for (
int i =
lot, end =
n*
lot; i < end; ++i) *(data+i) *= 0.5;
97 }
catch (
const std::string&
msg) {
190 n1(old.n1), n2(old.n2),
191 strid1(old.strid1), strid2(old.strid2),
192 symmetry1(old.symmetry1), symmetry2(old.symmetry2),
193 wsave1(old.wsave1), wsave2(old.wsave2) {
194 old.wsave1 =
nullptr;
if (old.wsave2 != old.wsave1) old.wsave2 =
nullptr;
247 if (
lot == 0)
lot = strid1;
256 for (
int i = 0; i != n2; ++i)
257 cfftmf_(
lot, 1, n1, strid1, data+strid2*i, strid2, wsave1,
lensav(n1),
work.get(), 2*
lot*n1,
ier);
260 for (
int i = 0; i != n2; ++i) {
261 cosqmb_(2*
lot, 1, n1, 2*strid1, (
double*)data+2*strid2*i, 2*strid2, wsave1,
lensav(n1),
work.get(), 2*
lot*n1,
ier);
262 for (
int j = 0, dist = strid2*i, end = strid1*n1; j < end; j += strid1)
263 for (
int l = 0; l <
lot; ++l)
268 for (
int i = 0; i != n2; ++i) {
269 costmf_(2*
lot, 1, n1, 2*strid1, (
double*)data+2*strid2*i, 2*strid2, wsave1,
lensav(n1),
work.get(), 2*
lot*(n1+1),
ier);
270 for (
int j = strid1, dist = strid2*i, end = strid1*n1; j < end; j += strid1)
271 for (
int l = 0; l <
lot; ++l)
272 data[dist+j+l] *= 0.5;
276 for (
int i = 0; i != n2; ++i) {
277 sinqmb_(2*
lot, 1, n1, 2*strid1, (
double*)data+2*strid2*i, 2*strid2, wsave1,
lensav(n1),
work.get(), 2*
lot*n1,
ier);
278 for (
int j = 0, dist = strid2*i, end = strid1*n1; j < end; j += strid1)
279 for (
int l = 0; l <
lot; ++l)
284 for (
int i = 0; i != n2; ++i) {
285 sintmf_(2*
lot, 1, n1, 2*strid1, (
double*)data+2*strid2*i, 2*strid2, wsave1,
lensav(n1),
work.get(), 2*
lot*(2*n1+4),
ier);
286 for (
int j = strid1, dist = strid2*i, end = strid1*n1; j < end; j += strid1)
287 for (
int l = 0; l <
lot; ++l)
288 data[dist+j+l] *= 0.5;
295 for (
int i = 0; i != n1; ++i)
296 cfftmf_(
lot, 1, n2, strid2, data+strid1*i, strid1+strid2*(n2-1), wsave2,
lensav(n2),
work.get(), 2*
lot*n2,
ier);
299 for (
int i = 0; i != n1; ++i) {
300 cosqmb_(2*
lot, 1, n2, 2*strid2, (
double*)data+2*strid1*i, 2*(strid1+strid2*(n2-1)), wsave2,
lensav(n2),
work.get(), 2*
lot*n2,
ier);
301 for (
int j = 0, dist = strid1*i, end = n2*strid2; j < end; j += strid2)
302 for (
int l = 0; l <
lot; ++l)
307 for (
int i = 0; i != n1; ++i) {
308 costmf_(2*
lot, 1, n2, 2*strid2, (
double*)data+2*strid1*i, 2*(strid1+strid2*(n2-1)), wsave2,
lensav(n2),
work.get(), 2*
lot*(n2+1),
ier);
309 for (
int j = strid2, dist = strid1*i, end = strid2*n2; j < end; j += strid2)
310 for (
int l = 0; l <
lot; ++l)
311 data[dist+j+l] *= 0.5;
315 for (
int i = 0; i != n1; ++i) {
316 sinqmb_(2*
lot, 1, n2, 2*strid2, (
double*)data+2*strid1*i, 2*(strid1+strid2*(n2-1)), wsave2,
lensav(n2),
work.get(), 2*
lot*n2,
ier);
317 for (
int j = 0, dist = strid1*i, end = n2*strid2; j < end; j += strid2)
318 for (
int l = 0; l <
lot; ++l)
323 for (
int i = 0; i != n1; ++i) {
324 sintmf_(2*
lot, 1, n2, 2*strid2, (
double*)data+2*strid1*i, 2*(strid1+strid2*(n2-1)), wsave2,
lensav(n2),
work.get(), 2*
lot*(2*n2+4),
ier);
325 for (
int j = strid2, dist = strid1*i, end = strid2*n2; j < end; j += strid2)
326 for (
int l = 0; l <
lot; ++l)
327 data[dist+j+l] *= 0.5;
331 }
catch (
const std::string&
msg) {
346 n1(old.n1), n2(old.n2),
347 strid1(old.strid1), strid2(old.strid2),
348 symmetry1(old.symmetry1), symmetry2(old.symmetry2),
349 wsave1(old.wsave1), wsave2(old.wsave2) {
350 old.wsave1 =
nullptr;
if (old.wsave2 != old.wsave1) old.wsave2 =
nullptr;
403 if (
lot == 0)
lot = strid1;
412 for (
int i = 0; i != n2; ++i)
413 cfftmb_(
lot, 1, n1, strid1, data+strid2*i, strid2, wsave1,
lensav(n1),
work.get(), 2*
lot*n1,
ier);
416 for (
int i = 0; i != n2; ++i) {
417 cosqmf_(2*
lot, 1, n1, 2*strid1, (
double*)data+2*strid2*i, 2*strid2, wsave1,
lensav(n1),
work.get(), 2*
lot*n1,
ier);
418 for (
int j = 0, dist = strid2*i, end = strid1*n1; j < end; j += strid1)
419 for (
int l = 0; l <
lot; ++l)
424 for (
int i = 0; i != n2; ++i) {
425 sinqmf_(2*
lot, 1, n1, 2*strid1, (
double*)data+2*strid2*i, 2*strid2, wsave1,
lensav(n1),
work.get(), 2*
lot*n1,
ier);
426 for (
int j = 0, dist = strid2*i, end = strid1*n1; j < end; j += strid1)
427 for (
int l = 0; l <
lot; ++l)
432 for (
int i = 0; i != n2; ++i) {
433 for (
int j = strid1, dist = strid2*i, end = strid1*n1; j < end; j += strid1)
434 for (
int l = 0; l <
lot; ++l)
435 data[j+l+dist] *= 2.;
436 costmb_(2*
lot, 1, n1, 2*strid1, (
double*)data+2*strid2*i, 2*strid2, wsave1,
lensav(n1),
work.get(), 2*
lot*(n1+1),
ier);
440 for (
int i = 0; i != n2; ++i) {
441 for (
int j = strid1, dist = strid2*i, end = strid1*n1; j < end; j += strid1)
442 for (
int l = 0; l <
lot; ++l)
443 data[j+l+dist] *= 2.;
444 sintmb_(2*
lot, 1, n1, 2*strid1, (
double*)data+2*strid2*i, 2*strid2, wsave1,
lensav(n1),
work.get(), 2*
lot*(2*n1+4),
ier);
451 for (
int i = 0; i != n1; ++i)
452 cfftmb_(
lot, 1, n2, strid2, data+strid1*i, strid1+strid2*(n2-1), wsave2,
lensav(n2),
work.get(), 2*
lot*n2,
ier);
455 for (
int i = 0; i != n1; ++i) {
456 cosqmf_(2*
lot, 1, n2, 2*strid2, (
double*)data+2*strid1*i, 2*(strid1+strid2*(n2-1)), wsave2,
lensav(n2),
work.get(), 2*
lot*n2,
ier);
457 for (
int j = 0, dist = strid1*i,
N = n2*strid2; j <
N; j += strid2)
458 for (
int l = 0; l <
lot; ++l)
463 for (
int i = 0; i != n1; ++i) {
464 sinqmf_(2*
lot, 1, n2, 2*strid2, (
double*)data+2*strid1*i, 2*(strid1+strid2*(n2-1)), wsave2,
lensav(n2),
work.get(), 2*
lot*n2,
ier);
465 for (
int j = 0, dist = strid1*i,
N = n2*strid2; j <
N; j += strid2)
466 for (
int l = 0; l <
lot; ++l)
471 for (
int i = 0; i != n1; ++i) {
472 for (
int j = strid2, dist = strid1*i, end = n2*strid2; j < end; j += strid2)
473 for (
int l = 0; l <
lot; ++l)
474 data[dist+j+l] *= 2.;
475 costmb_(2*
lot, 1, n2, 2*strid2, (
double*)data+2*strid1*i, 2*(strid1+strid2*(n2-1)), wsave2,
lensav(n2),
work.get(), 2*
lot*(n2+1),
ier);
479 for (
int i = 0; i != n1; ++i) {
480 for (
int j = strid2, dist = strid1*i, end = n2*strid2; j < end; j += strid2)
481 for (
int l = 0; l <
lot; ++l)
482 data[dist+j+l] *= 2.;
483 sintmb_(2*
lot, 1, n2, 2*strid2, (
double*)data+2*strid1*i, 2*(strid1+strid2*(n2-1)), wsave2,
lensav(n2),
work.get(), 2*
lot*(2*n2+4),
ier);
487 }
catch (
const std::string&
msg) {