Debian Codegraph @

external/gsl/gsl_matrix__getset_source.c

raw symbols SCIP
1 /**********************************************************************/cxx . . $ `<file>/external/gsl/gsl_matrix__getset_source.c`/
2 /* The functions below are obsolete */
3 /**********************************************************************/
4
5 int
6 FUNCTIONcxx . . $ `./templates_on.h:233:9`! (gsl_matrix, get_row) (TYPEcxx . . $ `./templates_on.h:234:9`! (gsl_vector) * v,
7 const TYPEcxx . . $ `./templates_on.h:234:9`! (gsl_matrix) * m,
8 const size_tcxx . . $ size_t# i)
9 {
10 const size_tcxx . . $ size_t# M = m->size1cxx . . $ $anonymous_type_a528b1853546c6a1_0#size1.;
11 const size_tcxx . . $ size_t# N = m->size2cxx . . $ $anonymous_type_a528b1853546c6a1_0#size2.;
12 const size_tcxx . . $ size_t# tda = m->tdacxx . . $ $anonymous_type_a528b1853546c6a1_0#tda.;
13
14 if (i >= M)
15 {
16 GSL_ERRORcxx . . $ `external/gsl/gsl_errno.h:104:9`! ("row index is out of range", GSL_EINVAL);
17 }
18
19 if (v->sizecxx . . $ $anonymous_type_8a20c748c45d8e6_0#size. != N)
20 {
21 GSL_ERRORcxx . . $ `external/gsl/gsl_errno.h:104:9`! ("matrix row size and vector length are not equal",
22 GSL_EBADLEN);
23 }
24
25 {
26 ATOMICcxx . . $ `./templates_on.h:128:9`! *v_data = v->datacxx . . $ $anonymous_type_8a20c748c45d8e6_0#data.;
27 const ATOMICcxx . . $ `./templates_on.h:128:9`! *row_data = m->datacxx . . $ $anonymous_type_a528b1853546c6a1_0#data. + MULTIPLICITYcxx . . $ `./templates_on.h:129:9`! * i * tda;
28 const size_tcxx . . $ size_t# stride = v->stridecxx . . $ $anonymous_type_8a20c748c45d8e6_0#stride. ;
29 size_tcxx . . $ size_t# j;
30
31 for (j = 0; j < N; j++)
32 {
33 unsigned int k;
34
35 for (k = 0; k < MULTIPLICITYcxx . . $ `./templates_on.h:129:9`!; k++)
36 {
37 v_data[MULTIPLICITYcxx . . $ `./templates_on.h:129:9`! * stride * j + k]
38 = row_data[MULTIPLICITYcxx . . $ `./templates_on.h:129:9`! * j + k];
39 }
40 }
41 }
42
43 return GSL_SUCCESScxx . . $ GSL_SUCCESS.;
44 }
45
46 int
47 FUNCTIONcxx . . $ `./templates_on.h:233:9`! (gsl_matrix, get_col) (TYPEcxx . . $ `./templates_on.h:234:9`! (gsl_vector) * v,
48 const TYPEcxx . . $ `./templates_on.h:234:9`! (gsl_matrix) * m,
49 const size_tcxx . . $ size_t# j)
50 {
51 const size_tcxx . . $ size_t# M = m->size1cxx . . $ $anonymous_type_a528b1853546c6a1_0#size1.;
52 const size_tcxx . . $ size_t# N = m->size2cxx . . $ $anonymous_type_a528b1853546c6a1_0#size2.;
53 const size_tcxx . . $ size_t# tda = m->tdacxx . . $ $anonymous_type_a528b1853546c6a1_0#tda.;
54
55 if (j >= N)
56 {
57 GSL_ERRORcxx . . $ `external/gsl/gsl_errno.h:104:9`! ("column index is out of range", GSL_EINVAL);
58 }
59
60 if (v->sizecxx . . $ $anonymous_type_8a20c748c45d8e6_0#size. != M)
61 {
62 GSL_ERRORcxx . . $ `external/gsl/gsl_errno.h:104:9`! ("matrix column size and vector length are not equal",
63 GSL_EBADLEN);
64 }
65
66
67 {
68 ATOMICcxx . . $ `./templates_on.h:128:9`! *v_data = v->datacxx . . $ $anonymous_type_8a20c748c45d8e6_0#data.;
69 const ATOMICcxx . . $ `./templates_on.h:128:9`! *column_data = m->datacxx . . $ $anonymous_type_a528b1853546c6a1_0#data. + MULTIPLICITYcxx . . $ `./templates_on.h:129:9`! * j;
70 const size_tcxx . . $ size_t# stride = v->stridecxx . . $ $anonymous_type_8a20c748c45d8e6_0#stride. ;
71 size_tcxx . . $ size_t# i;
72
73 for (i = 0; i < M; i++)
74 {
75 unsigned int k;
76
77 for (k = 0; k < MULTIPLICITYcxx . . $ `./templates_on.h:129:9`!; k++)
78 {
79 v_data[stride * MULTIPLICITYcxx . . $ `./templates_on.h:129:9`! * i + k] =
80 column_data[MULTIPLICITYcxx . . $ `./templates_on.h:129:9`! * i * tda + k];
81 }
82 }
83 }
84
85 return GSL_SUCCESScxx . . $ GSL_SUCCESS.;
86 }
87
88 int
89 FUNCTIONcxx . . $ `./templates_on.h:233:9`! (gsl_matrix, set_row) (TYPEcxx . . $ `./templates_on.h:234:9`! (gsl_matrix) * m,
90 const size_tcxx . . $ size_t# i,
91 const TYPEcxx . . $ `./templates_on.h:234:9`! (gsl_vector) * v)
92 {
93 const size_tcxx . . $ size_t# M = m->size1cxx . . $ $anonymous_type_a528b1853546c6a1_0#size1.;
94 const size_tcxx . . $ size_t# N = m->size2cxx . . $ $anonymous_type_a528b1853546c6a1_0#size2.;
95 const size_tcxx . . $ size_t# tda = m->tdacxx . . $ $anonymous_type_a528b1853546c6a1_0#tda.;
96
97 if (i >= M)
98 {
99 GSL_ERRORcxx . . $ `external/gsl/gsl_errno.h:104:9`! ("row index is out of range", GSL_EINVAL);
100 }
101
102 if (v->sizecxx . . $ $anonymous_type_8a20c748c45d8e6_0#size. != N)
103 {
104 GSL_ERRORcxx . . $ `external/gsl/gsl_errno.h:104:9`! ("matrix row size and vector length are not equal",
105 GSL_EBADLEN);
106 }
107
108 {
109 const ATOMICcxx . . $ `./templates_on.h:128:9`! *v_data = v->datacxx . . $ $anonymous_type_8a20c748c45d8e6_0#data.;
110 ATOMICcxx . . $ `./templates_on.h:128:9`! *row_data = m->datacxx . . $ $anonymous_type_a528b1853546c6a1_0#data. + MULTIPLICITYcxx . . $ `./templates_on.h:129:9`! * i * tda;
111 const size_tcxx . . $ size_t# stride = v->stridecxx . . $ $anonymous_type_8a20c748c45d8e6_0#stride. ;
112 size_tcxx . . $ size_t# j;
113
114 for (j = 0; j < N; j++)
115 {
116 unsigned int k;
117
118 for (k = 0; k < MULTIPLICITYcxx . . $ `./templates_on.h:129:9`!; k++)
119 {
120 row_data[MULTIPLICITYcxx . . $ `./templates_on.h:129:9`!*j + k]
121 = v_data[MULTIPLICITYcxx . . $ `./templates_on.h:129:9`! * stride * j + k];
122 }
123 }
124 }
125
126 return GSL_SUCCESScxx . . $ GSL_SUCCESS.;
127 }
128
129 int
130 FUNCTIONcxx . . $ `./templates_on.h:233:9`! (gsl_matrix, set_col) (TYPEcxx . . $ `./templates_on.h:234:9`! (gsl_matrix) * m,
131 const size_tcxx . . $ size_t# j,
132 const TYPEcxx . . $ `./templates_on.h:234:9`! (gsl_vector) * v)
133 {
134 const size_tcxx . . $ size_t# M = m->size1cxx . . $ $anonymous_type_a528b1853546c6a1_0#size1.;
135 const size_tcxx . . $ size_t# N = m->size2cxx . . $ $anonymous_type_a528b1853546c6a1_0#size2.;
136 const size_tcxx . . $ size_t# tda = m->tdacxx . . $ $anonymous_type_a528b1853546c6a1_0#tda.;
137
138 if (j >= N)
139 {
140 GSL_ERRORcxx . . $ `external/gsl/gsl_errno.h:104:9`! ("column index is out of range", GSL_EINVAL);
141 }
142
143 if (v->sizecxx . . $ $anonymous_type_8a20c748c45d8e6_0#size. != M)
144 {
145 GSL_ERRORcxx . . $ `external/gsl/gsl_errno.h:104:9`! ("matrix column size and vector length are not equal",
146 GSL_EBADLEN);
147 }
148
149 {
150 const ATOMICcxx . . $ `./templates_on.h:128:9`! *v_data = v->datacxx . . $ $anonymous_type_8a20c748c45d8e6_0#data.;
151 ATOMICcxx . . $ `./templates_on.h:128:9`! *column_data = m->datacxx . . $ $anonymous_type_a528b1853546c6a1_0#data. + MULTIPLICITYcxx . . $ `./templates_on.h:129:9`! * j;
152 const size_tcxx . . $ size_t# stride = v->stridecxx . . $ $anonymous_type_8a20c748c45d8e6_0#stride. ;
153 size_tcxx . . $ size_t# i;
154
155 for (i = 0; i < M; i++)
156 {
157 unsigned int k;
158
159 for (k = 0; k < MULTIPLICITYcxx . . $ `./templates_on.h:129:9`!; k++)
160 {
161 column_data[MULTIPLICITYcxx . . $ `./templates_on.h:129:9`! * i * tda + k]
162 = v_data[MULTIPLICITYcxx . . $ `./templates_on.h:129:9`! * stride * i + k];
163 }
164 }
165 }
166
167 return GSL_SUCCESScxx . . $ GSL_SUCCESS.;
168 }
169
170
171 TYPEcxx . . $ `./templates_on.h:234:9`! (gsl_vector) *
172 FUNCTIONcxx . . $ `./templates_on.h:233:9`! (gsl_vector, alloc_row_from_matrix) (TYPEcxx . . $ `./templates_on.h:234:9`!(gsl_matrix) * m,
173 const size_tcxx . . $ size_t# i)
174 {
175 TYPEcxx . . $ `./templates_on.h:234:9`! (gsl_vector) * v;
176
177 const size_tcxx . . $ size_t# M = m->size1cxx . . $ $anonymous_type_a528b1853546c6a1_0#size1.;
178
179 if (i >= M)
180 {
181 GSL_ERROR_VALcxx . . $ `external/gsl/gsl_errno.h:112:9`! ("row index is out of range", GSL_EINVAL, 0);
182 }
183
184 v = (TYPEcxx . . $ `./templates_on.h:234:9`! (gsl_vector) *) malloccxx . . $ malloc(bfcfa4d6b7f7ef64). (sizeof (TYPEcxx . . $ `./templates_on.h:234:9`! (gsl_vector)));
185
186 if (v == 0)
187 {
188 GSL_ERROR_VALcxx . . $ `external/gsl/gsl_errno.h:112:9`! ("failed to allocate space for vector struct",
189 GSL_ENOMEM, 0);
190 }
191
192 v->datacxx . . $ $anonymous_type_8a20c748c45d8e6_0#data. = m->datacxx . . $ $anonymous_type_a528b1853546c6a1_0#data. + MULTIPLICITYcxx . . $ `./templates_on.h:129:9`! * i * m->tdacxx . . $ $anonymous_type_a528b1853546c6a1_0#tda. ;
193 v->sizecxx . . $ $anonymous_type_8a20c748c45d8e6_0#size. = m->size2cxx . . $ $anonymous_type_a528b1853546c6a1_0#size2.;
194 v->stridecxx . . $ $anonymous_type_8a20c748c45d8e6_0#stride. = 1;
195 v->blockcxx . . $ $anonymous_type_8a20c748c45d8e6_0#block. = 0;
196
197 return v;
198 }
199
200 TYPEcxx . . $ `./templates_on.h:234:9`! (gsl_vector) *
201 FUNCTIONcxx . . $ `./templates_on.h:233:9`! (gsl_vector, alloc_col_from_matrix) (TYPEcxx . . $ `./templates_on.h:234:9`!(gsl_matrix) * m,
202 const size_tcxx . . $ size_t# j)
203 {
204 TYPEcxx . . $ `./templates_on.h:234:9`! (gsl_vector) * v;
205
206 const size_tcxx . . $ size_t# N = m->size2cxx . . $ $anonymous_type_a528b1853546c6a1_0#size2.;
207
208 if (j >= N)
209 {
210 GSL_ERROR_VALcxx . . $ `external/gsl/gsl_errno.h:112:9`! ("column index is out of range", GSL_EINVAL, 0);
211 }
212
213 v = (TYPEcxx . . $ `./templates_on.h:234:9`! (gsl_vector) *) malloccxx . . $ malloc(bfcfa4d6b7f7ef64). (sizeof (TYPEcxx . . $ `./templates_on.h:234:9`! (gsl_vector)));
214
215 if (v == 0)
216 {
217 GSL_ERROR_VALcxx . . $ `external/gsl/gsl_errno.h:112:9`! ("failed to allocate space for vector struct",
218 GSL_ENOMEM, 0);
219 }
220
221 v->datacxx . . $ $anonymous_type_8a20c748c45d8e6_0#data. = m->datacxx . . $ $anonymous_type_a528b1853546c6a1_0#data. + MULTIPLICITYcxx . . $ `./templates_on.h:129:9`! * j ;
222 v->sizecxx . . $ $anonymous_type_8a20c748c45d8e6_0#size. = m->size1cxx . . $ $anonymous_type_a528b1853546c6a1_0#size1.;
223 v->stridecxx . . $ $anonymous_type_8a20c748c45d8e6_0#stride. = m->tdacxx . . $ $anonymous_type_a528b1853546c6a1_0#tda.;
224 v->blockcxx . . $ $anonymous_type_8a20c748c45d8e6_0#block. = 0;
225
226 return v;
227 }
228