| 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-plgchr.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 1857 "lib/PDL/PP.pm" |
|
40
|
|
|
|
|
|
|
pdl_error pdl_plgchr_readdata(pdl_trans *__privtrans) { |
|
41
|
|
|
|
|
|
|
pdl_error PDL_err = {0, NULL, 0}; |
|
42
|
|
|
|
|
|
|
#line 43 "pp-plgchr.c" |
|
43
|
13
|
50
|
|
|
|
|
if (!__privtrans->broadcast.incs) return PDL->make_error(PDL_EUSERERROR, "Error in plgchr:" "broadcast.incs NULL"); |
|
44
|
|
|
|
|
|
|
/* broadcastloop declarations */ |
|
45
|
|
|
|
|
|
|
int __brcloopval; |
|
46
|
|
|
|
|
|
|
register PDL_Indx __tind0,__tind1; /* counters along dim */ |
|
47
|
13
|
|
|
|
|
|
register PDL_Indx __tnpdls = __privtrans->broadcast.npdls; |
|
48
|
|
|
|
|
|
|
/* dims here are how many steps along those dims */ |
|
49
|
13
|
|
|
|
|
|
register PDL_Indx __tinc0_p_def = PDL_BRC_INC(__privtrans->broadcast.incs,__tnpdls,0,0); |
|
50
|
13
|
|
|
|
|
|
register PDL_Indx __tinc0_p_ht = PDL_BRC_INC(__privtrans->broadcast.incs,__tnpdls,1,0); |
|
51
|
13
|
|
|
|
|
|
register PDL_Indx __tinc1_p_def = PDL_BRC_INC(__privtrans->broadcast.incs,__tnpdls,0,1); |
|
52
|
13
|
|
|
|
|
|
register PDL_Indx __tinc1_p_ht = PDL_BRC_INC(__privtrans->broadcast.incs,__tnpdls,1,1); |
|
53
|
|
|
|
|
|
|
#define PDL_BROADCASTLOOP_START_plgchr_readdata PDL_BROADCASTLOOP_START( \ |
|
54
|
|
|
|
|
|
|
readdata, \ |
|
55
|
|
|
|
|
|
|
__privtrans->broadcast, \ |
|
56
|
|
|
|
|
|
|
__privtrans->vtable, \ |
|
57
|
|
|
|
|
|
|
p_def_datap += __offsp[0]; \ |
|
58
|
|
|
|
|
|
|
p_ht_datap += __offsp[1]; \ |
|
59
|
|
|
|
|
|
|
, \ |
|
60
|
|
|
|
|
|
|
( ,p_def_datap += __tinc1_p_def - __tinc0_p_def * __tdims0 \ |
|
61
|
|
|
|
|
|
|
,p_ht_datap += __tinc1_p_ht - __tinc0_p_ht * __tdims0 \ |
|
62
|
|
|
|
|
|
|
), \ |
|
63
|
|
|
|
|
|
|
( ,p_def_datap += __tinc0_p_def \ |
|
64
|
|
|
|
|
|
|
,p_ht_datap += __tinc0_p_ht \ |
|
65
|
|
|
|
|
|
|
) \ |
|
66
|
|
|
|
|
|
|
) |
|
67
|
|
|
|
|
|
|
#define PDL_BROADCASTLOOP_END_plgchr_readdata PDL_BROADCASTLOOP_END( \ |
|
68
|
|
|
|
|
|
|
__privtrans->broadcast, \ |
|
69
|
|
|
|
|
|
|
p_def_datap -= __tinc1_p_def * __tdims1 + __offsp[0]; \ |
|
70
|
|
|
|
|
|
|
p_ht_datap -= __tinc1_p_ht * __tdims1 + __offsp[1]; \ |
|
71
|
|
|
|
|
|
|
) |
|
72
|
|
|
|
|
|
|
#ifndef PDL_DECLARE_PARAMS_plgchr_1 |
|
73
|
|
|
|
|
|
|
#define PDL_DECLARE_PARAMS_plgchr_1(PDL_TYPE_OP,PDL_PPSYM_OP,PDL_TYPE_PARAM_p_def,PDL_PPSYM_PARAM_p_def,PDL_TYPE_PARAM_p_ht,PDL_PPSYM_PARAM_p_ht) \ |
|
74
|
|
|
|
|
|
|
PDL_DECLARE_PARAMETER(PDL_TYPE_PARAM_p_def, p_def, (__privtrans->pdls[0]), 1, PDL_PPSYM_PARAM_p_def) \ |
|
75
|
|
|
|
|
|
|
PDL_DECLARE_PARAMETER(PDL_TYPE_PARAM_p_ht, p_ht, (__privtrans->pdls[1]), 1, PDL_PPSYM_PARAM_p_ht) |
|
76
|
|
|
|
|
|
|
#endif |
|
77
|
|
|
|
|
|
|
#define PDL_IF_BAD(t,f) f |
|
78
|
13
|
50
|
|
|
|
|
switch (__privtrans->__datatype) { /* Start generic switch */ |
|
79
|
13
|
|
|
|
|
|
case PDL_D: { |
|
80
|
13
|
50
|
|
|
|
|
PDL_DECLARE_PARAMS_plgchr_1(PDL_Double,D,PDL_Double,D,PDL_Double,D) |
|
|
|
50
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
81
|
52
|
50
|
|
|
|
|
PDL_BROADCASTLOOP_START_plgchr_readdata {c_plgchr(p_def_datap,p_ht_datap);}PDL_BROADCASTLOOP_END_plgchr_readdata |
|
|
|
50
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
82
|
13
|
|
|
|
|
|
} break; |
|
83
|
0
|
|
|
|
|
|
default: return PDL->make_error(PDL_EUSERERROR, "PP INTERNAL ERROR in plgchr: unhandled datatype(%d), only handles (D)! PLEASE MAKE A BUG REPORT\n", __privtrans->__datatype); |
|
84
|
|
|
|
|
|
|
} |
|
85
|
|
|
|
|
|
|
#undef PDL_IF_BAD |
|
86
|
13
|
|
|
|
|
|
return PDL_err; |
|
87
|
|
|
|
|
|
|
} |
|
88
|
|
|
|
|
|
|
|
|
89
|
|
|
|
|
|
|
static pdl_datatypes pdl_plgchr_vtable_gentypes[] = { PDL_D, -1 }; |
|
90
|
|
|
|
|
|
|
static PDL_Indx pdl_plgchr_vtable_realdims[] = { 0, 0 }; |
|
91
|
|
|
|
|
|
|
static char *pdl_plgchr_vtable_parnames[] = { "p_def","p_ht" }; |
|
92
|
|
|
|
|
|
|
static short pdl_plgchr_vtable_parflags[] = { |
|
93
|
|
|
|
|
|
|
PDL_PARAM_ISCREAT|PDL_PARAM_ISOUT|PDL_PARAM_ISPHYS|PDL_PARAM_ISTYPED|PDL_PARAM_ISWRITE, |
|
94
|
|
|
|
|
|
|
PDL_PARAM_ISCREAT|PDL_PARAM_ISOUT|PDL_PARAM_ISPHYS|PDL_PARAM_ISTYPED|PDL_PARAM_ISWRITE |
|
95
|
|
|
|
|
|
|
}; |
|
96
|
|
|
|
|
|
|
static pdl_datatypes pdl_plgchr_vtable_partypes[] = { PDL_D, PDL_D }; |
|
97
|
|
|
|
|
|
|
static PDL_Indx pdl_plgchr_vtable_realdims_starts[] = { 0, 0 }; |
|
98
|
|
|
|
|
|
|
static PDL_Indx pdl_plgchr_vtable_realdims_ind_ids[] = { 0 }; |
|
99
|
|
|
|
|
|
|
static char *pdl_plgchr_vtable_indnames[] = { "" }; |
|
100
|
|
|
|
|
|
|
pdl_transvtable pdl_plgchr_vtable = { |
|
101
|
|
|
|
|
|
|
PDL_TRANS_DO_BROADCAST|PDL_TRANS_NO_PARALLEL, 0, pdl_plgchr_vtable_gentypes, 0, 2, NULL /*CORE21*/, |
|
102
|
|
|
|
|
|
|
pdl_plgchr_vtable_realdims, pdl_plgchr_vtable_parnames, |
|
103
|
|
|
|
|
|
|
pdl_plgchr_vtable_parflags, pdl_plgchr_vtable_partypes, |
|
104
|
|
|
|
|
|
|
pdl_plgchr_vtable_realdims_starts, pdl_plgchr_vtable_realdims_ind_ids, 0, |
|
105
|
|
|
|
|
|
|
0, pdl_plgchr_vtable_indnames, |
|
106
|
|
|
|
|
|
|
NULL, pdl_plgchr_readdata, NULL, |
|
107
|
|
|
|
|
|
|
NULL, |
|
108
|
|
|
|
|
|
|
0,"PDL::Graphics::PLplot::plgchr" |
|
109
|
|
|
|
|
|
|
}; |
|
110
|
|
|
|
|
|
|
|
|
111
|
|
|
|
|
|
|
|
|
112
|
13
|
|
|
|
|
|
pdl_error pdl_run_plgchr(pdl *p_def,pdl *p_ht) { |
|
113
|
13
|
|
|
|
|
|
pdl_error PDL_err = {0, NULL, 0}; |
|
114
|
13
|
50
|
|
|
|
|
if (!PDL) return (pdl_error){PDL_EFATAL, "PDL core struct is NULL, can't continue",0}; |
|
115
|
13
|
|
|
|
|
|
pdl_trans *__privtrans = PDL->create_trans(&pdl_plgchr_vtable); |
|
116
|
13
|
50
|
|
|
|
|
if (!__privtrans) return PDL->make_error_simple(PDL_EFATAL, "Couldn't create trans"); |
|
117
|
13
|
|
|
|
|
|
__privtrans->pdls[0] = p_def; |
|
118
|
13
|
|
|
|
|
|
__privtrans->pdls[1] = p_ht; |
|
119
|
13
|
50
|
|
|
|
|
PDL_RETERROR(PDL_err, PDL->type_coerce(__privtrans)); |
|
120
|
13
|
50
|
|
|
|
|
PDL_RETERROR(PDL_err, PDL->make_trans_mutual(__privtrans)); |
|
121
|
13
|
|
|
|
|
|
return PDL_err; |
|
122
|
|
|
|
|
|
|
} |