| 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 lib/PDL/ImageRGB.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_ImageRGB |
|
21
|
|
|
|
|
|
|
extern Core* PDL; /* Structure hold core C functions */ |
|
22
|
|
|
|
|
|
|
#line 23 "lib/PDL/ImageRGB.xs" |
|
23
|
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
#include "pdlppm.h" /* Local decs */ |
|
25
|
|
|
|
|
|
|
pdl_error pdl_run_cquant_c(pdl *a,pdl *b,pdl *c,int psz); |
|
26
|
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
#line 449 "lib/PDL/PP.pm" |
|
28
|
|
|
|
|
|
|
#include "pdlperl.h" |
|
29
|
|
|
|
|
|
|
#line 30 "lib/PDL/ImageRGB.xs" |
|
30
|
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
Core* PDL = NULL; /* Structure hold core C functions */ |
|
32
|
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
MODULE = PDL::ImageRGB PACKAGE = PDL PREFIX=pdl_run_ |
|
34
|
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
PROTOTYPES: DISABLE |
|
36
|
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
void |
|
39
|
|
|
|
|
|
|
pdl_run_cquant_c(a, b=b, c=c, psz=psz) |
|
40
|
|
|
|
|
|
|
SV *b_SV = (items == 4) ? ST(1) : NULL; |
|
41
|
|
|
|
|
|
|
SV *c_SV = (items == 4) ? ST(2) : NULL; |
|
42
|
|
|
|
|
|
|
SV *psz_SV = (items == 4) ? ST(3) : ST(1); |
|
43
|
|
|
|
|
|
|
PREINIT: |
|
44
|
0
|
0
|
|
|
|
|
PDL_XS_PREAMBLE((items == 4) ? 0 : 2); |
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
45
|
0
|
0
|
|
|
|
|
if (!((items == 2) || (items == 4))) |
|
|
|
0
|
|
|
|
|
|
|
46
|
0
|
|
|
|
|
|
croak("Usage: PDL::cquant_c(a,[b],[c],psz) (you may leave [outputs] and values with =defaults out of list)"); |
|
47
|
|
|
|
|
|
|
INPUT: |
|
48
|
|
|
|
|
|
|
pdl *a |
|
49
|
|
|
|
|
|
|
pdl *b=NO_INIT |
|
50
|
|
|
|
|
|
|
pdl *c=NO_INIT |
|
51
|
|
|
|
|
|
|
int psz; { psz = (int)SvIV(psz_SV); } |
|
52
|
|
|
|
|
|
|
PPCODE: |
|
53
|
0
|
0
|
|
|
|
|
if (b_SV) { b = PDL_CORE_(SvPDLV)(b_SV); } else b = PDL_XS_PERLINIT_initsv(b_SV); |
|
|
|
0
|
|
|
|
|
|
|
54
|
0
|
0
|
|
|
|
|
if (c_SV) { c = PDL_CORE_(SvPDLV)(c_SV); } else c = PDL_XS_PERLINIT_initsv(c_SV); |
|
|
|
0
|
|
|
|
|
|
|
55
|
0
|
|
|
|
|
|
PDL->barf_if_error(pdl_run_cquant_c(a,b,c,psz)); |
|
56
|
0
|
0
|
|
|
|
|
PDL_XS_RETURN(ST(0) = b_SV;ST(1) = c_SV) |
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
#line 483 "lib/PDL/PP.pm" |
|
60
|
|
|
|
|
|
|
BOOT: |
|
61
|
|
|
|
|
|
|
/* Get pointer to structure of core shared C routines */ |
|
62
|
|
|
|
|
|
|
/* make sure PDL::Core is loaded */ |
|
63
|
|
|
|
|
|
|
#line 64 "lib/PDL/ImageRGB.xs" |
|
64
|
15
|
|
|
|
|
|
perl_require_pv ("PDL/Core.pm"); /* make sure PDL::Core is loaded */ |
|
65
|
|
|
|
|
|
|
#ifndef aTHX_ |
|
66
|
|
|
|
|
|
|
#define aTHX_ |
|
67
|
|
|
|
|
|
|
#endif |
|
68
|
15
|
50
|
|
|
|
|
if (SvTRUE (ERRSV)) Perl_croak(aTHX_ "%s",SvPV_nolen (ERRSV)); |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
69
|
15
|
|
|
|
|
|
SV* CoreSV = perl_get_sv("PDL::SHARE",FALSE); /* var with core structure */ |
|
70
|
15
|
50
|
|
|
|
|
if (!CoreSV) |
|
71
|
0
|
|
|
|
|
|
Perl_croak(aTHX_ "We require the PDL::Core module, which was not found"); |
|
72
|
15
|
50
|
|
|
|
|
if (!(PDL = INT2PTR(Core*,SvIV( CoreSV )))) /* Core* value */ |
|
73
|
0
|
|
|
|
|
|
Perl_croak(aTHX_ "Got NULL pointer for PDL"); |
|
74
|
15
|
50
|
|
|
|
|
if (PDL->Version != PDL_CORE_VERSION) |
|
75
|
0
|
|
|
|
|
|
Perl_croak(aTHX_ "[PDL->Version: %ld PDL_CORE_VERSION: %ld XS_VERSION: %s] PDL::ImageRGB needs to be recompiled against the newly installed PDL", (long int)PDL->Version, (long int)PDL_CORE_VERSION, XS_VERSION); |