| 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 plplot.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_Graphics_PLplot |
|
21
|
|
|
|
|
|
|
extern Core* PDL; /* Structure hold core C functions */ |
|
22
|
|
|
|
|
|
|
#line 23 "pp-plstart.c" |
|
23
|
|
|
|
|
|
|
#include |
|
24
|
|
|
|
|
|
|
#include |
|
25
|
|
|
|
|
|
|
#include |
|
26
|
|
|
|
|
|
|
#include |
|
27
|
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
#ifndef PDL /* this is needed for PDL pre-2.058 */ |
|
29
|
|
|
|
|
|
|
#define PDL PDL_Graphics_PLplot |
|
30
|
|
|
|
|
|
|
Core* PDL = NULL; PDL_COMMENT("Structure hold core C functions") |
|
31
|
|
|
|
|
|
|
#endif |
|
32
|
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
#define PLPTR_DEFINE(t) typedef t *t ## Ptr; typedef t *t ## Ptr__OUT; |
|
34
|
|
|
|
|
|
|
PLPTR_DEFINE(PLcGrid) |
|
35
|
|
|
|
|
|
|
PLPTR_DEFINE(PLcGrid2) |
|
36
|
|
|
|
|
|
|
#define PLPTR_RECEIVE_IN(t, v, v_in) t *v = (t *)v_in; |
|
37
|
|
|
|
|
|
|
#define PLPTR_RECEIVE_SV(v) ((PLPointer) (SvROK(v) ? SvIV((SV*)SvRV(v)) : (IV)NULL)) |
|
38
|
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
#line 1846 "lib/PDL/PP.pm" |
|
40
|
|
|
|
|
|
|
typedef struct pdl_params_plstart { |
|
41
|
|
|
|
|
|
|
#line 42 "pp-plstart.c" |
|
42
|
|
|
|
|
|
|
char *devname; |
|
43
|
|
|
|
|
|
|
} pdl_params_plstart; |
|
44
|
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
#line 1857 "lib/PDL/PP.pm" |
|
47
|
|
|
|
|
|
|
pdl_error pdl_plstart_readdata(pdl_trans *__privtrans) { |
|
48
|
|
|
|
|
|
|
pdl_error PDL_err = {0, NULL, 0}; |
|
49
|
|
|
|
|
|
|
#line 50 "pp-plstart.c" |
|
50
|
0
|
|
|
|
|
|
pdl_params_plstart *__params = __privtrans->params; (void)__params; |
|
51
|
0
|
0
|
|
|
|
|
if (!__privtrans->broadcast.incs) return PDL->make_error(PDL_EUSERERROR, "Error in plstart:" "broadcast.incs NULL"); |
|
52
|
|
|
|
|
|
|
/* broadcastloop declarations */ |
|
53
|
|
|
|
|
|
|
int __brcloopval; |
|
54
|
|
|
|
|
|
|
register PDL_Indx __tind0,__tind1; /* counters along dim */ |
|
55
|
0
|
|
|
|
|
|
register PDL_Indx __tnpdls = __privtrans->broadcast.npdls; |
|
56
|
|
|
|
|
|
|
/* dims here are how many steps along those dims */ |
|
57
|
0
|
|
|
|
|
|
register PDL_Indx __tinc0_nx = PDL_BRC_INC(__privtrans->broadcast.incs,__tnpdls,0,0); |
|
58
|
0
|
|
|
|
|
|
register PDL_Indx __tinc0_ny = PDL_BRC_INC(__privtrans->broadcast.incs,__tnpdls,1,0); |
|
59
|
0
|
|
|
|
|
|
register PDL_Indx __tinc1_nx = PDL_BRC_INC(__privtrans->broadcast.incs,__tnpdls,0,1); |
|
60
|
0
|
|
|
|
|
|
register PDL_Indx __tinc1_ny = PDL_BRC_INC(__privtrans->broadcast.incs,__tnpdls,1,1); |
|
61
|
|
|
|
|
|
|
#define PDL_BROADCASTLOOP_START_plstart_readdata PDL_BROADCASTLOOP_START( \ |
|
62
|
|
|
|
|
|
|
readdata, \ |
|
63
|
|
|
|
|
|
|
__privtrans->broadcast, \ |
|
64
|
|
|
|
|
|
|
__privtrans->vtable, \ |
|
65
|
|
|
|
|
|
|
nx_datap += __offsp[0]; \ |
|
66
|
|
|
|
|
|
|
ny_datap += __offsp[1]; \ |
|
67
|
|
|
|
|
|
|
, \ |
|
68
|
|
|
|
|
|
|
( ,nx_datap += __tinc1_nx - __tinc0_nx * __tdims0 \ |
|
69
|
|
|
|
|
|
|
,ny_datap += __tinc1_ny - __tinc0_ny * __tdims0 \ |
|
70
|
|
|
|
|
|
|
), \ |
|
71
|
|
|
|
|
|
|
( ,nx_datap += __tinc0_nx \ |
|
72
|
|
|
|
|
|
|
,ny_datap += __tinc0_ny \ |
|
73
|
|
|
|
|
|
|
) \ |
|
74
|
|
|
|
|
|
|
) |
|
75
|
|
|
|
|
|
|
#define PDL_BROADCASTLOOP_END_plstart_readdata PDL_BROADCASTLOOP_END( \ |
|
76
|
|
|
|
|
|
|
__privtrans->broadcast, \ |
|
77
|
|
|
|
|
|
|
nx_datap -= __tinc1_nx * __tdims1 + __offsp[0]; \ |
|
78
|
|
|
|
|
|
|
ny_datap -= __tinc1_ny * __tdims1 + __offsp[1]; \ |
|
79
|
|
|
|
|
|
|
) |
|
80
|
|
|
|
|
|
|
#ifndef PDL_DECLARE_PARAMS_plstart_1 |
|
81
|
|
|
|
|
|
|
#define PDL_DECLARE_PARAMS_plstart_1(PDL_TYPE_OP,PDL_PPSYM_OP,PDL_TYPE_PARAM_nx,PDL_PPSYM_PARAM_nx,PDL_TYPE_PARAM_ny,PDL_PPSYM_PARAM_ny) \ |
|
82
|
|
|
|
|
|
|
PDL_DECLARE_PARAMETER(PDL_TYPE_PARAM_nx, nx, (__privtrans->pdls[0]), 1, PDL_PPSYM_PARAM_nx) \ |
|
83
|
|
|
|
|
|
|
PDL_DECLARE_PARAMETER(PDL_TYPE_PARAM_ny, ny, (__privtrans->pdls[1]), 1, PDL_PPSYM_PARAM_ny) |
|
84
|
|
|
|
|
|
|
#endif |
|
85
|
|
|
|
|
|
|
#define PDL_IF_BAD(t,f) f |
|
86
|
0
|
0
|
|
|
|
|
switch (__privtrans->__datatype) { /* Start generic switch */ |
|
87
|
0
|
|
|
|
|
|
case PDL_D: { |
|
88
|
0
|
0
|
|
|
|
|
PDL_DECLARE_PARAMS_plstart_1(PDL_Double,D,PDL_Long,L,PDL_Long,L) |
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
89
|
0
|
0
|
|
|
|
|
PDL_BROADCASTLOOP_START_plstart_readdata {c_plstart(__params->devname,(nx_datap)[0],(ny_datap)[0]);}PDL_BROADCASTLOOP_END_plstart_readdata |
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
90
|
0
|
|
|
|
|
|
} break; |
|
91
|
0
|
|
|
|
|
|
default: return PDL->make_error(PDL_EUSERERROR, "PP INTERNAL ERROR in plstart: unhandled datatype(%d), only handles (D)! PLEASE MAKE A BUG REPORT\n", __privtrans->__datatype); |
|
92
|
|
|
|
|
|
|
} |
|
93
|
|
|
|
|
|
|
#undef PDL_IF_BAD |
|
94
|
0
|
|
|
|
|
|
return PDL_err; |
|
95
|
|
|
|
|
|
|
} |
|
96
|
|
|
|
|
|
|
|
|
97
|
|
|
|
|
|
|
|
|
98
|
|
|
|
|
|
|
#line 1857 "lib/PDL/PP.pm" |
|
99
|
|
|
|
|
|
|
pdl_error pdl_plstart_free(pdl_trans *__privtrans, char destroy) { |
|
100
|
|
|
|
|
|
|
pdl_error PDL_err = {0, NULL, 0}; |
|
101
|
|
|
|
|
|
|
#line 102 "pp-plstart.c" |
|
102
|
0
|
|
|
|
|
|
pdl_params_plstart *__params = __privtrans->params; (void)__params; |
|
103
|
0
|
0
|
|
|
|
|
PDL_FREE_CODE(__privtrans, destroy, free(__params->devname); /* CType.get_free */ |
|
104
|
0
|
|
|
|
|
|
, ) return PDL_err; |
|
105
|
|
|
|
|
|
|
} |
|
106
|
|
|
|
|
|
|
|
|
107
|
|
|
|
|
|
|
static pdl_datatypes pdl_plstart_vtable_gentypes[] = { PDL_D, -1 }; |
|
108
|
|
|
|
|
|
|
static PDL_Indx pdl_plstart_vtable_realdims[] = { 0, 0 }; |
|
109
|
|
|
|
|
|
|
static char *pdl_plstart_vtable_parnames[] = { "nx","ny" }; |
|
110
|
|
|
|
|
|
|
static short pdl_plstart_vtable_parflags[] = { |
|
111
|
|
|
|
|
|
|
PDL_PARAM_ISTYPED, |
|
112
|
|
|
|
|
|
|
PDL_PARAM_ISTYPED |
|
113
|
|
|
|
|
|
|
}; |
|
114
|
|
|
|
|
|
|
static pdl_datatypes pdl_plstart_vtable_partypes[] = { PDL_L, PDL_L }; |
|
115
|
|
|
|
|
|
|
static PDL_Indx pdl_plstart_vtable_realdims_starts[] = { 0, 0 }; |
|
116
|
|
|
|
|
|
|
static PDL_Indx pdl_plstart_vtable_realdims_ind_ids[] = { 0 }; |
|
117
|
|
|
|
|
|
|
static char *pdl_plstart_vtable_indnames[] = { "" }; |
|
118
|
|
|
|
|
|
|
pdl_transvtable pdl_plstart_vtable = { |
|
119
|
|
|
|
|
|
|
PDL_TRANS_DO_BROADCAST|PDL_TRANS_NO_PARALLEL, 0, pdl_plstart_vtable_gentypes, 2, 2, NULL /*CORE21*/, |
|
120
|
|
|
|
|
|
|
pdl_plstart_vtable_realdims, pdl_plstart_vtable_parnames, |
|
121
|
|
|
|
|
|
|
pdl_plstart_vtable_parflags, pdl_plstart_vtable_partypes, |
|
122
|
|
|
|
|
|
|
pdl_plstart_vtable_realdims_starts, pdl_plstart_vtable_realdims_ind_ids, 0, |
|
123
|
|
|
|
|
|
|
0, pdl_plstart_vtable_indnames, |
|
124
|
|
|
|
|
|
|
NULL, pdl_plstart_readdata, NULL, |
|
125
|
|
|
|
|
|
|
pdl_plstart_free, |
|
126
|
|
|
|
|
|
|
sizeof(pdl_params_plstart),"PDL::Graphics::PLplot::plstart" |
|
127
|
|
|
|
|
|
|
}; |
|
128
|
|
|
|
|
|
|
|
|
129
|
|
|
|
|
|
|
|
|
130
|
0
|
|
|
|
|
|
pdl_error pdl_run_plstart(pdl *nx,pdl *ny,char *devname) { |
|
131
|
0
|
|
|
|
|
|
pdl_error PDL_err = {0, NULL, 0}; |
|
132
|
0
|
0
|
|
|
|
|
if (!PDL) return (pdl_error){PDL_EFATAL, "PDL core struct is NULL, can't continue",0}; |
|
133
|
0
|
|
|
|
|
|
pdl_trans *__privtrans = PDL->create_trans(&pdl_plstart_vtable); |
|
134
|
0
|
0
|
|
|
|
|
if (!__privtrans) return PDL->make_error_simple(PDL_EFATAL, "Couldn't create trans"); |
|
135
|
0
|
|
|
|
|
|
pdl_params_plstart *__params = __privtrans->params; |
|
136
|
0
|
|
|
|
|
|
__privtrans->pdls[0] = nx; |
|
137
|
0
|
|
|
|
|
|
__privtrans->pdls[1] = ny; |
|
138
|
0
|
0
|
|
|
|
|
PDL_RETERROR(PDL_err, PDL->type_coerce(__privtrans)); |
|
139
|
0
|
|
|
|
|
|
(__params->devname) = malloc(strlen(devname)+1); strcpy(__params->devname,devname); /* CType.get_copy */ |
|
140
|
0
|
0
|
|
|
|
|
PDL_RETERROR(PDL_err, PDL->make_trans_mutual(__privtrans)); |
|
141
|
0
|
|
|
|
|
|
return PDL_err; |
|
142
|
|
|
|
|
|
|
} |