"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "Basic/Core/Types.pm.PL" between
PDL-2.082.tar.gz and PDL-2.083.tar.gz

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

Types.pm.PL  (PDL-2.082):Types.pm.PL  (PDL-2.083)
skipping to change at line 480 skipping to change at line 480
=head2 typesrtkeys =head2 typesrtkeys
=for ref =for ref
Returns an array of keys of typehash sorted in order of type complexity Returns an array of keys of typehash sorted in order of type complexity
=for example =for example
pdl> @typelist = PDL::Types::typesrtkeys; pdl> @typelist = PDL::Types::typesrtkeys;
pdl> print @typelist; pdl> print @typelist;
PDL_B PDL_S PDL_US PDL_L PDL_IND PDL_LL PDL_F PDL_D PDL_SB PDL_B PDL_S PDL_US PDL_L PDL_UL PDL_IND PDL_ULL PDL_LL PDL_F PDL_D PDL_L
D PDL_CF PDL_CD PDL_CLD
=cut =cut
sub typesrtkeys { @RTKEYS } sub typesrtkeys { @RTKEYS }
=head2 ppdefs =head2 ppdefs
=for ref =for ref
Returns an array of pp symbols for all real types. This informs the Returns an array of pp symbols for all real types. This informs the
default C<GenericTypes> for C<pp_def> functions, making support for default C<GenericTypes> for C<pp_def> functions, making support for
complex types require an "opt-in". complex types require an "opt-in".
=for example =for example
pdl> print PDL::Types::ppdefs pdl> print PDL::Types::ppdefs
B S U L N Q F D A B S U L K N P Q F D E
=cut =cut
my @PPDEFS = map $_->{ppsym}, grep $_->{real}, @HASHES; my @PPDEFS = map $_->{ppsym}, grep $_->{real}, @HASHES;
sub ppdefs { @PPDEFS } sub ppdefs { @PPDEFS }
=head2 ppdefs_complex =head2 ppdefs_complex
=for ref =for ref
Returns an array of pp symbols for all complex types. Returns an array of pp symbols for all complex types.
=for example =for example
pdl> print PDL::Types::ppdefs_complex pdl> print PDL::Types::ppdefs_complex
G C G C H
=cut =cut
my @PPDEFS_CPLX = map $_->{ppsym}, grep !$_->{real}, @HASHES; my @PPDEFS_CPLX = map $_->{ppsym}, grep !$_->{real}, @HASHES;
sub ppdefs_complex { @PPDEFS_CPLX } sub ppdefs_complex { @PPDEFS_CPLX }
=head2 ppdefs_all =head2 ppdefs_all
=for ref =for ref
Returns an array of pp symbols for all types including complex. Returns an array of pp symbols for all types including complex.
=for example =for example
pdl> print PDL::Types::ppdefs_all pdl> print PDL::Types::ppdefs_all
B S U L N Q F D G C A B S U L K N P Q F D E G C H
=cut =cut
my @PPDEFS_ALL = map $_->{ppsym}, @HASHES; my @PPDEFS_ALL = map $_->{ppsym}, @HASHES;
sub ppdefs_all { @PPDEFS_ALL } sub ppdefs_all { @PPDEFS_ALL }
sub typefld { sub typefld {
my ($type,$fld) = @_; my ($type,$fld) = @_;
croak "unknown type $type" unless exists $typehash{$type}; croak "unknown type $type" unless exists $typehash{$type};
croak "unknown field $fld in type $type" croak "unknown field $fld in type $type"
skipping to change at line 602 skipping to change at line 601
Signed 32-bit value. Signed 32-bit value.
=item ULong =item ULong
Unsigned 32-bit value. Unsigned 32-bit value.
=item Indx =item Indx
Signed value, same size as a pointer on the system in use. Signed value, same size as a pointer on the system in use.
=item LongLong
Signed 64-bit value.
=item ULongLong =item ULongLong
Unsigned 64-bit value. Unsigned 64-bit value.
=item LongLong
Signed 64-bit value.
=item Float =item Float
L<IEEE 754|https://en.wikipedia.org/wiki/IEEE_754> single-precision real L<IEEE 754|https://en.wikipedia.org/wiki/IEEE_754> single-precision real
floating-point value. floating-point value.
=item Double =item Double
IEEE 754 double-precision real value. IEEE 754 double-precision real value.
=item LDouble =item LDouble
skipping to change at line 662 skipping to change at line 661
L<type|PDL::Core/type> method. L<type|PDL::Core/type> method.
=over 4 =over 4
=item enum =item enum
Returns the number representing this datatype (see L<get_datatype|PDL::Core/PDL: :get_datatype>). Returns the number representing this datatype (see L<get_datatype|PDL::Core/PDL: :get_datatype>).
=item symbol =item symbol
Returns one of 'PDL_B', 'PDL_S', 'PDL_US', 'PDL_L', 'PDL_IND', 'PDL_LL', Returns one of 'PDL_SB', 'PDL_B', 'PDL_S', 'PDL_US', 'PDL_L',
'PDL_F' or 'PDL_D'. 'PDL_UL', 'PDL_IND', 'PDL_ULL', 'PDL_LL', 'PDL_F', 'PDL_D', 'PDL_LD',
'PDL_CF', 'PDL_CD', or 'PDL_CLD'.
=item ctype =item ctype
Returns the macro used to represent this type in C code (eg 'PDL_Long'). Returns the macro used to represent this type in C code (eg 'PDL_Long').
=item convertfunc =item convertfunc
Synonym for C<ctype>. Synonym for C<ctype>.
=item ppsym =item ppsym
skipping to change at line 809 skipping to change at line 809
sym numval ioname defbval sym numval ioname defbval
), @TYPE_VERBATIM ) { ), @TYPE_VERBATIM ) {
print OUT << "EOS"; print OUT << "EOS";
sub $name { \$_[0][1]{$name}; } sub $name { \$_[0][1]{$name}; }
EOS EOS
} }
print OUT sprintf qq{#line %d "%s"\n}, __LINE__ + 2, 'Basic/Core/Types.pm.PL'; print OUT sprintf qq{#line %d "%s"\n}, __LINE__ + 2, 'Basic/Core/Types.pm.PL';
print OUT <<'!NO!SUBS!'; print OUT <<'!NO!SUBS!';
sub badvalue { sub badvalue {
PDL::_badvalue_int( $_[1], $_[0][0] ); PDL::Bad::_badvalue_int( $_[1], $_[0][0] );
} }
sub orig_badvalue { sub orig_badvalue {
PDL::_default_badvalue_int($_[0][0]); PDL::Bad::_default_badvalue_int($_[0][0]);
} }
# make life a bit easier # make life a bit easier
use overload ( use overload (
'""' => sub { lc $_[0]->shortctype }, '""' => sub { lc $_[0]->shortctype },
"eq" => sub { my ($self, $other, $swap) = @_; ("$self" eq $other); }, "eq" => sub { my ($self, $other, $swap) = @_; ("$self" eq $other); },
"cmp" => sub { my ($self, $other, $swap) = @_; "cmp" => sub { my ($self, $other, $swap) = @_;
$swap ? $other cmp "$self" : "$self" cmp $other; $swap ? $other cmp "$self" : "$self" cmp $other;
}, },
"<=>" => sub { $_[2] ? $_[1][0] <=> $_[0][0] : $_[0][0] <=> $_[1][0] }, "<=>" => sub { $_[2] ? $_[1][0] <=> $_[0][0] : $_[0][0] <=> $_[1][0] },
skipping to change at line 876 skipping to change at line 876
Each type entry has a number of required and optional entry. Each type entry has a number of required and optional entry.
A list of all the entries: A list of all the entries:
=over =over
=item * =item *
identifier identifier
I<Required>. A short sequence of upercase letters that identifies this I<Required>. A short sequence of uppercase letters that identifies this
type uniquely. More than three characters is probably overkill. type uniquely. More than three characters is probably overkill.
=item * =item *
onecharident onecharident
I<Optional>. Only required if the C<identifier> has more than one character. I<Optional>. Only required if the C<identifier> has more than one character.
This should be a unique uppercase character that will be used to reference This should be a unique uppercase character that will be used to reference
this type in PP macro expressions of the C<TBSULFD> type - see L<PDL::PP/$T>. this type in PP macro expressions of the C<TBSULFD> type - see L<PDL::PP/$T>.
 End of changes. 10 change blocks. 
14 lines changed or deleted 15 lines changed or added

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