File Coverage

pp-levmar_der_lb_ub.c
Criterion Covered Total %
statement 128 130 98.4
branch 130 248 52.4
condition n/a
subroutine n/a
pod n/a
total 258 378 68.2


line stmt bran cond sub pod time code
1              
2             #line 453 "lib/PDL/PP.pm"
3             /*
4             * THIS FILE WAS GENERATED BY PDL::PP from levmar.pd! Do not modify!
5             */
6              
7             #define PDL_FREE_CODE(trans, destroy, comp_free_code, ntpriv_free_code) \
8             if (destroy) { \
9             comp_free_code \
10             } \
11             if ((trans)->dims_redone) { \
12             ntpriv_free_code \
13             }
14              
15             #include "EXTERN.h"
16             #include "perl.h"
17             #include "XSUB.h"
18             #include "pdl.h"
19             #include "pdlcore.h"
20             #define PDL PDL_Fit_Levmar
21             extern Core* PDL; /* Structure hold core C functions */
22             #line 23 "pp-levmar_der_lb_ub.c"
23              
24             #include
25             #include
26             #include
27             #include
28             #include "pdlperlfunc.h"
29             #include "levmar.h"
30              
31             #line 1846 "lib/PDL/PP.pm"
32             typedef struct pdl_params_levmar_der_lb_ub {
33             #line 34 "pp-levmar_der_lb_ub.c"
34             IV funcn;
35             IV sfuncn;
36             IV jacn;
37             IV sjacn;
38             IV indat;
39             int want_covar;
40             } pdl_params_levmar_der_lb_ub;
41              
42              
43             #line 1857 "lib/PDL/PP.pm"
44             pdl_error pdl_levmar_der_lb_ub_redodims(pdl_trans *__privtrans) {
45             pdl_error PDL_err = {0, NULL, 0};
46             #line 47 "pp-levmar_der_lb_ub.c"
47 10           pdl_params_levmar_der_lb_ub *__params = __privtrans->params; (void)__params;
48 10           __privtrans->ind_sizes[5] = 10;
49             #ifndef PDL_DECLARE_PARAMS_levmar_der_lb_ub_0
50             #define PDL_DECLARE_PARAMS_levmar_der_lb_ub_0(PDL_TYPE_OP,PDL_PPSYM_OP,PDL_TYPE_PARAM_iopts,PDL_PPSYM_PARAM_iopts,PDL_TYPE_PARAM_returnval,PDL_PPSYM_PARAM_returnval) \
51             PDL_DECLARE_PARAMETER(PDL_TYPE_OP, p, (__privtrans->pdls[0]), 0, PDL_PPSYM_OP) \
52             PDL_DECLARE_PARAMETER(PDL_TYPE_OP, x, (__privtrans->pdls[1]), 0, PDL_PPSYM_OP) \
53             PDL_DECLARE_PARAMETER(PDL_TYPE_OP, t, (__privtrans->pdls[2]), 0, PDL_PPSYM_OP) \
54             PDL_DECLARE_PARAMETER(PDL_TYPE_OP, lb, (__privtrans->pdls[3]), 0, PDL_PPSYM_OP) \
55             PDL_DECLARE_PARAMETER(PDL_TYPE_OP, ub, (__privtrans->pdls[4]), 0, PDL_PPSYM_OP) \
56             PDL_DECLARE_PARAMETER(PDL_TYPE_PARAM_iopts, iopts, (__privtrans->pdls[5]), 0, PDL_PPSYM_PARAM_iopts) \
57             PDL_DECLARE_PARAMETER(PDL_TYPE_OP, opts, (__privtrans->pdls[6]), 0, PDL_PPSYM_OP) \
58             PDL_DECLARE_PARAMETER(PDL_TYPE_OP, work, (__privtrans->pdls[7]), 0, PDL_PPSYM_OP) \
59             PDL_DECLARE_PARAMETER(PDL_TYPE_OP, covar, (__privtrans->pdls[8]), 0, PDL_PPSYM_OP) \
60             PDL_DECLARE_PARAMETER(PDL_TYPE_PARAM_returnval, returnval, (__privtrans->pdls[9]), 0, PDL_PPSYM_PARAM_returnval) \
61             PDL_DECLARE_PARAMETER(PDL_TYPE_OP, pout, (__privtrans->pdls[10]), 0, PDL_PPSYM_OP) \
62             PDL_DECLARE_PARAMETER(PDL_TYPE_OP, info, (__privtrans->pdls[11]), 0, PDL_PPSYM_OP)
63             #endif
64             #define PDL_IF_BAD(t,f) f
65 10           switch (__privtrans->__datatype) { /* Start generic switch */
66 3           case PDL_F: {
67 3 50         PDL_DECLARE_PARAMS_levmar_der_lb_ub_0(PDL_Float,F,PDL_Long,L,PDL_Long,L)
    50          
    50          
    50          
    50          
    50          
    50          
    50          
    50          
    50          
    50          
    50          
68             {
69 3           int im = __privtrans->pdls[0]->dims[0];
70 3           int in = __privtrans->pdls[1]->dims[0];
71 3           int min = 2*in + 4*im + in*im + im*im;
72 3           int inw = __privtrans->pdls[7]->dims[0];
73 3           __privtrans->ind_sizes[6] = inw >= min ? inw : min;
74             }
75 3           } break;
76 7           case PDL_D: {
77 7 50         PDL_DECLARE_PARAMS_levmar_der_lb_ub_0(PDL_Double,D,PDL_Long,L,PDL_Long,L)
    50          
    50          
    50          
    50          
    50          
    50          
    50          
    50          
    50          
    50          
    50          
78             {
79 7           int im = __privtrans->pdls[0]->dims[0];
80 7           int in = __privtrans->pdls[1]->dims[0];
81 7           int min = 2*in + 4*im + in*im + im*im;
82 7           int inw = __privtrans->pdls[7]->dims[0];
83 7           __privtrans->ind_sizes[6] = inw >= min ? inw : min;
84             }
85 7           } break;
86 0           default: return PDL->make_error(PDL_EUSERERROR, "PP INTERNAL ERROR in levmar_der_lb_ub: unhandled datatype(%d), only handles (FD)! PLEASE MAKE A BUG REPORT\n", __privtrans->__datatype);
87             }
88             #undef PDL_IF_BAD
89              
90 10 50         PDL_RETERROR(PDL_err, PDL->redodims_default(__privtrans));
91 10           return PDL_err;
92             }
93              
94              
95             #line 1857 "lib/PDL/PP.pm"
96             pdl_error pdl_levmar_der_lb_ub_readdata(pdl_trans *__privtrans) {
97             pdl_error PDL_err = {0, NULL, 0};
98             #line 99 "pp-levmar_der_lb_ub.c"
99 10           pdl_params_levmar_der_lb_ub *__params = __privtrans->params; (void)__params;
100 10           register PDL_Indx __m_size = __privtrans->ind_sizes[1];
101 10 50         if (!__privtrans->broadcast.incs) return PDL->make_error(PDL_EUSERERROR, "Error in levmar_der_lb_ub:" "broadcast.incs NULL");
102             /* broadcastloop declarations */
103             int __brcloopval;
104             register PDL_Indx __tind0,__tind1; /* counters along dim */
105 10           register PDL_Indx __tnpdls = __privtrans->broadcast.npdls;
106             /* dims here are how many steps along those dims */
107 10           register PDL_Indx __tinc0_p = PDL_BRC_INC(__privtrans->broadcast.incs,__tnpdls,0,0);
108 10           register PDL_Indx __tinc0_x = PDL_BRC_INC(__privtrans->broadcast.incs,__tnpdls,1,0);
109 10           register PDL_Indx __tinc0_t = PDL_BRC_INC(__privtrans->broadcast.incs,__tnpdls,2,0);
110 10           register PDL_Indx __tinc0_lb = PDL_BRC_INC(__privtrans->broadcast.incs,__tnpdls,3,0);
111 10           register PDL_Indx __tinc0_ub = PDL_BRC_INC(__privtrans->broadcast.incs,__tnpdls,4,0);
112 10           register PDL_Indx __tinc0_iopts = PDL_BRC_INC(__privtrans->broadcast.incs,__tnpdls,5,0);
113 10           register PDL_Indx __tinc0_opts = PDL_BRC_INC(__privtrans->broadcast.incs,__tnpdls,6,0);
114 10           register PDL_Indx __tinc0_work = PDL_BRC_INC(__privtrans->broadcast.incs,__tnpdls,7,0);
115 10           register PDL_Indx __tinc0_covar = PDL_BRC_INC(__privtrans->broadcast.incs,__tnpdls,8,0);
116 10           register PDL_Indx __tinc0_returnval = PDL_BRC_INC(__privtrans->broadcast.incs,__tnpdls,9,0);
117 10           register PDL_Indx __tinc0_pout = PDL_BRC_INC(__privtrans->broadcast.incs,__tnpdls,10,0);
118 10           register PDL_Indx __tinc0_info = PDL_BRC_INC(__privtrans->broadcast.incs,__tnpdls,11,0);
119 10           register PDL_Indx __tinc1_p = PDL_BRC_INC(__privtrans->broadcast.incs,__tnpdls,0,1);
120 10           register PDL_Indx __tinc1_x = PDL_BRC_INC(__privtrans->broadcast.incs,__tnpdls,1,1);
121 10           register PDL_Indx __tinc1_t = PDL_BRC_INC(__privtrans->broadcast.incs,__tnpdls,2,1);
122 10           register PDL_Indx __tinc1_lb = PDL_BRC_INC(__privtrans->broadcast.incs,__tnpdls,3,1);
123 10           register PDL_Indx __tinc1_ub = PDL_BRC_INC(__privtrans->broadcast.incs,__tnpdls,4,1);
124 10           register PDL_Indx __tinc1_iopts = PDL_BRC_INC(__privtrans->broadcast.incs,__tnpdls,5,1);
125 10           register PDL_Indx __tinc1_opts = PDL_BRC_INC(__privtrans->broadcast.incs,__tnpdls,6,1);
126 10           register PDL_Indx __tinc1_work = PDL_BRC_INC(__privtrans->broadcast.incs,__tnpdls,7,1);
127 10           register PDL_Indx __tinc1_covar = PDL_BRC_INC(__privtrans->broadcast.incs,__tnpdls,8,1);
128 10           register PDL_Indx __tinc1_returnval = PDL_BRC_INC(__privtrans->broadcast.incs,__tnpdls,9,1);
129 10           register PDL_Indx __tinc1_pout = PDL_BRC_INC(__privtrans->broadcast.incs,__tnpdls,10,1);
130 10           register PDL_Indx __tinc1_info = PDL_BRC_INC(__privtrans->broadcast.incs,__tnpdls,11,1);
131             #define PDL_BROADCASTLOOP_START_levmar_der_lb_ub_readdata PDL_BROADCASTLOOP_START( \
132             readdata, \
133             __privtrans->broadcast, \
134             __privtrans->vtable, \
135             p_datap += __offsp[0]; \
136             x_datap += __offsp[1]; \
137             t_datap += __offsp[2]; \
138             lb_datap += __offsp[3]; \
139             ub_datap += __offsp[4]; \
140             iopts_datap += __offsp[5]; \
141             opts_datap += __offsp[6]; \
142             work_datap += __offsp[7]; \
143             covar_datap += __offsp[8]; \
144             returnval_datap += __offsp[9]; \
145             pout_datap += __offsp[10]; \
146             info_datap += __offsp[11]; \
147             , \
148             ( ,p_datap += __tinc1_p - __tinc0_p * __tdims0 \
149             ,x_datap += __tinc1_x - __tinc0_x * __tdims0 \
150             ,t_datap += __tinc1_t - __tinc0_t * __tdims0 \
151             ,lb_datap += __tinc1_lb - __tinc0_lb * __tdims0 \
152             ,ub_datap += __tinc1_ub - __tinc0_ub * __tdims0 \
153             ,iopts_datap += __tinc1_iopts - __tinc0_iopts * __tdims0 \
154             ,opts_datap += __tinc1_opts - __tinc0_opts * __tdims0 \
155             ,work_datap += __tinc1_work - __tinc0_work * __tdims0 \
156             ,covar_datap += __tinc1_covar - __tinc0_covar * __tdims0 \
157             ,returnval_datap += __tinc1_returnval - __tinc0_returnval * __tdims0 \
158             ,pout_datap += __tinc1_pout - __tinc0_pout * __tdims0 \
159             ,info_datap += __tinc1_info - __tinc0_info * __tdims0 \
160             ), \
161             ( ,p_datap += __tinc0_p \
162             ,x_datap += __tinc0_x \
163             ,t_datap += __tinc0_t \
164             ,lb_datap += __tinc0_lb \
165             ,ub_datap += __tinc0_ub \
166             ,iopts_datap += __tinc0_iopts \
167             ,opts_datap += __tinc0_opts \
168             ,work_datap += __tinc0_work \
169             ,covar_datap += __tinc0_covar \
170             ,returnval_datap += __tinc0_returnval \
171             ,pout_datap += __tinc0_pout \
172             ,info_datap += __tinc0_info \
173             ) \
174             )
175             #define PDL_BROADCASTLOOP_END_levmar_der_lb_ub_readdata PDL_BROADCASTLOOP_END( \
176             __privtrans->broadcast, \
177             p_datap -= __tinc1_p * __tdims1 + __offsp[0]; \
178             x_datap -= __tinc1_x * __tdims1 + __offsp[1]; \
179             t_datap -= __tinc1_t * __tdims1 + __offsp[2]; \
180             lb_datap -= __tinc1_lb * __tdims1 + __offsp[3]; \
181             ub_datap -= __tinc1_ub * __tdims1 + __offsp[4]; \
182             iopts_datap -= __tinc1_iopts * __tdims1 + __offsp[5]; \
183             opts_datap -= __tinc1_opts * __tdims1 + __offsp[6]; \
184             work_datap -= __tinc1_work * __tdims1 + __offsp[7]; \
185             covar_datap -= __tinc1_covar * __tdims1 + __offsp[8]; \
186             returnval_datap -= __tinc1_returnval * __tdims1 + __offsp[9]; \
187             pout_datap -= __tinc1_pout * __tdims1 + __offsp[10]; \
188             info_datap -= __tinc1_info * __tdims1 + __offsp[11]; \
189             )
190 10           register PDL_Indx __inc_covar_m0 = __privtrans->inc_sizes[PDL_INC_ID(__privtrans->vtable,8,0)]; (void)__inc_covar_m0;register PDL_Indx __inc_covar_m1 = __privtrans->inc_sizes[PDL_INC_ID(__privtrans->vtable,8,1)]; (void)__inc_covar_m1;
191 10           register PDL_Indx __inc_info_q = __privtrans->inc_sizes[PDL_INC_ID(__privtrans->vtable,11,0)]; (void)__inc_info_q;
192 10           register PDL_Indx __inc_iopts_in = __privtrans->inc_sizes[PDL_INC_ID(__privtrans->vtable,5,0)]; (void)__inc_iopts_in;
193 10           register PDL_Indx __inc_lb_m = __privtrans->inc_sizes[PDL_INC_ID(__privtrans->vtable,3,0)]; (void)__inc_lb_m;
194 10           register PDL_Indx __inc_opts_nopt = __privtrans->inc_sizes[PDL_INC_ID(__privtrans->vtable,6,0)]; (void)__inc_opts_nopt;
195 10           register PDL_Indx __inc_p_m = __privtrans->inc_sizes[PDL_INC_ID(__privtrans->vtable,0,0)]; (void)__inc_p_m;
196 10           register PDL_Indx __inc_pout_m = __privtrans->inc_sizes[PDL_INC_ID(__privtrans->vtable,10,0)]; (void)__inc_pout_m;
197 10           register PDL_Indx __inc_t_nt = __privtrans->inc_sizes[PDL_INC_ID(__privtrans->vtable,2,0)]; (void)__inc_t_nt;
198 10           register PDL_Indx __inc_ub_m = __privtrans->inc_sizes[PDL_INC_ID(__privtrans->vtable,4,0)]; (void)__inc_ub_m;
199 10           register PDL_Indx __inc_work_wn = __privtrans->inc_sizes[PDL_INC_ID(__privtrans->vtable,7,0)]; (void)__inc_work_wn;
200 10           register PDL_Indx __inc_x_n = __privtrans->inc_sizes[PDL_INC_ID(__privtrans->vtable,1,0)]; (void)__inc_x_n;
201             #ifndef PDL_DECLARE_PARAMS_levmar_der_lb_ub_1
202             #define PDL_DECLARE_PARAMS_levmar_der_lb_ub_1(PDL_TYPE_OP,PDL_PPSYM_OP,PDL_TYPE_PARAM_iopts,PDL_PPSYM_PARAM_iopts,PDL_TYPE_PARAM_returnval,PDL_PPSYM_PARAM_returnval) \
203             PDL_DECLARE_PARAMETER(PDL_TYPE_OP, p, (__privtrans->pdls[0]), 1, PDL_PPSYM_OP) \
204             PDL_DECLARE_PARAMETER(PDL_TYPE_OP, x, (__privtrans->pdls[1]), 1, PDL_PPSYM_OP) \
205             PDL_DECLARE_PARAMETER(PDL_TYPE_OP, t, (__privtrans->pdls[2]), 1, PDL_PPSYM_OP) \
206             PDL_DECLARE_PARAMETER(PDL_TYPE_OP, lb, (__privtrans->pdls[3]), 1, PDL_PPSYM_OP) \
207             PDL_DECLARE_PARAMETER(PDL_TYPE_OP, ub, (__privtrans->pdls[4]), 1, PDL_PPSYM_OP) \
208             PDL_DECLARE_PARAMETER(PDL_TYPE_PARAM_iopts, iopts, (__privtrans->pdls[5]), 1, PDL_PPSYM_PARAM_iopts) \
209             PDL_DECLARE_PARAMETER(PDL_TYPE_OP, opts, (__privtrans->pdls[6]), 1, PDL_PPSYM_OP) \
210             PDL_DECLARE_PARAMETER(PDL_TYPE_OP, work, (__privtrans->pdls[7]), 1, PDL_PPSYM_OP) \
211             PDL_DECLARE_PARAMETER(PDL_TYPE_OP, covar, (__privtrans->pdls[8]), 1, PDL_PPSYM_OP) \
212             PDL_DECLARE_PARAMETER(PDL_TYPE_PARAM_returnval, returnval, (__privtrans->pdls[9]), 1, PDL_PPSYM_PARAM_returnval) \
213             PDL_DECLARE_PARAMETER(PDL_TYPE_OP, pout, (__privtrans->pdls[10]), 1, PDL_PPSYM_OP) \
214             PDL_DECLARE_PARAMETER(PDL_TYPE_OP, info, (__privtrans->pdls[11]), 1, PDL_PPSYM_OP)
215             #endif
216             #define PDL_IF_BAD(t,f) f
217 10           switch (__privtrans->__datatype) { /* Start generic switch */
218 3           case PDL_F: {
219 3 50         PDL_DECLARE_PARAMS_levmar_der_lb_ub_1(PDL_Float,F,PDL_Long,L,PDL_Long,L)
    50          
    50          
    50          
    50          
    50          
    50          
    50          
    50          
    50          
    50          
    50          
    50          
    50          
    50          
    50          
    50          
    50          
    50          
    50          
    50          
    50          
    50          
    50          
    50          
    50          
    50          
    50          
    50          
    50          
    50          
    50          
    50          
    50          
    50          
    50          
220             {
221             int * iopts;
222             int maxits;
223 3           void * tfuncn = (void *) __params->funcn;
224 3           void * tsfuncn = (void *) __params->sfuncn;
225             PDL_Float * pcovar;
226             PDL_Float * pwork;
227 3           void * tjacn = (void *) __params->jacn;
228 3           void * tsjacn = (void *) __params->sjacn;;
229 3           DFP *dat = (void *) __params->indat;
230 3           DFP_check( &dat, PDL_F, __privtrans->ind_sizes[1], __privtrans->ind_sizes[2],
231 3           __privtrans->ind_sizes[4], t_datap );
232 12 50         PDL_BROADCASTLOOP_START_levmar_der_lb_ub_readdata
    50          
    50          
    50          
    50          
    100          
    100          
233 15 100         {/* Open m */ PDL_EXPAND2(register PDL_Indx m=0, __m_stop=(__m_size)); for(; m<__m_stop; m+=1) {
234 12           (pout_datap)[0+(__inc_pout_m*(m))] = (p_datap)[0+(__inc_p_m*(m))];
235             }} /* Close m */
236 3           iopts = iopts_datap;
237 3 50         pcovar = __params->want_covar == 1 ? covar_datap : NULL;
238 3           pwork = 0 == 1 ? NULL : work_datap;
239 3           maxits = iopts[0]; /* for clarity. we hope optimized away */
240 3           (returnval_datap)[0] = slevmar_bc_der (
241             tsfuncn , tsjacn,
242 3           pout_datap, x_datap, __privtrans->ind_sizes[1], __privtrans->ind_sizes[2], lb_datap, ub_datap, NULL,
243             maxits, opts_datap, info_datap, pwork, pcovar, dat);
244 3 50         PDL_BROADCASTLOOP_END_levmar_der_lb_ub_readdata
    50          
245             }
246 3           } break;
247 7           case PDL_D: {
248 7 50         PDL_DECLARE_PARAMS_levmar_der_lb_ub_1(PDL_Double,D,PDL_Long,L,PDL_Long,L)
    50          
    50          
    50          
    50          
    50          
    50          
    50          
    50          
    50          
    50          
    50          
    50          
    50          
    50          
    50          
    50          
    50          
    50          
    50          
    50          
    50          
    50          
    50          
    50          
    50          
    50          
    50          
    50          
    50          
    50          
    50          
    50          
    50          
    50          
    50          
249             {
250             int * iopts;
251             int maxits;
252 7           void * tfuncn = (void *) __params->funcn;
253 7           void * tsfuncn = (void *) __params->sfuncn;
254             PDL_Double * pcovar;
255             PDL_Double * pwork;
256 7           void * tjacn = (void *) __params->jacn;
257 7           void * tsjacn = (void *) __params->sjacn;;
258 7           DFP *dat = (void *) __params->indat;
259 7           DFP_check( &dat, PDL_D, __privtrans->ind_sizes[1], __privtrans->ind_sizes[2],
260 7           __privtrans->ind_sizes[4], t_datap );
261 30 50         PDL_BROADCASTLOOP_START_levmar_der_lb_ub_readdata
    50          
    50          
    50          
    50          
    100          
    100          
262 43 100         {/* Open m */ PDL_EXPAND2(register PDL_Indx m=0, __m_stop=(__m_size)); for(; m<__m_stop; m+=1) {
263 34           (pout_datap)[0+(__inc_pout_m*(m))] = (p_datap)[0+(__inc_p_m*(m))];
264             }} /* Close m */
265 9           iopts = iopts_datap;
266 9 50         pcovar = __params->want_covar == 1 ? covar_datap : NULL;
267 9           pwork = 0 == 1 ? NULL : work_datap;
268 9           maxits = iopts[0]; /* for clarity. we hope optimized away */
269 9           (returnval_datap)[0] = dlevmar_bc_der (
270             tfuncn , tjacn,
271 9           pout_datap, x_datap, __privtrans->ind_sizes[1], __privtrans->ind_sizes[2], lb_datap, ub_datap, NULL,
272             maxits, opts_datap, info_datap, pwork, pcovar, dat);
273 7 50         PDL_BROADCASTLOOP_END_levmar_der_lb_ub_readdata
    50          
274             }
275 7           } break;
276 0           default: return PDL->make_error(PDL_EUSERERROR, "PP INTERNAL ERROR in levmar_der_lb_ub: unhandled datatype(%d), only handles (FD)! PLEASE MAKE A BUG REPORT\n", __privtrans->__datatype);
277             }
278             #undef PDL_IF_BAD
279 10           return PDL_err;
280             }
281              
282             static pdl_datatypes pdl_levmar_der_lb_ub_vtable_gentypes[] = { PDL_F, PDL_D, -1 };
283             static PDL_Indx pdl_levmar_der_lb_ub_vtable_realdims[] = { 1, 1, 1, 1, 1, 1, 1, 1, 2, 0, 1, 1 };
284             static char *pdl_levmar_der_lb_ub_vtable_parnames[] = { "p","x","t","lb","ub","iopts","opts","work","covar","returnval","pout","info" };
285             static short pdl_levmar_der_lb_ub_vtable_parflags[] = {
286             0,
287             PDL_PARAM_ISPHYS,
288             PDL_PARAM_ISPHYS,
289             PDL_PARAM_ISPHYS,
290             PDL_PARAM_ISPHYS,
291             PDL_PARAM_ISPHYS|PDL_PARAM_ISTYPED,
292             PDL_PARAM_ISPHYS,
293             PDL_PARAM_ISCREAT|PDL_PARAM_ISPHYS|PDL_PARAM_ISTEMP|PDL_PARAM_ISWRITE,
294             PDL_PARAM_ISCREAT|PDL_PARAM_ISOUT|PDL_PARAM_ISPHYS|PDL_PARAM_ISWRITE,
295             PDL_PARAM_ISCREAT|PDL_PARAM_ISOUT|PDL_PARAM_ISTYPED|PDL_PARAM_ISWRITE,
296             PDL_PARAM_ISCREAT|PDL_PARAM_ISOUT|PDL_PARAM_ISPHYS|PDL_PARAM_ISWRITE,
297             PDL_PARAM_ISCREAT|PDL_PARAM_ISOUT|PDL_PARAM_ISPHYS|PDL_PARAM_ISWRITE
298             };
299             static pdl_datatypes pdl_levmar_der_lb_ub_vtable_partypes[] = { -1, -1, -1, -1, -1, PDL_L, -1, -1, -1, PDL_L, -1, -1 };
300             static PDL_Indx pdl_levmar_der_lb_ub_vtable_realdims_starts[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 10, 10, 11 };
301             static PDL_Indx pdl_levmar_der_lb_ub_vtable_realdims_ind_ids[] = { 1, 2, 4, 1, 1, 0, 3, 6, 1, 1, 1, 5 };
302             static char *pdl_levmar_der_lb_ub_vtable_indnames[] = { "in","m","n","nopt","nt","q","wn" };
303             pdl_transvtable pdl_levmar_der_lb_ub_vtable = {
304             PDL_TRANS_DO_BROADCAST, 0, pdl_levmar_der_lb_ub_vtable_gentypes, 7, 12, NULL /*CORE21*/,
305             pdl_levmar_der_lb_ub_vtable_realdims, pdl_levmar_der_lb_ub_vtable_parnames,
306             pdl_levmar_der_lb_ub_vtable_parflags, pdl_levmar_der_lb_ub_vtable_partypes,
307             pdl_levmar_der_lb_ub_vtable_realdims_starts, pdl_levmar_der_lb_ub_vtable_realdims_ind_ids, 12,
308             7, pdl_levmar_der_lb_ub_vtable_indnames,
309             pdl_levmar_der_lb_ub_redodims, pdl_levmar_der_lb_ub_readdata, NULL,
310             NULL,
311             sizeof(pdl_params_levmar_der_lb_ub),"PDL::Fit::Levmar::levmar_der_lb_ub"
312             };
313              
314              
315 10           pdl_error pdl_run_levmar_der_lb_ub(pdl *p,pdl *x,pdl *t,pdl *lb,pdl *ub,pdl *iopts,pdl *opts,pdl *covar,pdl *returnval,pdl *pout,pdl *info,IV funcn,IV sfuncn,IV jacn,IV sjacn,IV indat,int want_covar) {
316 10           pdl_error PDL_err = {0, NULL, 0};
317 10 50         if (!PDL) return (pdl_error){PDL_EFATAL, "PDL core struct is NULL, can't continue",0};
318 10           pdl_trans *__privtrans = PDL->create_trans(&pdl_levmar_der_lb_ub_vtable);
319 10 50         if (!__privtrans) return PDL->make_error_simple(PDL_EFATAL, "Couldn't create trans");
320 10           pdl_params_levmar_der_lb_ub *__params = __privtrans->params;
321 10           __privtrans->pdls[0] = p;
322 10           __privtrans->pdls[1] = x;
323 10           __privtrans->pdls[2] = t;
324 10           __privtrans->pdls[3] = lb;
325 10           __privtrans->pdls[4] = ub;
326 10           __privtrans->pdls[5] = iopts;
327 10           __privtrans->pdls[6] = opts;
328 10           __privtrans->pdls[8] = covar;
329 10           __privtrans->pdls[9] = returnval;
330 10           __privtrans->pdls[10] = pout;
331 10           __privtrans->pdls[11] = info;
332 10 50         PDL_RETERROR(PDL_err, PDL->type_coerce(__privtrans));
333 10           (__params->funcn) = (funcn); /* CType.get_copy */
334 10           (__params->sfuncn) = (sfuncn); /* CType.get_copy */
335 10           (__params->jacn) = (jacn); /* CType.get_copy */
336 10           (__params->sjacn) = (sjacn); /* CType.get_copy */
337 10           (__params->indat) = (indat); /* CType.get_copy */
338 10           (__params->want_covar) = (want_covar); /* CType.get_copy */
339 10 50         PDL_RETERROR(PDL_err, PDL->make_trans_mutual(__privtrans));
340 10           return PDL_err;
341             }