PP.pod (PDL-2.077) | : | PP.pod (PDL-2.078) | ||
---|---|---|---|---|
skipping to change at line 1664 | skipping to change at line 1664 | |||
of the input ndarray and output ndarray in a 2-element array | of the input ndarray and output ndarray in a 2-element array | |||
reference. This probably isn't needed, but left in for | reference. This probably isn't needed, but left in for | |||
completeness. | completeness. | |||
=back | =back | |||
If bad values are being used, care must be taken to ensure the | If bad values are being used, care must be taken to ensure the | |||
propagation of the badflag when inplace is being used; | propagation of the badflag when inplace is being used; | |||
consider this excerpt from F<Basic/Bad/bad.pd>: | consider this excerpt from F<Basic/Bad/bad.pd>: | |||
pp_def('replacebad',HandleBad => 1, | pp_def('setbadtoval',HandleBad => 1, | |||
Pars => 'a(); [o]b();', | Pars => 'a(); [o]b();', | |||
OtherPars => 'double newval', | OtherPars => 'double newval', | |||
Inplace => 1, | Inplace => 1, | |||
CopyBadStatusCode => | CopyBadStatusCode => | |||
'/* propagate badflag if inplace AND it has changed */ | '/* propagate badflag if inplace AND it has changed */ | |||
if ( a == b && $ISPDLSTATEBAD(a) ) | if ( a == b && $ISPDLSTATEBAD(a) ) | |||
PDL->propagate_badflag( b, 0 ); | PDL->propagate_badflag( b, 0 ); | |||
/* always make sure the output is "good" */ | /* always make sure the output is "good" */ | |||
$SETPDLSTATEGOOD(b); | $SETPDLSTATEGOOD(b); | |||
skipping to change at line 2174 | skipping to change at line 2174 | |||
=head3 Inplace | =head3 Inplace | |||
Mark a function as being able to work inplace. | Mark a function as being able to work inplace. | |||
Inplace => 1 if Pars => 'a(); [o]b();' | Inplace => 1 if Pars => 'a(); [o]b();' | |||
Inplace => ['a'] if Pars => 'a(); b(); [o]c();' | Inplace => ['a'] if Pars => 'a(); b(); [o]c();' | |||
Inplace => ['a','c'] if Pars => 'a(); b(); [o]c(); [o]d();' | Inplace => ['a','c'] if Pars => 'a(); b(); [o]c(); [o]d();' | |||
If bad values are being used, care must be taken to ensure the | If bad values are being used, care must be taken to ensure the | |||
propagation of the badflag when inplace is being used; | propagation of the badflag when inplace is being used; | |||
for instance see the code for C<replacebad> in F<Basic/Bad/bad.pd>. | for instance see the code for C<setbadtoval> in F<Basic/Bad/bad.pd>. | |||
=head3 Doc | =head3 Doc | |||
Used to specify a documentation string in Pod format. See PDL::Doc | Used to specify a documentation string in Pod format. See PDL::Doc | |||
for information on PDL documentation conventions. Note: in | for information on PDL documentation conventions. Note: in | |||
the special case where the PP 'Doc' string is one line this is | the special case where the PP 'Doc' string is one line this is | |||
implicitly used for the quick reference AND the documentation! | implicitly used for the quick reference AND the documentation! | |||
If the Doc field is omitted PP will generate default documentation | If the Doc field is omitted PP will generate default documentation | |||
(after all it knows about the Signature). | (after all it knows about the Signature). | |||
End of changes. 2 change blocks. | ||||
2 lines changed or deleted | 2 lines changed or added |