Debian Codegraph @

3rdparty/dissection/src/Driver/CopyMatrix.cpp

raw
1 /*! \file CopyMatrix.cpp
2 \brief task mangemanet of dissection algorithm
3 \author Atsushi Suzuki, Laboratoire Jacques-Louis Lions
4 \date Aug. 09th 2015
5 \date Nov. 30th 2016
6 */
7
8 // This file is part of Dissection
9 //
10 // Dissection is free software: you can redistribute it and/or modify
11 // it under the terms of the GNU General Public License as published by
12 // the Free Software Foundation, either version 3 of the License, or
13 // (at your option) any later version.
14 //
15 // Linking Dissection statically or dynamically with other modules is making
16 // a combined work based on Disssection. Thus, the terms and conditions of
17 // the GNU General Public License cover the whole combination.
18 //
19 // As a special exception, the copyright holders of Dissection give you
20 // permission to combine Dissection program with free software programs or
21 // libraries that are released under the GNU LGPL and with independent modules
22 // that communicate with Dissection solely through the Dissection-fortran
23 // interface. You may copy and distribute such a system following the terms of
24 // the GNU GPL for Dissection and the licenses of the other code concerned,
25 // provided that you include the source code of that other code when and as
26 // the GNU GPL requires distribution of source code and provided that you do
27 // not modify the Dissection-fortran interface.
28 //
29 // Note that people who make modified versions of Dissection are not obligated
30 // to grant this special exception for their modified versions; it is their
31 // choice whether to do so. The GNU General Public License gives permission to
32 // release a modified version without this exception; this exception also makes
33 // it possible to release a modified version which carries forward this
34 // exception. If you modify the Dissection-fortran interface, this exception
35 // does not apply to your modified version of Dissection, and you must remove
36 // this exception when you distribute your modified version.
37 //
38 // This exception is an additional permission under section 7 of the GNU
39 // General Public License, version 3 ("GPLv3")
40 //
41 // Dissection is distributed in the hope that it will be useful,
42 // but WITHOUT ANY WARRANTY; without even the implied warranty of
43 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
44 // GNU General Public License for more details.
45 //
46 // You should have received a copy of the GNU General Public License
47 // along with Dissection. If not, see <http://www.gnu.org/licenses/>.
48 //
49
50 #include "Driver/CopyMatrix.hpp"
51
52 template <typename T, typename W>
53 void CopySparseMatrix(SparseMatrix<W> *b,
54 SparseMatrix<T> *a)
55 {
56 b->ptRows() = a->ptRows();
57 b->indCols() = a->indCols();
58 const int nnz = a->nnz();
59 b->coefs().resize(nnz);
60 for (int i = 0; i < nnz; i++) {
61 b->coefs()[i] = conv_prec<W, T>(a->coefs()[i]);
62 }
63 }
64
65 template
66 void CopySparseMatrix<quadruple, double>(SparseMatrix<double> *b,
67 SparseMatrix<quadruple> *a);
68 template
69 void CopySparseMatrix<complex<quadruple>, complex<double> >(SparseMatrix<complex<double> > *b,
70 SparseMatrix<complex<quadruple> > *a);
71
72 template
73 void CopySparseMatrix<double, quadruple>(SparseMatrix<quadruple> *b,
74 SparseMatrix<double> *a);
75
76 template
77 void CopySparseMatrix<complex<double>, complex<quadruple> >
78 (SparseMatrix<complex<quadruple> > *b,
79 SparseMatrix<complex<double> > *a);
80
81 template
82 void CopySparseMatrix<double, float>(SparseMatrix<float> *b,
83 SparseMatrix<double> *a);
84
85 template
86 void CopySparseMatrix<float, double>(SparseMatrix<double> *b,
87 SparseMatrix<float> *a);
88
89
90 template
91 void CopySparseMatrix<complex<double>, complex<float> >(SparseMatrix<complex<float> > *b,
92 SparseMatrix<complex<double> > *a);
93
94 template<typename T, typename W>
95 void CopySquareBlockMatrix(SquareBlockMatrix<W> &b,
96 SquareBlockMatrix<T> &a)
97 {
98 // b.init(a.dimension(), a.block_size(), a.isSym(), 0); // initialize b
99 b.allocate();
100 b.getPermute() = a.getPermute(); // copy vector<int> _permute
101 b.getNsingBlock() = a.getNsingBlock(); // copy vector<int> _nsing_block
102 b.getSingIdx() = a.getSingIdx(); // copy vector<int> _singIdx
103 b.getSingIdx0() = a.getSingIdx0(); // copy vector<int> _singIdx0
104 b.set_KernelDetected(a.KernelDetected()); // copy bool _kernelDetected
105 b.set_rank(a.rank()); // copy int _rank, int _nsing
106 b.set_lastPivot(a.lastPivot()); // copy double _lastpiv
107 if (a.isBlocked()) { // copy bool _isblocked
108 b.setBlocked();
109 }
110 else {
111 b.unsetBlocked();
112 }
113 if (a.isSym()) {
114 const int num_blocks = a.num_blocks();
115 for (int i = 0 ; i < num_blocks; i++) {
116 for (int j = i ; j < num_blocks; j++) {
117 const int nrow = a.nrowBlock(i);
118 const int ncol = a.nrowBlock(j);
119 for (int k = 0; k < (nrow * ncol); k++) {
120 b.addrCoefBlock(i, j)[k] = conv_prec<W, T>(a.addrCoefBlock(i, j)[k]);
121 }
122 } // loop : j
123 } // loop : i
124 }
125 else {
126 const int num_blocks = a.num_blocks();
127 for (int i = 0 ; i < num_blocks; i++) {
128 for (int j = 0 ; j < num_blocks; j++) {
129 const int nrow = a.nrowBlock(i);
130 const int ncol = a.nrowBlock(j);
131 for (int k = 0; k < (nrow * ncol); k++) {
132 b.addrCoefBlock(i, j)[k] = conv_prec<W, T>(a.addrCoefBlock(i, j)[k]);
133 }
134 } // loop : j
135 } // loop : i
136 }
137 }
138
139 template
140 void CopySquareBlockMatrix<quadruple,
141 double>(SquareBlockMatrix<double> &b,
142 SquareBlockMatrix<quadruple> &a);
143 template
144 void CopySquareBlockMatrix<complex<quadruple>, complex<double> >
145 (SquareBlockMatrix<complex<double> > &b,
146 SquareBlockMatrix<complex<quadruple> > &a);
147
148 template
149 void CopySquareBlockMatrix<double,
150 quadruple>(SquareBlockMatrix<quadruple> &b,
151 SquareBlockMatrix<double> &a);
152 template
153 void CopySquareBlockMatrix<complex<double>, complex<quadruple> >
154 (SquareBlockMatrix<complex<quadruple> > &b,
155 SquareBlockMatrix<complex<double> > &a);
156
157 template
158 void CopySquareBlockMatrix<double,
159 float>(SquareBlockMatrix<float> &b,
160 SquareBlockMatrix<double> &a);
161 template
162 void CopySquareBlockMatrix<complex<double>, complex<float> >
163 (SquareBlockMatrix<complex<float> > &b,
164 SquareBlockMatrix<complex<double> > &a);
165
166 template
167 void CopySquareBlockMatrix<float,
168 double>(SquareBlockMatrix<double> &b,
169 SquareBlockMatrix<float> &a);
170 template
171 void CopySquareBlockMatrix<complex<float>, complex<double> >
172 (SquareBlockMatrix<complex<double> > &b,
173 SquareBlockMatrix<complex<float> > &a);
174 //
175
176 template<typename T, typename W>
177 void CopyRectBlockMatrix(RectBlockMatrix<W> &b,
178 RectBlockMatrix<T> &a)
179 {
180 for (int i = 0 ; i < a.num_blocks_r(); i++) {
181 for (int j = 0 ; j < a.num_blocks_c(); j++) {
182 const int nrow = a.nrowBlock(i);
183 const int ncol = a.ncolBlock(j);
184 for (int k = 0; k < (nrow * ncol); k++) {
185 b.addrCoefBlock(i, j)[k] = conv_prec<W, T>(a.addrCoefBlock(i, j)[k]);
186 }
187 } // loop : j
188 } // loop : i
189 }
190
191 template
192 void CopyRectBlockMatrix<quadruple, double>(RectBlockMatrix<double> &b,
193 RectBlockMatrix<quadruple> &a);
194
195 template
196 void CopyRectBlockMatrix<complex<quadruple>, complex<double> >
197 (RectBlockMatrix<complex<double> > &b,
198 RectBlockMatrix<complex<quadruple> > &a);
199
200 template
201 void CopyRectBlockMatrix<double, quadruple>(RectBlockMatrix<quadruple> &b,
202 RectBlockMatrix<double> &a);
203
204 template
205 void CopyRectBlockMatrix<complex<double>, complex<quadruple> >
206 (RectBlockMatrix<complex<quadruple> > &b,
207 RectBlockMatrix<complex<double> > &a);
208
209 template
210 void CopyRectBlockMatrix<double, float>(RectBlockMatrix<float> &b,
211 RectBlockMatrix<double> &a);
212
213 template
214 void CopyRectBlockMatrix<complex<double>, complex<float> >
215 (RectBlockMatrix<complex<float> > &b,
216 RectBlockMatrix<complex<double> > &a);
217
218 template
219 void CopyRectBlockMatrix<float, double>(RectBlockMatrix<double> &b,
220 RectBlockMatrix<float> &a);
221
222 template
223 void CopyRectBlockMatrix<complex<float>, complex<double> >
224 (RectBlockMatrix<complex<double> > &b,
225 RectBlockMatrix<complex<float> > &a);
226
227 //
228
229 template<typename T, typename U, typename W, typename Z>
230 void CopyTridiagBlockMatrix(TridiagBlockMatrix<W, Z> &b,
231 TridiagBlockMatrix<T, U> &a,
232 W *coef)
233 {
234 b.init(a.dimension(), a.block_size(), a.isSym());
235
236 b.setNfront(a.Nfront());
237 b.setMaxdim(a.maxdim());
238 b.setNnz(a.nnz());
239 b.setNop(a.nop());
240 b.setDiag_block_alloc_status(a.diag_block_alloc_status());
241 b.setNscol(a.nscol());
242 b.setNsing(a.nsing());
243 b.setDetected(a.detected());
244
245 b.getPtRows() = a.getPtRows();
246 b.getIndCols() = a.getIndCols();
247 b.getIndVals() = a.getIndVals();
248 b.getNew2old() = a.getNew2old();
249 b.getP_front() = a.getP_front();
250 b.getPermute() = a.getPermute();
251 b.getPermute_ginv() = a.getPermute_ginv();
252 b.getP_diag() = a.getP_diag();
253 b.getP_upper() = a.getP_upper();
254 b.getList_schur() = a.getList_schur();
255 b.getList_elim() = a.getList_elim();
256 b.getNum_null() = a.getNum_null();
257 b.setCoef(coef);
258
259 const int nfront = a.Nfront();
260 b.getaddrDiagMatrix() = new ColumnMatrix<W>[nfront];
261 #ifndef SPARSE_OFFDIAG
262 b.getaddrLowerMatrix() = new ColumnMatrix<W>[nfront];
263 b.getaddrUpperMatrix() = new ColumnMatrix<W>[nfront];
264 #endif
265 for (int n = 0; n < nfront; n++) {
266 {
267 const int nbCols = a.getaddrDiagMatrix()[n].nbColumns();
268 const int nbRows = a.getaddrDiagMatrix()[n].nbRows();
269 const int size = a.getaddrDiagMatrix()[n].size();
270 b.getaddrDiagMatrix()[n].init(nbRows, nbCols); // allocation
271 for (int i = 0; i < size; i++) {
272 b.getaddrDiagMatrix()[n].coefs()[i] =
273 conv_prec<W, T>(a.getaddrDiagMatrix()[n].coefs()[i]);
274 }
275 }
276 #ifndef SPARSE_OFFDIAG
277 {
278 const int nbCols = a.getaddrLowerMatrix()[n].nbColumns();
279 const int nbRows = a.getaddrLowerMatrix()[n].nbRows();
280 const int size = a.getaddrLowerMatrix()[n].size();
281 b.getaddrLowerMatrix()[n].init(nbRows, nbCols); // allocation
282 b.getaddrUpperMatrix()[n].init(nbRows, nbCols); // allocation
283 for (int i = 0; i < size; i++) {
284 b.getaddrLowerMatrix()[n].coefs()[i] =
285 conv_prec<W, T>(a.getaddrLowerMatrix()[n].coefs()[i]);
286 b.getaddrUpperMatrix()[n].coefs()[i] =
287 conv_prec<W, T>(a.getaddrUpperMatrix()[n].coefs()[i]);
288 }
289 }
290 #endif
291 }
292 b.getA12().init(a.getA12().nbRows(), a.getA12().nbColumns()); // allocation
293 for (int i = 0; i < a.getA12().size(); i++) {
294 b.getA12().coefs()[i] = conv_prec<W, T>(a.getA12().coefs()[i]);
295 }
296 b.getA21().init(a.getA21().nbRows(), a.getA21().nbColumns()); // allocation
297 for (int i = 0; i < a.getA21().size(); i++) {
298 b.getA21().coefs()[i] = conv_prec<W, T>(a.getA21().coefs()[i]);
299 }
300 b.getS22().init(a.getS22().nbRows(), a.getS22().nbColumns()); // allocation
301 for (int i = 0; i < a.getS22().size(); i++) {
302 b.getS22().coefs()[i] = conv_prec<W, T>(a.getS22().coefs()[i]);
303 }
304 }
305
306 template
307 void CopyTridiagBlockMatrix(TridiagBlockMatrix<double, double> &b,
308 TridiagBlockMatrix<quadruple, quadruple> &a,
309 double *coef);
310 template
311 void CopyTridiagBlockMatrix(TridiagBlockMatrix<complex<double>, double> &b,
312 TridiagBlockMatrix<complex<quadruple>,
313 quadruple> &a,
314 complex<double> *coef);
315 template
316 void CopyTridiagBlockMatrix(TridiagBlockMatrix<quadruple, quadruple> &b,
317 TridiagBlockMatrix<double, double> &a,
318 quadruple *coef);
319 template
320 void CopyTridiagBlockMatrix(TridiagBlockMatrix<complex<quadruple>, quadruple> &b,
321 TridiagBlockMatrix<complex<double>, double> &a,
322 complex<quadruple> *coef);
323
324 template
325 void CopyTridiagBlockMatrix(TridiagBlockMatrix<float, float> &b,
326 TridiagBlockMatrix<double, double> &a,
327 float *coef);
328 template
329 void CopyTridiagBlockMatrix(TridiagBlockMatrix<complex<float>, float> &b,
330 TridiagBlockMatrix<complex<double>,
331 double> &a,
332 complex<float> *coef);
333 template
334 void CopyTridiagBlockMatrix(TridiagBlockMatrix<double, double> &b,
335 TridiagBlockMatrix<float, float> &a,
336 double *coef);
337 template
338 void CopyTridiagBlockMatrix(TridiagBlockMatrix<complex<double>, double> &b,
339 TridiagBlockMatrix<complex<float>, float> &a,
340 complex<double> *coef);
341
342 template<typename T, typename U, typename W, typename Z>
343 void CopyDissectionMatrix(DissectionMatrix<W, Z> *b,
344 DissectionMatrix<T, U> *a,
345 SquareBlockMatrix<W> *diag, // pointers
346 RectBlockMatrix<W> *lower,
347 RectBlockMatrix<W> *upper)
348 {
349 b->setNb(a->nb());
350 b->setLevel(a->level());
351 b->setNrow(a->nrow());
352 b->setNcol_offdiag(a->ncol_offdiag());
353 b->setIsSym(a->isSym());
354 b->setIslast(a->islast());
355 b->setAlignedFather(a->alignedFather());
356 // copy pointer to matrices that have lower accuracy <W, Z>
357 b->setColorTridiagBlockMatrix(a->ColorTridiagBlockMatrix());
358 b->paddrdiagBlock() = diag;
359 // b->paddrtridiagBlock() = tridiag;
360 b->paddrupperBlock() = lower;
361 b->paddrupperBlock() = upper;
362 }
363
364 template
365 void CopyDissectionMatrix<quadruple, quadruple,
366 double, double>(DissectionMatrix<double, double> *b,
367 DissectionMatrix<quadruple, quadruple> *a,
368 SquareBlockMatrix<double> *diag,
369 RectBlockMatrix<double> *lower,
370 RectBlockMatrix<double> *upper);
371
372 template
373 void CopyDissectionMatrix<complex<quadruple>, quadruple,
374 complex<double>, double>(DissectionMatrix<complex<double>, double> *b,
375 DissectionMatrix<complex<quadruple>, quadruple> *a,
376 SquareBlockMatrix<complex<double> > *diag,
377 RectBlockMatrix<complex<double> > *lower,
378 RectBlockMatrix<complex<double> > *upper);
379 //
380
381 template
382 void CopyDissectionMatrix<double, double, quadruple, quadruple>
383 (DissectionMatrix<quadruple, quadruple> *b,
384 DissectionMatrix<double, double> *a,
385 SquareBlockMatrix<quadruple> *diag,
386 RectBlockMatrix<quadruple> *lower,
387 RectBlockMatrix<quadruple> *upper);
388
389 template
390 void CopyDissectionMatrix<complex<double>, double,
391 complex<quadruple>, quadruple>
392 (DissectionMatrix<complex<quadruple>, quadruple> *b,
393 DissectionMatrix<complex<double>, double> *a,
394 SquareBlockMatrix<complex<quadruple> > *diag,
395 RectBlockMatrix<complex<quadruple> > *lower,
396 RectBlockMatrix<complex<quadruple> > *upper);
397
398 template
399 void CopyDissectionMatrix<double, double,
400 float, float>(DissectionMatrix<float, float> *b,
401 DissectionMatrix<double, double> *a,
402 SquareBlockMatrix<float> *diag,
403 RectBlockMatrix<float> *lower,
404 RectBlockMatrix<float> *upper);
405
406 template
407 void CopyDissectionMatrix<complex<double>, double,
408 complex<float>, float>(DissectionMatrix<complex<float>, float> *b,
409 DissectionMatrix<complex<double>, double> *a,
410 SquareBlockMatrix<complex<float> > *diag,
411 RectBlockMatrix<complex<float> > *lower,
412 RectBlockMatrix<complex<float> > *upper);
413 //
414
415 template
416 void CopyDissectionMatrix<float, float, double, double>
417 (DissectionMatrix<double, double> *b,
418 DissectionMatrix<float, float> *a,
419 SquareBlockMatrix<double> *diag,
420 RectBlockMatrix<double> *lower,
421 RectBlockMatrix<double> *upper);
422
423 template
424 void CopyDissectionMatrix<complex<float>, float,
425 complex<double>, double>
426 (DissectionMatrix<complex<double>, double> *b,
427 DissectionMatrix<complex<float>, float> *a,
428 SquareBlockMatrix<complex<double> > *diag,
429 RectBlockMatrix<complex<double> > *lower,
430 RectBlockMatrix<complex<double> > *upper);
431
432 //
433
434 template<typename T, typename W>
435 void CopySchurMatrix(SchurMatrix<W> &b,
436 SchurMatrix<T> &a)
437 {
438 b.getSlduList() = a.getSlduList();
439 {
440 const int dim = a.getSldu().dimension();
441 b.getSldu().init(a.getSldu().loc2glob());
442 for (int i = 0; i < (dim * dim); i++) {
443 b.getSldu().addrCoefs()[i] = conv_prec<W, T>(a.getSldu().addrCoefs()[i]);
444 }
445 for (int i = 0; i < dim; i++) {
446 b.getSldu().addr2x2()[i] = conv_prec<W, T>(a.getSldu().addr2x2()[i]);
447 }
448 b.getSldu().getPivotWidth() = a.getSldu().getPivotWidth();
449 b.getSldu().getPivot2x2() = a.getSldu().getPivot2x2();
450 b.getSldu().getPermute() = a.getSldu().getPermute();
451 }
452 {
453 const bool isUpper = a.getArow()->isUpper();
454 const bool isSym = a.getArow()->isSymmetric();
455 const int dim = a.getArow()->dimension();
456 const int nnz = a.getArow()->nnz();
457 b.getArow() = new SparseMatrix<W>(dim, nnz,
458 &(a.getArow()->getRows()[0]),
459 &(a.getArow()->getIndCols()[0]),
460 isSym, isUpper);
461 for (int i = 0; i < nnz; i++) {
462 b.getArow()->Coef(i) = conv_prec<W, T>(a.getArow()->Coef(i));
463 }
464 }
465 {
466 const bool isUpper = a.getAcol()->isUpper();
467 const bool isSym = a.getAcol()->isSymmetric();
468 const int dim = a.getAcol()->dimension();
469 const int nnz = a.getAcol()->nnz();
470 b.getAcol() = new SparseMatrix<W>(dim, nnz,
471 &(a.getAcol()->getRows()[0]),
472 &(a.getAcol()->getIndCols()[0]),
473 isSym, isUpper);
474 for (int i = 0; i < nnz; i++) {
475 b.getAcol()->Coef(i) = conv_prec<W, T>(a.getAcol()->Coef(i));
476 }
477 }
478 {
479 const int size = a.getScol().size();
480 for (int i = 0; i < size; i++) {
481 b.getScol().addrCoefs()[i] = conv_prec<W, T>(a.getScol().addrCoefs()[i]);
482 }
483 }
484 }
485
486 template
487 void CopySchurMatrix(SchurMatrix<double> &b,
488 SchurMatrix<quadruple> &a);
489
490 template
491 void CopySchurMatrix(SchurMatrix<complex<double> > &b,
492 SchurMatrix<complex<quadruple> > &a);
493 template
494 void CopySchurMatrix(SchurMatrix<quadruple> &b,
495 SchurMatrix<double> &a);
496
497 template
498 void CopySchurMatrix(SchurMatrix<complex<quadruple> > &b,
499 SchurMatrix<complex<double> > &a);
500 template
501 void CopySchurMatrix(SchurMatrix<float> &b,
502 SchurMatrix<double> &a);
503
504 template
505 void CopySchurMatrix(SchurMatrix<complex<float> > &b,
506 SchurMatrix<complex<double> > &a);
507 template
508 void CopySchurMatrix(SchurMatrix<double> &b,
509 SchurMatrix<float> &a);
510
511 template
512 void CopySchurMatrix(SchurMatrix<complex<double> > &b,
513 SchurMatrix<complex<float> > &a);
514 //
515
516 template<typename T, typename W>
517 void CopyKernelMatrix(KernelMatrix<W> &b,
518 KernelMatrix<T> &a)
519 {
520 b.set_dimension(a.dimension());
521 b.getSingIdx() = a.getSingIdx();
522 b.getKernListEq() = a.getKernListEq();
523 {
524 b.getKernBasis().init(a.getKernBasis().nbRows(),
525 a.getKernBasis().nbColumns());
526 const int size = a.getKernBasis().size();
527 for (int i = 0; i < size; i++) {
528 b.getKernBasis().addrCoefs()[i] =
529 conv_prec<W, T>(a.getKernBasis().addrCoefs()[i]);
530 }
531 }
532 {
533 b.getTKernBasis().init(a.getKernBasis().nbRows(),
534 a.getKernBasis().nbColumns());
535
536 const int size = a.getTKernBasis().size();
537 for (int i = 0; i < size; i++) {
538 b.getTKernBasis().addrCoefs()[i] =
539 conv_prec<W, T>(a.getTKernBasis().addrCoefs()[i]);
540 }
541 }
542 {
543 const int dim = a.getKernProj().dimension();
544 b.getKernProj().init(dim);
545 for (int i = 0; i < (dim * dim); i++) {
546 b.getKernProj().addrCoefs()[i] = conv_prec<W, T>(a.getKernProj().addrCoefs()[i]);
547 }
548 b.getKernProj().getPermute() = a.getKernProj().getPermute();
549 }
550 {
551
552 const int dim = a.getTKernProj().dimension();
553 b.getTKernProj().init(dim);
554 for (int i = 0; i < (dim * dim); i++) {
555 b.getTKernProj().addrCoefs()[i] =
556 conv_prec<W, T>(a.getTKernProj().addrCoefs()[i]);
557 }
558 b.getTKernProj().getPermute() = a.getTKernProj().getPermute();
559 }
560 {
561 const int dim = a.getNTKernProj().dimension();
562 b.getNTKernProj().init(dim);
563 for (int i = 0; i < (dim * dim); i++) {
564 b.getNTKernProj().addrCoefs()[i] =
565 conv_prec<W, T>(a.getNTKernProj().addrCoefs()[i]);
566 }
567 b.getNTKernProj().getPermute() = a.getNTKernProj().getPermute();
568 }
569
570 }
571
572 template
573 void CopyKernelMatrix<quadruple, double>(KernelMatrix<double> &b,
574 KernelMatrix<quadruple> &a);
575
576 template
577 void CopyKernelMatrix<complex<quadruple>,
578 complex<double> >(KernelMatrix<complex<double> > &b,
579 KernelMatrix<complex<quadruple> > &a);
580
581 template
582 void CopyKernelMatrix<double, quadruple>(KernelMatrix<quadruple> &b,
583 KernelMatrix<double> &a);
584
585 template
586 void CopyKernelMatrix<complex<double>,
587 complex<quadruple> >(KernelMatrix<complex<quadruple> > &b,
588 KernelMatrix<complex<double> > &a);
589
590 template
591 void CopyKernelMatrix<double, float>(KernelMatrix<float> &b,
592 KernelMatrix<double> &a);
593
594 template
595 void CopyKernelMatrix<complex<double>,
596 complex<float> >(KernelMatrix<complex<float> > &b,
597 KernelMatrix<complex<double> > &a);
598
599 template
600 void CopyKernelMatrix<float, double>(KernelMatrix<double> &b,
601 KernelMatrix<float> &a);
602
603 template
604 void CopyKernelMatrix<complex<float>,
605 complex<double> >(KernelMatrix<complex<double> > &b,
606 KernelMatrix<complex<float> > &a);