API.pod (PDL-2.082) | : | API.pod (PDL-2.083) | ||
---|---|---|---|---|
skipping to change at line 383 | skipping to change at line 383 | |||
See L<PDL::ParallelCPU> for more information on pthreading. | See L<PDL::ParallelCPU> for more information on pthreading. | |||
B<NB> As of 2.064, it is B<highly recommended> that you do not call | B<NB> As of 2.064, it is B<highly recommended> that you do not call | |||
C<barf> at all in PP code, but instead use C<$CROAK()>. This will return | C<barf> at all in PP code, but instead use C<$CROAK()>. This will return | |||
a C<pdl_error> which will transparently be used to throw the correct | a C<pdl_error> which will transparently be used to throw the correct | |||
exception in Perl code, but can be handled suitably by non-Perl callers. | exception in Perl code, but can be handled suitably by non-Perl callers. | |||
=item * | =item * | |||
safe_indterm | ||||
Checks given offset is within given ndarray's bounds, else throws an | ||||
exception. | ||||
=item * | ||||
converttype | converttype | |||
Used by C<set_datatype> to change an ndarray's type, converting and | Used by C<set_datatype> to change an ndarray's type, converting and | |||
possibly re-allocating the data if a different size. If the ndarray's | possibly re-allocating the data if a different size. If the ndarray's | |||
C<badflag> was set, its C<badvalue> will become the default for the | C<badflag> was set, its C<badvalue> will become the default for the | |||
new type. Bad values will still be bad. | new type. Bad values will still be bad. | |||
=item * | =item * | |||
converttypei_new | converttypei_new | |||
skipping to change at line 537 | skipping to change at line 530 | |||
The latter dispatches on both the destination type and the input | The latter dispatches on both the destination type and the input | |||
"anyval" type. They are intended for retrieving values from, and setting | "anyval" type. They are intended for retrieving values from, and setting | |||
them within, ndarrays. | them within, ndarrays. | |||
As of PDL 2.048, in F<pdlperl.h> there are: | As of PDL 2.048, in F<pdlperl.h> there are: | |||
ANYVAL_FROM_SV(out_anyval, in_SV, use_undefval, forced_type) | ANYVAL_FROM_SV(out_anyval, in_SV, use_undefval, forced_type) | |||
ANYVAL_TO_SV(out_SV, in_anyval) | ANYVAL_TO_SV(out_SV, in_anyval) | |||
Because these are used in the PDL F<typemap.pdl>, you will need to | Because these are used in the PDL F<typemap>, you will need to | |||
include F<pdlperl.h> in any XS file with functions that take or | include F<pdlperl.h> in any XS file with functions that take or | |||
return a C<PDL_Anyval>. | return a C<PDL_Anyval>. | |||
As of 2.083, C<ANYVAL_TO_SV> assigns a value into the passed C<SV*> | ||||
using the Perl API, rather than assigning the given C value to having a | ||||
newly-created C<SV*>, so the caller is responsible for memory-management. | ||||
=head2 Access to PDL operations as C functions | =head2 Access to PDL operations as C functions | |||
As of 2.058, all PDL operations can be accessed from C code in a similar | As of 2.058, all PDL operations can be accessed from C code in a similar | |||
way to XS functions, since that is what the XS functions now call. Each | way to XS functions, since that is what the XS functions now call. Each | |||
module defines various C functions and data-structures for each operation, | module defines various C functions and data-structures for each operation, | |||
as needed to operate as a PDL transformation. The entry point from outside | as needed to operate as a PDL transformation. The entry point from outside | |||
(and from XS functions) is a C function called C<pdl_(operationname)_run>, | (and from XS functions) is a C function called C<pdl_(operationname)_run>, | |||
with a signature derived from its C<Pars> and C<OtherPars>. E.g. | with a signature derived from its C<Pars> and C<OtherPars>. E.g. | |||
# from PDL::Primitive | # from PDL::Primitive | |||
End of changes. 3 change blocks. | ||||
8 lines changed or deleted | 5 lines changed or added |