Skip to content

Commit

Permalink
move Basic/SourceFilter/*.pm to Basic/lib/
Browse files Browse the repository at this point in the history
  • Loading branch information
mohawk2 committed Nov 7, 2024
1 parent 9282bd4 commit ea73c86
Show file tree
Hide file tree
Showing 14 changed files with 34 additions and 160 deletions.
2 changes: 1 addition & 1 deletion Basic/Makefile.PL
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ WriteMakefile(
IO-Misc IO-Pnm IO-Storable
Lib-Compression Lib-FFT Lib-ImageND Lib-ImageRGB
Lib-Transform
SourceFilter Doc
Doc
)],
EXE_FILES => \@exe_files,
clean => { FILES => join ' ',
Expand Down
41 changes: 0 additions & 41 deletions Basic/SourceFilter/Changes

This file was deleted.

30 changes: 0 additions & 30 deletions Basic/SourceFilter/Makefile.PL

This file was deleted.

44 changes: 0 additions & 44 deletions Basic/SourceFilter/example

This file was deleted.

File renamed without changes.
39 changes: 6 additions & 33 deletions Basic/lib/PDL/DeveloperGuide.pod
Original file line number Diff line number Diff line change
Expand Up @@ -144,39 +144,12 @@ resolved.

=head2 Finding the Source

The directory layout in the repository is different from the layout of
a PDL installation. For some modules the .pm files are generated
via PDL::PP, so changes would need to go into their .pd sources.
Here's a table mapping PDL package names to their origin:

| Package | Source file |
|----------------------------------------+---------------------------------|
| PDL | Basic/PDL.pm |
| PDL::Bad | Basic/Bad/bad.pd |
| PDL::Basic | Basic/Core/Basic.pm |
| PDL::Core | Basic/Core/Core.pm |
| PDL::Demos | Demos/Demos.pm |
| PDL::Graphics::TriD | Graphics/TriD/TriD.pm |
| PDL::Graphics::TriD::* | Graphics/TriD/Objects.pm |
| PDL::Graphics::TriD::BoundingBox | Graphics/TriD/TriD.pm |
| PDL::Graphics::TriD::Material | Graphics/TriD/TriD.pm |
| PDL::Graphics::TriD::OneTransformation | Graphics/TriD/TriD.pm |
| PDL::Graphics::TriD::QuaterController | Graphics/TriD/TriD/ArcBall.pm |
| PDL::Graphics::TriD::Scale | Graphics/TriD/TriD.pm |
| PDL::Graphics::TriD::Transformation | Graphics/TriD/TriD.pm |
| PDL::Graphics::TriD::Translation | Graphics/TriD/TriD.pm |
| PDL::IO::FITS | IO/FITS/FITS.pm |
| PDL::IO::Misc | IO/Misc/misc.pd |
| PDL::IO::Pic | IO/Pnm/pnm.pd |
| PDL::IO::Storable | IO/Storable/storable.pd |
| PDL::Lvalue | Basic/Lvalue.pm |
| PDL::Math | Basic/Math/math.pd |
| PDL::MatrixOps | Basic/MatrixOps/matrixops.pd |
| PDL::NiceSlice | Basic/SourceFilter/NiceSlice.pm |
| PDL::Ops | Basic/Ops/ops.pd |
| PDL::Primitive | Basic/Primitive/primitive.pd |
| PDL::Slices | Basic/Slices/slices.pd |
| PDL::Ufunc | Basic/Ufunc/ufunc.pd |
As of 2.096, the directory layout in the repository is largely the
same as in a PDL installation, especially in L<PDL::Basic>.

Where the .pm files are generated via PDL::PP, changes would need
to go into their .pd sources. Use C<git grep Package::Name> to find
them.

=head1 References

Expand Down
20 changes: 20 additions & 0 deletions Basic/SourceFilter/NiceSlice.pm → Basic/lib/PDL/NiceSlice.pm
Original file line number Diff line number Diff line change
Expand Up @@ -482,6 +482,26 @@ PDL::NiceSlice - toward a nicer slicing syntax for PDL
$y = $n(0,0;-|); # squeeze *and* sever
$c = $x(0,3,0;-); # more compact way of saying $x((0),(3),(0))
A longer example:
use PDL::LiteF;
use PDL::NiceSlice;
$x = sequence(10);
print "\n",'source $x'.'((4)) translated -> $x((4))',"\n";
print "Result ",$x((4)),"\n\n";
print 'alternative syntax: $x->'.'((4)) translated -> $x->((4))',"\n\n";
print 'source $x'.'(1:4) .= 2; translated -> $x(1:4) .= 2;',"\n"; # rewritten
($tmp = $x(1:4)) .= 2;
print "Result: $x","\n\n";
# The arglist is split at commas but commas within
# matched brackets are protected. That should allow
# function invocations etc within the arglist:
print '$x'.'(1:end(0,22)) -> $x(1:end(0,22))',"\n\n";
print "recursive invocation is also supported:\n";
print '$x'.'(1,$y'.'(0:22)) -> $x(1,$y(0:22))',"\n\n";
no PDL::NiceSlice; # switches off source filtering
print 'Source $x'.'(1:4) translation -> $x(1:4)',"\n\n"; # should be untouched
=head1 DESCRIPTION
Slicing is a basic, extremely common operation, and PDL's
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
17 changes: 7 additions & 10 deletions MANIFEST
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ Basic/examples/Benchmark/Bench.xs
Basic/examples/Benchmark/Makefile.PL
Basic/examples/Benchmark/README.md
Basic/examples/Benchmark/time.pl
Basic/examples/NiceSlice-local.perldlrc
Basic/examples/PDL-Parallel-threads/barrier-sync.pl
Basic/examples/PDL-Parallel-threads/perl-barrier.pl
Basic/examples/PDL-Parallel-threads/simple-parallelize.pl
Expand Down Expand Up @@ -123,6 +124,10 @@ Basic/lib/PDL/Lvalue.pm
Basic/lib/PDL/MATLAB.pod
Basic/lib/PDL/Matrix.pm
Basic/lib/PDL/Modules.pod
Basic/lib/PDL/NiceSlice.pm
Basic/lib/PDL/NiceSlice/FilterSimple.pm
Basic/lib/PDL/NiceSlice/FilterUtilCall.pm
Basic/lib/PDL/NiceSlice/ModuleCompile.pm
Basic/lib/PDL/Objects.pod
Basic/lib/PDL/Options.pm
Basic/lib/PDL/Parallel/threads.pm
Expand Down Expand Up @@ -188,16 +193,6 @@ Basic/script/perldl
Basic/script/pptemplate
Basic/Slices/Makefile.PL
Basic/Slices/slices.pd
Basic/SourceFilter/Changes
Basic/SourceFilter/example
Basic/SourceFilter/FilterSimple.pm
Basic/SourceFilter/FilterUtilCall.pm
Basic/SourceFilter/local.perldlrc
Basic/SourceFilter/Makefile.PL
Basic/SourceFilter/ModuleCompile.pm
Basic/SourceFilter/NiceSlice.pm
Basic/SourceFilter/t/niceslice-utilcall.t
Basic/SourceFilter/t/niceslice.t
Basic/t/00-report-prereqs.t
Basic/t/01-pptest.t
Basic/t/autoload.t
Expand Down Expand Up @@ -227,6 +222,8 @@ Basic/t/math.t
Basic/t/matrix.t
Basic/t/matrixops.t
Basic/t/nat_complex.t
Basic/t/niceslice-utilcall.t
Basic/t/niceslice.t
Basic/t/ops-bitwise.t
Basic/t/ops.t
Basic/t/pdl_from_string.t
Expand Down
1 change: 0 additions & 1 deletion Makefile.PL
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,6 @@ sub coretarget {
],
[
core => [
[ [ qw(Basic SourceFilter) ], [ qw(pm_to_blib) ], ],
map [
[ 'Basic', $_ ],
[ qw(pure_all) ],
Expand Down

0 comments on commit ea73c86

Please sign in to comment.