Debian Codegraph @

external/gsl/gsl_matrix__copy_source.c

raw symbols SCIP
1 /* matrix/copy_source.c
2 *
3 * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Gerard Jungman, Brian Gough
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 3 of the License, or (at
8 * your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful, but
11 * WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
18 */
19
20 int
21 FUNCTIONcxx . . $ `./templates_on.h:233:9`! (gsl_matrix, memcpy) (TYPEcxx . . $ `./templates_on.h:234:9`! (gsl_matrix) * dest,
22 const TYPEcxx . . $ `./templates_on.h:234:9`! (gsl_matrix) * src)
23 {
24 const size_t src_size1 = src->size1cxx . . $ $anonymous_type_9e5f70882c9c9756_0#size1.;
25 const size_t src_size2 = src->size2cxx . . $ $anonymous_type_9e5f70882c9c9756_0#size2.;
26 const size_t dest_size1 = dest->size1cxx . . $ $anonymous_type_9e5f70882c9c9756_0#size1.;
27 const size_t dest_size2 = dest->size2cxx . . $ $anonymous_type_9e5f70882c9c9756_0#size2.;
28
29 if (src_size1 != dest_size1 || src_size2 != dest_size2)
30 {
31 GSL_ERRORcxx . . $ `external/gsl/gsl_errno.h:104:9`! ("matrix sizes are different", GSL_EBADLEN);
32 }
33
34 {
35 const size_t src_tda = src->tdacxx . . $ $anonymous_type_9e5f70882c9c9756_0#tda. ;
36 const size_t dest_tda = dest->tdacxx . . $ $anonymous_type_9e5f70882c9c9756_0#tda. ;
37 size_t i, j;
38
39 for (i = 0; i < src_size1 ; i++)
40 {
41 for (j = 0; j < MULTIPLICITYcxx . . $ `./templates_on.h:117:9`! * src_size2; j++)
42 {
43 dest->datacxx . . $ $anonymous_type_9e5f70882c9c9756_0#data.[MULTIPLICITYcxx . . $ `./templates_on.h:117:9`! * dest_tda * i + j]
44 = src->datacxx . . $ $anonymous_type_9e5f70882c9c9756_0#data.[MULTIPLICITYcxx . . $ `./templates_on.h:117:9`! * src_tda * i + j];
45 }
46 }
47 }
48
49 return GSL_SUCCESScxx . . $ GSL_SUCCESS.;
50 }
51
52
53 int
54 FUNCTIONcxx . . $ `./templates_on.h:233:9`! (gsl_matrix, swap) (TYPEcxx . . $ `./templates_on.h:234:9`! (gsl_matrix) * dest, TYPEcxx . . $ `./templates_on.h:234:9`! (gsl_matrix) * src)
55 {
56 const size_t src_size1 = src->size1cxx . . $ $anonymous_type_9e5f70882c9c9756_0#size1.;
57 const size_t src_size2 = src->size2cxx . . $ $anonymous_type_9e5f70882c9c9756_0#size2.;
58 const size_t dest_size1 = dest->size1cxx . . $ $anonymous_type_9e5f70882c9c9756_0#size1.;
59 const size_t dest_size2 = dest->size2cxx . . $ $anonymous_type_9e5f70882c9c9756_0#size2.;
60
61 if (src_size1 != dest_size1 || src_size2 != dest_size2)
62 {
63 GSL_ERRORcxx . . $ `external/gsl/gsl_errno.h:104:9`! ("matrix sizes are different", GSL_EBADLEN);
64 }
65
66 {
67 const size_t src_tda = src->tdacxx . . $ $anonymous_type_9e5f70882c9c9756_0#tda. ;
68 const size_t dest_tda = dest->tdacxx . . $ $anonymous_type_9e5f70882c9c9756_0#tda. ;
69 size_t i, j;
70
71 for (i = 0; i < src_size1 ; i++)
72 {
73 for (j = 0; j < MULTIPLICITYcxx . . $ `./templates_on.h:117:9`! * src_size2; j++)
74 {
75 ATOMICcxx . . $ `./templates_on.h:116:9`! tmp = src->datacxx . . $ $anonymous_type_9e5f70882c9c9756_0#data.[MULTIPLICITYcxx . . $ `./templates_on.h:117:9`! * src_tda * i + j];
76 src->datacxx . . $ $anonymous_type_9e5f70882c9c9756_0#data.[MULTIPLICITYcxx . . $ `./templates_on.h:117:9`! * src_tda * i + j]
77 = dest->datacxx . . $ $anonymous_type_9e5f70882c9c9756_0#data.[MULTIPLICITYcxx . . $ `./templates_on.h:117:9`! * dest_tda * i + j];
78 dest->datacxx . . $ $anonymous_type_9e5f70882c9c9756_0#data.[MULTIPLICITYcxx . . $ `./templates_on.h:117:9`! * dest_tda * i + j] = tmp ;
79 }
80 }
81 }
82
83 return GSL_SUCCESScxx . . $ GSL_SUCCESS.;
84 }
85
86
87
88