| 1 |
|
| |
| 2 |
|
| #line 453 "lib/PDL/PP.pm" |
| 3 |
|
| /* |
| 4 |
|
| * THIS FILE WAS GENERATED BY PDL::PP from lib/PDL/Compression.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_Compression |
| 21 |
|
| extern Core* PDL; /* Structure hold core C functions */ |
| 22 |
|
| #line 23 "lib/PDL/Compression-pp-rice_expand.c" |
| 23 |
|
| #include "ricecomp.h" |
| 24 |
|
| |
| 25 |
|
| |
| 26 |
|
| |
| 27 |
|
| #line 1877 "lib/PDL/PP.pm" |
| 28 |
|
| typedef struct pdl_params_rice_expand { |
| 29 |
|
| #line 30 "lib/PDL/Compression-pp-rice_expand.c" |
| 30 |
|
| IV dim0; |
| 31 |
|
| int blocksize; |
| 32 |
|
| } pdl_params_rice_expand; |
| 33 |
|
| |
| 34 |
|
| |
| 35 |
|
| #line 1888 "lib/PDL/PP.pm" |
| 36 |
|
| pdl_error pdl_rice_expand_redodims(pdl_trans *__privtrans) { |
| 37 |
|
| pdl_error PDL_err = {0, NULL, 0}; |
| 38 |
|
| #line 39 "lib/PDL/Compression-pp-rice_expand.c" |
| 39 |
10 |
| pdl_params_rice_expand *__params = __privtrans->params; (void)__params; |
| 40 |
10 |
| __privtrans->ind_sizes[0] = __params->dim0; |
| 41 |
10 |
▶ | PDL_RETERROR(PDL_err, PDL->redodims_default(__privtrans)); |
Branch: 1 branch
| Branch | True | False | Total |
| PDL_RETERROR(PDL_err, PDL->redodims_default(__privtrans)); |
0 |
10 |
10 |
|
| 42 |
10 |
| return PDL_err; |
| 43 |
|
| } |
| 44 |
|
| |
| 45 |
|
| |
| 46 |
|
| #line 1888 "lib/PDL/PP.pm" |
| 47 |
|
| pdl_error pdl_rice_expand_readdata(pdl_trans *__privtrans) { |
| 48 |
|
| pdl_error PDL_err = {0, NULL, 0}; |
| 49 |
|
| #line 50 "lib/PDL/Compression-pp-rice_expand.c" |
| 50 |
10 |
| pdl_params_rice_expand *__params = __privtrans->params; (void)__params; |
| 51 |
10 |
▶ | if (!__privtrans->broadcast.incs) return PDL->make_error(PDL_EUSERERROR, "Error in rice_expand:" "broadcast.incs NULL"); |
Branch: 1 branch
| Branch | True | False | Total |
| if (!__privtrans->broadcast.incs) return PDL->make_error(PDL_EUSERERROR, "Error in rice_expand:" "broadcast.incs NULL"); |
0 |
10 |
10 |
|
| 52 |
|
| /* broadcastloop declarations */ |
| 53 |
|
| int __brcloopval; |
| 54 |
|
| register PDL_Indx __tind0,__tind1; /* counters along dim */ |
| 55 |
10 |
| register PDL_Indx __tnpdls = __privtrans->broadcast.npdls; |
| 56 |
|
| /* dims here are how many steps along those dims */ |
| 57 |
10 |
| register PDL_Indx __tinc0_in = PDL_BRC_INC(__privtrans->broadcast.incs,__tnpdls,0,0); |
| 58 |
10 |
| register PDL_Indx __tinc0_len = PDL_BRC_INC(__privtrans->broadcast.incs,__tnpdls,1,0); |
| 59 |
10 |
| register PDL_Indx __tinc0_out = PDL_BRC_INC(__privtrans->broadcast.incs,__tnpdls,2,0); |
| 60 |
10 |
| register PDL_Indx __tinc1_in = PDL_BRC_INC(__privtrans->broadcast.incs,__tnpdls,0,1); |
| 61 |
10 |
| register PDL_Indx __tinc1_len = PDL_BRC_INC(__privtrans->broadcast.incs,__tnpdls,1,1); |
| 62 |
10 |
| register PDL_Indx __tinc1_out = PDL_BRC_INC(__privtrans->broadcast.incs,__tnpdls,2,1); |
| 63 |
|
| #define PDL_BROADCASTLOOP_START_rice_expand_readdata PDL_BROADCASTLOOP_START( \ |
| 64 |
|
| readdata, \ |
| 65 |
|
| __privtrans->broadcast, \ |
| 66 |
|
| __privtrans->vtable, \ |
| 67 |
|
| in_datap += __offsp[0]; \ |
| 68 |
|
| len_datap += __offsp[1]; \ |
| 69 |
|
| out_datap += __offsp[2]; \ |
| 70 |
|
| , \ |
| 71 |
|
| ( ,in_datap += __tinc1_in - __tinc0_in * __tdims0 \ |
| 72 |
|
| ,len_datap += __tinc1_len - __tinc0_len * __tdims0 \ |
| 73 |
|
| ,out_datap += __tinc1_out - __tinc0_out * __tdims0 \ |
| 74 |
|
| ), \ |
| 75 |
|
| ( ,in_datap += __tinc0_in \ |
| 76 |
|
| ,len_datap += __tinc0_len \ |
| 77 |
|
| ,out_datap += __tinc0_out \ |
| 78 |
|
| ) \ |
| 79 |
|
| ) |
| 80 |
|
| #define PDL_BROADCASTLOOP_END_rice_expand_readdata PDL_BROADCASTLOOP_END( \ |
| 81 |
|
| __privtrans->broadcast, \ |
| 82 |
|
| in_datap -= __tinc1_in * __tdims1 + __offsp[0]; \ |
| 83 |
|
| len_datap -= __tinc1_len * __tdims1 + __offsp[1]; \ |
| 84 |
|
| out_datap -= __tinc1_out * __tdims1 + __offsp[2]; \ |
| 85 |
|
| ) |
| 86 |
10 |
| register PDL_Indx __inc_in_n = __privtrans->inc_sizes[PDL_INC_ID(__privtrans->vtable,0,0)]; (void)__inc_in_n; |
| 87 |
10 |
| register PDL_Indx __inc_out_m = __privtrans->inc_sizes[PDL_INC_ID(__privtrans->vtable,2,0)]; (void)__inc_out_m; |
| 88 |
|
| #ifndef PDL_DECLARE_PARAMS_rice_expand_1 |
| 89 |
|
| #define PDL_DECLARE_PARAMS_rice_expand_1(PDL_TYPE_OP,PDL_PPSYM_OP,PDL_TYPE_PARAM_len,PDL_PPSYM_PARAM_len) \ |
| 90 |
|
| PDL_DECLARE_PARAMETER(PDL_TYPE_OP, in, (__privtrans->pdls[0]), 1, PDL_PPSYM_OP) \ |
| 91 |
|
| PDL_DECLARE_PARAMETER(PDL_TYPE_PARAM_len, len, (__privtrans->pdls[1]), 1, PDL_PPSYM_PARAM_len) \ |
| 92 |
|
| PDL_DECLARE_PARAMETER(PDL_TYPE_OP, out, (__privtrans->pdls[2]), 1, PDL_PPSYM_OP) |
| 93 |
|
| #endif |
| 94 |
|
| #define PDL_IF_BAD(t,f) f |
| 95 |
10 |
| switch (__privtrans->__datatype) { /* Start generic switch */ |
| 96 |
2 |
| case PDL_B: { |
| 97 |
2 |
▶ | PDL_DECLARE_PARAMS_rice_expand_1(PDL_Byte,B,PDL_Indx,N) |
Branch: 9 branches
| Branch | True | False | Total |
| PDL_DECLARE_PARAMS_rice_expand_1(PDL_Byte,B,PDL_Indx,N) |
0 |
2 |
2 |
| PDL_DECLARE_PARAMS_rice_expand_1(PDL_Byte,B,PDL_Indx,N) |
2 |
0 |
2 |
| PDL_DECLARE_PARAMS_rice_expand_1(PDL_Byte,B,PDL_Indx,N) |
0 |
2 |
2 |
| PDL_DECLARE_PARAMS_rice_expand_1(PDL_Byte,B,PDL_Indx,N) |
0 |
2 |
2 |
| PDL_DECLARE_PARAMS_rice_expand_1(PDL_Byte,B,PDL_Indx,N) |
2 |
0 |
2 |
| PDL_DECLARE_PARAMS_rice_expand_1(PDL_Byte,B,PDL_Indx,N) |
0 |
2 |
2 |
| PDL_DECLARE_PARAMS_rice_expand_1(PDL_Byte,B,PDL_Indx,N) |
0 |
2 |
2 |
| PDL_DECLARE_PARAMS_rice_expand_1(PDL_Byte,B,PDL_Indx,N) |
2 |
0 |
2 |
| PDL_DECLARE_PARAMS_rice_expand_1(PDL_Byte,B,PDL_Indx,N) |
0 |
2 |
2 |
|
| 98 |
8 |
▶ | PDL_BROADCASTLOOP_START_rice_expand_readdata {char *err = fits_rdecomp_byte( (void *)in_datap, |
Branch: 7 branches
| Branch | True | False | Total |
| PDL_BROADCASTLOOP_START_rice_expand_readdata {char *err = fits_rdecomp_byte( (void *)in_datap, |
0 |
2 |
2 |
| PDL_BROADCASTLOOP_START_rice_expand_readdata {char *err = fits_rdecomp_byte( (void *)in_datap, |
0 |
2 |
2 |
| PDL_BROADCASTLOOP_START_rice_expand_readdata {char *err = fits_rdecomp_byte( (void *)in_datap, |
0 |
2 |
2 |
| PDL_BROADCASTLOOP_START_rice_expand_readdata {char *err = fits_rdecomp_byte( (void *)in_datap, |
0 |
2 |
2 |
| PDL_BROADCASTLOOP_START_rice_expand_readdata {char *err = fits_rdecomp_byte( (void *)in_datap, |
0 |
2 |
2 |
| PDL_BROADCASTLOOP_START_rice_expand_readdata {char *err = fits_rdecomp_byte( (void *)in_datap, |
2 |
2 |
4 |
| PDL_BROADCASTLOOP_START_rice_expand_readdata {char *err = fits_rdecomp_byte( (void *)in_datap, |
2 |
2 |
4 |
|
| 99 |
2 |
| (len_datap)[0], |
| 100 |
|
| (void *)out_datap, |
| 101 |
2 |
| __privtrans->ind_sizes[0], |
| 102 |
|
| __params->blocksize |
| 103 |
|
| ); |
| 104 |
2 |
▶ | if (err) return PDL->make_error(PDL_EUSERERROR, "Error in rice_expand:" "%s",err); |
Branch: 1 branch
| Branch | True | False | Total |
| if (err) return PDL->make_error(PDL_EUSERERROR, "Error in rice_expand:" "%s",err); |
0 |
2 |
2 |
|
| 105 |
2 |
▶ | }PDL_BROADCASTLOOP_END_rice_expand_readdata |
Branch: 2 branches
| Branch | True | False | Total |
| }PDL_BROADCASTLOOP_END_rice_expand_readdata |
0 |
2 |
2 |
| }PDL_BROADCASTLOOP_END_rice_expand_readdata |
0 |
2 |
2 |
|
| 106 |
2 |
| } break; |
| 107 |
0 |
| case PDL_S: { |
| 108 |
0 |
▶ | PDL_DECLARE_PARAMS_rice_expand_1(PDL_Short,S,PDL_Indx,N) |
Branch: 9 branches
| Branch | True | False | Total |
| PDL_DECLARE_PARAMS_rice_expand_1(PDL_Short,S,PDL_Indx,N) |
0 |
0 |
0 |
| PDL_DECLARE_PARAMS_rice_expand_1(PDL_Short,S,PDL_Indx,N) |
0 |
0 |
0 |
| PDL_DECLARE_PARAMS_rice_expand_1(PDL_Short,S,PDL_Indx,N) |
0 |
0 |
0 |
| PDL_DECLARE_PARAMS_rice_expand_1(PDL_Short,S,PDL_Indx,N) |
0 |
0 |
0 |
| PDL_DECLARE_PARAMS_rice_expand_1(PDL_Short,S,PDL_Indx,N) |
0 |
0 |
0 |
| PDL_DECLARE_PARAMS_rice_expand_1(PDL_Short,S,PDL_Indx,N) |
0 |
0 |
0 |
| PDL_DECLARE_PARAMS_rice_expand_1(PDL_Short,S,PDL_Indx,N) |
0 |
0 |
0 |
| PDL_DECLARE_PARAMS_rice_expand_1(PDL_Short,S,PDL_Indx,N) |
0 |
0 |
0 |
| PDL_DECLARE_PARAMS_rice_expand_1(PDL_Short,S,PDL_Indx,N) |
0 |
0 |
0 |
|
| 109 |
0 |
▶ | PDL_BROADCASTLOOP_START_rice_expand_readdata {char *err = fits_rdecomp_short( (void *)in_datap, |
Branch: 7 branches
| Branch | True | False | Total |
| PDL_BROADCASTLOOP_START_rice_expand_readdata {char *err = fits_rdecomp_short( (void *)in_datap, |
0 |
0 |
0 |
| PDL_BROADCASTLOOP_START_rice_expand_readdata {char *err = fits_rdecomp_short( (void *)in_datap, |
0 |
0 |
0 |
| PDL_BROADCASTLOOP_START_rice_expand_readdata {char *err = fits_rdecomp_short( (void *)in_datap, |
0 |
0 |
0 |
| PDL_BROADCASTLOOP_START_rice_expand_readdata {char *err = fits_rdecomp_short( (void *)in_datap, |
0 |
0 |
0 |
| PDL_BROADCASTLOOP_START_rice_expand_readdata {char *err = fits_rdecomp_short( (void *)in_datap, |
0 |
0 |
0 |
| PDL_BROADCASTLOOP_START_rice_expand_readdata {char *err = fits_rdecomp_short( (void *)in_datap, |
0 |
0 |
0 |
| PDL_BROADCASTLOOP_START_rice_expand_readdata {char *err = fits_rdecomp_short( (void *)in_datap, |
0 |
0 |
0 |
|
| 110 |
0 |
| (len_datap)[0], |
| 111 |
|
| (void *)out_datap, |
| 112 |
0 |
| __privtrans->ind_sizes[0], |
| 113 |
|
| __params->blocksize |
| 114 |
|
| ); |
| 115 |
0 |
▶ | if (err) return PDL->make_error(PDL_EUSERERROR, "Error in rice_expand:" "%s",err); |
Branch: 1 branch
| Branch | True | False | Total |
| if (err) return PDL->make_error(PDL_EUSERERROR, "Error in rice_expand:" "%s",err); |
0 |
0 |
0 |
|
| 116 |
0 |
▶ | }PDL_BROADCASTLOOP_END_rice_expand_readdata |
Branch: 2 branches
| Branch | True | False | Total |
| }PDL_BROADCASTLOOP_END_rice_expand_readdata |
0 |
0 |
0 |
| }PDL_BROADCASTLOOP_END_rice_expand_readdata |
0 |
0 |
0 |
|
| 117 |
0 |
| } break; |
| 118 |
0 |
| case PDL_US: { |
| 119 |
0 |
▶ | PDL_DECLARE_PARAMS_rice_expand_1(PDL_Ushort,U,PDL_Indx,N) |
Branch: 9 branches
| Branch | True | False | Total |
| PDL_DECLARE_PARAMS_rice_expand_1(PDL_Ushort,U,PDL_Indx,N) |
0 |
0 |
0 |
| PDL_DECLARE_PARAMS_rice_expand_1(PDL_Ushort,U,PDL_Indx,N) |
0 |
0 |
0 |
| PDL_DECLARE_PARAMS_rice_expand_1(PDL_Ushort,U,PDL_Indx,N) |
0 |
0 |
0 |
| PDL_DECLARE_PARAMS_rice_expand_1(PDL_Ushort,U,PDL_Indx,N) |
0 |
0 |
0 |
| PDL_DECLARE_PARAMS_rice_expand_1(PDL_Ushort,U,PDL_Indx,N) |
0 |
0 |
0 |
| PDL_DECLARE_PARAMS_rice_expand_1(PDL_Ushort,U,PDL_Indx,N) |
0 |
0 |
0 |
| PDL_DECLARE_PARAMS_rice_expand_1(PDL_Ushort,U,PDL_Indx,N) |
0 |
0 |
0 |
| PDL_DECLARE_PARAMS_rice_expand_1(PDL_Ushort,U,PDL_Indx,N) |
0 |
0 |
0 |
| PDL_DECLARE_PARAMS_rice_expand_1(PDL_Ushort,U,PDL_Indx,N) |
0 |
0 |
0 |
|
| 120 |
0 |
▶ | PDL_BROADCASTLOOP_START_rice_expand_readdata {char *err = fits_rdecomp_short( (void *)in_datap, |
Branch: 7 branches
| Branch | True | False | Total |
| PDL_BROADCASTLOOP_START_rice_expand_readdata {char *err = fits_rdecomp_short( (void *)in_datap, |
0 |
0 |
0 |
| PDL_BROADCASTLOOP_START_rice_expand_readdata {char *err = fits_rdecomp_short( (void *)in_datap, |
0 |
0 |
0 |
| PDL_BROADCASTLOOP_START_rice_expand_readdata {char *err = fits_rdecomp_short( (void *)in_datap, |
0 |
0 |
0 |
| PDL_BROADCASTLOOP_START_rice_expand_readdata {char *err = fits_rdecomp_short( (void *)in_datap, |
0 |
0 |
0 |
| PDL_BROADCASTLOOP_START_rice_expand_readdata {char *err = fits_rdecomp_short( (void *)in_datap, |
0 |
0 |
0 |
| PDL_BROADCASTLOOP_START_rice_expand_readdata {char *err = fits_rdecomp_short( (void *)in_datap, |
0 |
0 |
0 |
| PDL_BROADCASTLOOP_START_rice_expand_readdata {char *err = fits_rdecomp_short( (void *)in_datap, |
0 |
0 |
0 |
|
| 121 |
0 |
| (len_datap)[0], |
| 122 |
|
| (void *)out_datap, |
| 123 |
0 |
| __privtrans->ind_sizes[0], |
| 124 |
|
| __params->blocksize |
| 125 |
|
| ); |
| 126 |
0 |
▶ | if (err) return PDL->make_error(PDL_EUSERERROR, "Error in rice_expand:" "%s",err); |
Branch: 1 branch
| Branch | True | False | Total |
| if (err) return PDL->make_error(PDL_EUSERERROR, "Error in rice_expand:" "%s",err); |
0 |
0 |
0 |
|
| 127 |
0 |
▶ | }PDL_BROADCASTLOOP_END_rice_expand_readdata |
Branch: 2 branches
| Branch | True | False | Total |
| }PDL_BROADCASTLOOP_END_rice_expand_readdata |
0 |
0 |
0 |
| }PDL_BROADCASTLOOP_END_rice_expand_readdata |
0 |
0 |
0 |
|
| 128 |
0 |
| } break; |
| 129 |
8 |
| case PDL_L: { |
| 130 |
8 |
▶ | PDL_DECLARE_PARAMS_rice_expand_1(PDL_Long,L,PDL_Indx,N) |
Branch: 9 branches
| Branch | True | False | Total |
| PDL_DECLARE_PARAMS_rice_expand_1(PDL_Long,L,PDL_Indx,N) |
0 |
8 |
8 |
| PDL_DECLARE_PARAMS_rice_expand_1(PDL_Long,L,PDL_Indx,N) |
8 |
0 |
8 |
| PDL_DECLARE_PARAMS_rice_expand_1(PDL_Long,L,PDL_Indx,N) |
0 |
8 |
8 |
| PDL_DECLARE_PARAMS_rice_expand_1(PDL_Long,L,PDL_Indx,N) |
0 |
8 |
8 |
| PDL_DECLARE_PARAMS_rice_expand_1(PDL_Long,L,PDL_Indx,N) |
8 |
0 |
8 |
| PDL_DECLARE_PARAMS_rice_expand_1(PDL_Long,L,PDL_Indx,N) |
0 |
8 |
8 |
| PDL_DECLARE_PARAMS_rice_expand_1(PDL_Long,L,PDL_Indx,N) |
0 |
8 |
8 |
| PDL_DECLARE_PARAMS_rice_expand_1(PDL_Long,L,PDL_Indx,N) |
8 |
0 |
8 |
| PDL_DECLARE_PARAMS_rice_expand_1(PDL_Long,L,PDL_Indx,N) |
0 |
8 |
8 |
|
| 131 |
3864 |
▶ | PDL_BROADCASTLOOP_START_rice_expand_readdata {char *err = fits_rdecomp( (void *)in_datap, |
Branch: 7 branches
| Branch | True | False | Total |
| PDL_BROADCASTLOOP_START_rice_expand_readdata {char *err = fits_rdecomp( (void *)in_datap, |
0 |
8 |
8 |
| PDL_BROADCASTLOOP_START_rice_expand_readdata {char *err = fits_rdecomp( (void *)in_datap, |
0 |
8 |
8 |
| PDL_BROADCASTLOOP_START_rice_expand_readdata {char *err = fits_rdecomp( (void *)in_datap, |
0 |
8 |
8 |
| PDL_BROADCASTLOOP_START_rice_expand_readdata {char *err = fits_rdecomp( (void *)in_datap, |
0 |
8 |
8 |
| PDL_BROADCASTLOOP_START_rice_expand_readdata {char *err = fits_rdecomp( (void *)in_datap, |
0 |
8 |
8 |
| PDL_BROADCASTLOOP_START_rice_expand_readdata {char *err = fits_rdecomp( (void *)in_datap, |
3840 |
8 |
3848 |
| PDL_BROADCASTLOOP_START_rice_expand_readdata {char *err = fits_rdecomp( (void *)in_datap, |
8 |
8 |
16 |
|
| 132 |
3840 |
| (len_datap)[0], |
| 133 |
|
| (void *)out_datap, |
| 134 |
3840 |
| __privtrans->ind_sizes[0], |
| 135 |
|
| __params->blocksize |
| 136 |
|
| ); |
| 137 |
3840 |
▶ | if (err) return PDL->make_error(PDL_EUSERERROR, "Error in rice_expand:" "%s",err); |
Branch: 1 branch
| Branch | True | False | Total |
| if (err) return PDL->make_error(PDL_EUSERERROR, "Error in rice_expand:" "%s",err); |
0 |
3840 |
3840 |
|
| 138 |
8 |
▶ | }PDL_BROADCASTLOOP_END_rice_expand_readdata |
Branch: 2 branches
| Branch | True | False | Total |
| }PDL_BROADCASTLOOP_END_rice_expand_readdata |
0 |
8 |
8 |
| }PDL_BROADCASTLOOP_END_rice_expand_readdata |
0 |
8 |
8 |
|
| 139 |
8 |
| } break; |
| 140 |
0 |
| default: return PDL->make_error(PDL_EUSERERROR, "PP INTERNAL ERROR in rice_expand: unhandled datatype(%d), only handles (BSUL)! PLEASE MAKE A BUG REPORT\n", __privtrans->__datatype); |
| 141 |
|
| } |
| 142 |
|
| #undef PDL_IF_BAD |
| 143 |
10 |
| return PDL_err; |
| 144 |
|
| } |
| 145 |
|
| |
| 146 |
|
| static pdl_datatypes pdl_rice_expand_vtable_gentypes[] = { PDL_B, PDL_S, PDL_US, PDL_L, -1 }; |
| 147 |
|
| static PDL_Indx pdl_rice_expand_vtable_realdims[] = { 1, 0, 1 }; |
| 148 |
|
| static char *pdl_rice_expand_vtable_parnames[] = { "in","len","out" }; |
| 149 |
|
| static short pdl_rice_expand_vtable_parflags[] = { |
| 150 |
|
| PDL_PARAM_ISPHYS, |
| 151 |
|
| PDL_PARAM_ISTYPED, |
| 152 |
|
| PDL_PARAM_ISCREAT|PDL_PARAM_ISOUT|PDL_PARAM_ISPHYS|PDL_PARAM_ISWRITE |
| 153 |
|
| }; |
| 154 |
|
| static pdl_datatypes pdl_rice_expand_vtable_partypes[] = { -1, PDL_IND, -1 }; |
| 155 |
|
| static PDL_Indx pdl_rice_expand_vtable_realdims_starts[] = { 0, 1, 1 }; |
| 156 |
|
| static PDL_Indx pdl_rice_expand_vtable_realdims_ind_ids[] = { 1, 0 }; |
| 157 |
|
| static char *pdl_rice_expand_vtable_indnames[] = { "m","n" }; |
| 158 |
|
| pdl_transvtable pdl_rice_expand_vtable = { |
| 159 |
|
| PDL_TRANS_DO_BROADCAST|PDL_TRANS_BADIGNORE, 0, pdl_rice_expand_vtable_gentypes, 2, 3, NULL /*CORE21*/, |
| 160 |
|
| pdl_rice_expand_vtable_realdims, pdl_rice_expand_vtable_parnames, |
| 161 |
|
| pdl_rice_expand_vtable_parflags, pdl_rice_expand_vtable_partypes, |
| 162 |
|
| pdl_rice_expand_vtable_realdims_starts, pdl_rice_expand_vtable_realdims_ind_ids, 2, |
| 163 |
|
| 2, pdl_rice_expand_vtable_indnames, |
| 164 |
|
| pdl_rice_expand_redodims, pdl_rice_expand_readdata, NULL, |
| 165 |
|
| NULL, |
| 166 |
|
| sizeof(pdl_params_rice_expand),"PDL::Compression::rice_expand" |
| 167 |
|
| }; |
| 168 |
|
| |
| 169 |
|
| |
| 170 |
10 |
| pdl_error pdl_run_rice_expand(pdl *in,pdl *len,pdl *out,IV dim0,int blocksize) { |
| 171 |
10 |
| pdl_error PDL_err = {0, NULL, 0}; |
| 172 |
10 |
▶ | if (!PDL) return (pdl_error){PDL_EFATAL, "PDL core struct is NULL, can't continue",0}; |
Branch: 1 branch
| Branch | True | False | Total |
| if (!PDL) return (pdl_error){PDL_EFATAL, "PDL core struct is NULL, can't continue",0}; |
0 |
10 |
10 |
|
| 173 |
10 |
| pdl_trans *__privtrans = PDL->create_trans(&pdl_rice_expand_vtable); |
| 174 |
10 |
▶ | if (!__privtrans) return PDL->make_error_simple(PDL_EFATAL, "Couldn't create trans"); |
Branch: 1 branch
| Branch | True | False | Total |
| if (!__privtrans) return PDL->make_error_simple(PDL_EFATAL, "Couldn't create trans"); |
0 |
10 |
10 |
|
| 175 |
10 |
| pdl_params_rice_expand *__params = __privtrans->params; |
| 176 |
10 |
| __privtrans->pdls[0] = in; |
| 177 |
10 |
| __privtrans->pdls[1] = len; |
| 178 |
10 |
| __privtrans->pdls[2] = out; |
| 179 |
10 |
▶ | PDL_RETERROR(PDL_err, PDL->type_coerce(__privtrans)); |
Branch: 1 branch
| Branch | True | False | Total |
| PDL_RETERROR(PDL_err, PDL->type_coerce(__privtrans)); |
0 |
10 |
10 |
|
| 180 |
10 |
| (__params->dim0) = (dim0); /* CType.get_copy */ |
| 181 |
10 |
| (__params->blocksize) = (blocksize); /* CType.get_copy */ |
| 182 |
10 |
▶ | PDL_RETERROR(PDL_err, PDL->make_trans_mutual(__privtrans)); |
Branch: 1 branch
| Branch | True | False | Total |
| PDL_RETERROR(PDL_err, PDL->make_trans_mutual(__privtrans)); |
0 |
10 |
10 |
|
| 183 |
10 |
| return PDL_err; |
| 184 |
|
| } |