"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "Basic/Core/pdlaffine.c" between
PDL-2.076.tar.gz and PDL-2.077.tar.gz

About: PDL (Perl Data Language) aims to turn perl into an efficient numerical language for scientific computing (similar to IDL and MatLab).

pdlaffine.c  (PDL-2.076):pdlaffine.c  (PDL-2.077)
skipping to change at line 36 skipping to change at line 36
poffs -= $PRIV(incs[nd]) * poffs -= $PRIV(incs[nd]) *
$PDL(CHILD)->dims[nd]; $PDL(CHILD)->dims[nd];
} }
} }
}', }',
Doc => undef, # 'internal', Doc => undef, # 'internal',
); );
*/ */
#define COPYDATA(ctype, from_id, to_id) \ #define COPYDATA(ctype, from_id, to_id) \
PDL_DECLARE_PARAMETER_BADVAL(ctype, (trans->vtable->per_pdl_flags[to_id]), to_ PDL_DECLARE_PARAMETER_BADVAL(ctype, (trans->vtable->per_pdl_flags[to_id]), to_
pdl, (trans->pdls[to_id])) \ pdl, (trans->pdls[to_id]), 1) \
PDL_DECLARE_PARAMETER_BADVAL(ctype, (trans->vtable->per_pdl_flags[from_id]), f PDL_DECLARE_PARAMETER_BADVAL(ctype, (trans->vtable->per_pdl_flags[from_id]), f
rom_pdl, (trans->pdls[from_id])) \ rom_pdl, (trans->pdls[from_id]), 1) \
PDL_Indx i, poffs=trans->offs, nd; \ PDL_Indx i, poffs=trans->offs, nd; \
for (i=0; i<trans->pdls[to_id]->nvals ; i++) { \ for (i=0; i<trans->pdls[to_id]->nvals ; i++) { \
to_pdl_physdatap[i] = (trans->bvalflag && from_pdl_physdatap[poffs] == from_ pdl_badval) \ to_pdl_physdatap[i] = (trans->bvalflag && from_pdl_physdatap[poffs] == from_ pdl_badval) \
? to_pdl_badval : from_pdl_physdatap[poffs]; \ ? to_pdl_badval : from_pdl_physdatap[poffs]; \
for (nd=0; nd<trans->pdls[to_id]->ndims ; nd++) { \ for (nd=0; nd<trans->pdls[to_id]->ndims ; nd++) { \
poffs += trans->incs[nd]; \ poffs += trans->incs[nd]; \
if ((nd<trans->pdls[to_id]->ndims -1 && \ if ((nd<trans->pdls[to_id]->ndims -1 && \
(i+1)%trans->pdls[to_id]->dimincs[nd+1]) || \ (i+1)%trans->pdls[to_id]->dimincs[nd+1]) || \
nd == trans->pdls[to_id]->ndims -1) \ nd == trans->pdls[to_id]->ndims -1) \
break; \ break; \
skipping to change at line 249 skipping to change at line 249
? to_pdl ## _badval \ ? to_pdl ## _badval \
: from_pdl ## _physdatap[i]; \ : from_pdl ## _physdatap[i]; \
; \ ; \
} \ } \
} }
pdl_error pdl_converttypei_readdata(pdl_trans *trans) { pdl_error pdl_converttypei_readdata(pdl_trans *trans) {
pdl_error PDL_err = {0, NULL, 0}; pdl_error PDL_err = {0, NULL, 0};
pdl_params_converttypei *params = trans->params; pdl_params_converttypei *params = trans->params;
#define X_OUTER(datatype_out, ctype_out, ...) \ #define X_OUTER(datatype_out, ctype_out, ...) \
PDL_DECLARE_PARAMETER_BADVAL(ctype_out, (trans->vtable->per_pdl_flags[1]), CHI LD, (trans->pdls[1])) \ PDL_DECLARE_PARAMETER_BADVAL(ctype_out, (trans->vtable->per_pdl_flags[1]), CHI LD, (trans->pdls[1]), 1) \
PDL_GENERICSWITCH2(PDL_TYPELIST2_ALL_, trans->__datatype, X_INNER, return pdl_ make_error(PDL_EUSERERROR, "Not a known data type code=%d", trans->__datatype)) PDL_GENERICSWITCH2(PDL_TYPELIST2_ALL_, trans->__datatype, X_INNER, return pdl_ make_error(PDL_EUSERERROR, "Not a known data type code=%d", trans->__datatype))
#define X_INNER(datatype_in, ctype_in, ...) \ #define X_INNER(datatype_in, ctype_in, ...) \
PDL_DECLARE_PARAMETER_BADVAL(ctype_in, (trans->vtable->per_pdl_flags[0]), PARE NT, (trans->pdls[0])) \ PDL_DECLARE_PARAMETER_BADVAL(ctype_in, (trans->vtable->per_pdl_flags[0]), PARE NT, (trans->pdls[0]), 1) \
COPYCONVERT(PARENT, CHILD) COPYCONVERT(PARENT, CHILD)
PDL_GENERICSWITCH(PDL_TYPELIST2_ALL, params->totype, X_OUTER, return pdl_make_ error(PDL_EUSERERROR, "Not a known data type code=%d", params->totype)) PDL_GENERICSWITCH(PDL_TYPELIST2_ALL, params->totype, X_OUTER, return pdl_make_ error(PDL_EUSERERROR, "Not a known data type code=%d", params->totype))
#undef X_INNER #undef X_INNER
return PDL_err; return PDL_err;
} }
pdl_error pdl_converttypei_writebackdata(pdl_trans *trans) { pdl_error pdl_converttypei_writebackdata(pdl_trans *trans) {
pdl_error PDL_err = {0, NULL, 0}; pdl_error PDL_err = {0, NULL, 0};
pdl_params_converttypei *params = trans->params; pdl_params_converttypei *params = trans->params;
#define X_INNER(datatype_in, ctype_in, ...) \ #define X_INNER(datatype_in, ctype_in, ...) \
PDL_DECLARE_PARAMETER_BADVAL(ctype_in, (trans->vtable->per_pdl_flags[0]), PARE NT, (trans->pdls[0])) \ PDL_DECLARE_PARAMETER_BADVAL(ctype_in, (trans->vtable->per_pdl_flags[0]), PARE NT, (trans->pdls[0]), 1) \
COPYCONVERT(CHILD, PARENT) COPYCONVERT(CHILD, PARENT)
PDL_GENERICSWITCH(PDL_TYPELIST2_ALL, params->totype, X_OUTER, return pdl_make_ error(PDL_EUSERERROR, "Not a known data type code=%d", params->totype)) PDL_GENERICSWITCH(PDL_TYPELIST2_ALL, params->totype, X_OUTER, return pdl_make_ error(PDL_EUSERERROR, "Not a known data type code=%d", params->totype))
#undef X_INNER #undef X_INNER
#undef X_OUTER #undef X_OUTER
return PDL_err; return PDL_err;
} }
static pdl_datatypes pdl_converttypei_vtable_gentypes[] = PDL_ALL_GENTYPES; static pdl_datatypes pdl_converttypei_vtable_gentypes[] = PDL_ALL_GENTYPES;
static char pdl_converttypei_vtable_flags[] = { static char pdl_converttypei_vtable_flags[] = {
0, 0 0, 0
 End of changes. 4 change blocks. 
7 lines changed or deleted 7 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)