305 integer size = nout*pa+nin*(pb+1);
307 if (C != NULL && pa > 0) {
315 gpc_mcopy_t(size, nout, nout*pa, source, ndimA, dest);
319 source = Theta+nout*pa+nin*(pb+1);
322 source, ndimB, dest);
330 gpc_mcopy_t(size, nout, nin*pb, source, ndimB, dest);
334 source = Theta+nout*pa;
335 dest = P+nout*(s-1)+ndimP*(nin*(s-1));
348 for (
integer i = s-1; i > 0; i--) {
352 for (
integer j = 1; j <= pa-1; j++) {
357 A+nout*(i-1)+ndimA*(nout*(j-1));
361 A+nout*(s-1)+ndimA*(nout*(j-1));
367 ndimA, nout, nout, m2,
368 ndimA, nout, nout, m3,
369 ndimA, nout, nout, dest);
376 doublereal* dest = A+nout*(i-1)+ndimA*(nout*(pa-1));
379 doublereal* m2 = A+nout*(s-1)+ndimA*(nout*(pa-1));
382 ndimA, nout, nout, m2,
383 ndimA, nout, nout, dest);
387 for (
integer j = 1; j <= pb-1; j++) {
392 B+nout*(i-1)+ndimB*(nin*(j-1));
396 B+nout*(s-1)+ndimB*(nin*(j-1));
402 ndimB, nout, nin, m2,
403 ndimB, nout, nin, m3,
404 ndimB, nout, nin, dest);
411 doublereal* dest = B+nout*(i-1)+ndimB*(nin*(pb-1));
414 doublereal* m2 = B+nout*(s-1)+ndimB*(nin*(pb-1));
417 ndimB, nout, nin, m2,
418 ndimB, nout, nin, dest);
421 if (C != NULL && pa > 0) {
422 for (
integer j = 1; j <= pa-1; j++) {
427 C+nout*(i-1)+ndimC*(nout*(j-1));
431 C+nout*(s-1)+ndimC*(nout*(j-1));
437 ndimC, nout, nout, m2,
438 ndimC, nout, nout, m3,
439 ndimC, nout, nout, dest);
446 doublereal* dest = C+nout*(i-1)+ndimC*(nout*(pa-1));
449 doublereal* m2 = C+nout*(s-1)+ndimC*(nout*(pa-1));
452 ndimC, nout, nout, m2,
453 ndimC, nout, nout, dest);
466 P+nout*(i-1)+ndimP*(nin*(i-1));
468 gpc_mcopy(ndimP, nout, nin*(s-i), source,
476 doublereal* dest = P+nout*(i-1)+ndimP*(nin*(s-1));
479 doublereal* m2 = P+nout*(s-1)+ndimP*(nin*(s-1));
485 ndimP, nout, nin, m2,
486 ndimB, nout, nin, m3,
487 ndimP, nout, nin, dest);
static int gpc_zero(integer size, doublereal *v)
static int gpc_mcopy(integer ndims, integer nrows, integer ncols, const doublereal *s, integer ndimd, doublereal *d)
static int gpc_addmul(integer ndim1, integer nrow1, integer ncol1, const doublereal *m1, integer ndim2, integer nrow2, integer ncol2, const doublereal *m2, integer ndim3, integer nrow3, integer ncol3, const doublereal *m3, integer ndimd, integer nrowd, integer ncold, doublereal *d)
static int gpc_mul(integer ndim1, integer nrow1, integer ncol1, const doublereal *m1, integer ndim2, integer nrow2, integer ncol2, const doublereal *m2, integer ndimd, integer nrowd, integer ncold, doublereal *d)
static int gpc_mcopy_t(integer ndims, integer nrows, integer ncols, const doublereal *s, integer ndimd, doublereal *d)