Skip to content

Commit a6e7d4b

Browse files
committed
AffinePriv implies P2Child
1 parent 72ff3a8 commit a6e7d4b

File tree

4 files changed

+5
-11
lines changed

4 files changed

+5
-11
lines changed

Changes

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
- add %PDL::{Math,Ops}::got_complex to record whether have complex versions
99
- MatrixOps::svd now handles transpose transparently
1010
- all ops with two-way dataflow now work as lvalues
11-
- AffinePriv now implies TwoWay
11+
- AffinePriv now implies TwoWay and P2Child
1212

1313
2.103 2026-03-03
1414
- fix regression in *linvals so takes ndarrays as start and end again

lib/PDL/PP.pm

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1212,8 +1212,9 @@ $PDL::PP::deftbl =
12121212
'Cannot have both P2Child and GenericTypes defined'),
12131213
PDL::PP::Rule::Croak->new([qw(P2Child Inplace)],
12141214
'Cannot have both P2Child and Inplace defined'),
1215+
PDL::PP::Rule::Returns::One->new('P2Child', 'AffinePriv', 'AffinePriv => P2Child'),
12151216
PDL::PP::Rule->new([qw(Pars HaveBroadcasting GenericTypes DefaultFlow AllFuncHeader RedoDimsFuncHeader)],
1216-
["P2Child","Name","StructName"],
1217+
[qw(P2Child Name StructName)],
12171218
sub {
12181219
my (undef,$name,$sname) = @_;
12191220
("PARENT(); [oca]CHILD();",0,[PDL::Types::ppdefs_all()],1,

lib/PDL/PP.pod

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2588,7 +2588,7 @@ transformation back to the parent when C<BackCode> is supplied.
25882588

25892589
Flag to indicate this is an affine transformation whose C<Priv> (contents
25902590
of the C<pdl_trans>) contains data that will need allocating and freeing.
2591-
As of 2.104, implies C<TwoWay>.
2591+
As of 2.104, implies C<TwoWay> and C<P2Child>.
25922592

25932593
=head3 GlobalNew
25942594

@@ -2603,6 +2603,7 @@ Forces C<Pars> to be C<PARENT> and C<CHILD>, the function's
26032603
C<GenericTypes> to be all of them, no C<HaveBroadcasting> or C<CallCopy>,
26042604
and turns on C<DefaultFlow> (so do not supply any of those args).
26052605
Intended for affine transformations with dataflow.
2606+
As of 2.104, implied by C<AffinePriv>.
26062607

26072608
=head3 DefaultFlow
26082609

lib/PDL/Slices.pd

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1411,7 +1411,6 @@ EOF
14111411

14121412
pp_def('xchg',
14131413
OtherPars => 'PDL_Indx n1; PDL_Indx n2;',
1414-
P2Child => 1,
14151414
AffinePriv => 1,
14161415
EquivDimCheck =>pp_line_numbers(__LINE__, <<'EOF'),
14171416
if ($COMP(n1) <0)
@@ -1574,7 +1573,6 @@ EOD
15741573

15751574
pp_def('mv',
15761575
OtherPars => 'PDL_Indx n1; PDL_Indx n2;',
1577-
P2Child => 1,
15781576
AffinePriv => 1,
15791577
CHeader => <<'EOF',
15801578
#define EQUIVDIM(dima,dimb,cdim,inc) \
@@ -1715,7 +1713,6 @@ negative and will then be counted from the last dim backwards
17151713
in the usual way (-1 = last dim).
17161714
=cut
17171715
EOD
1718-
P2Child => 1,
17191716
AffinePriv => 1,
17201717
OtherPars => join('', map "PDL_Indx $_;", qw(nthdim step nlags)),
17211718
RedoDims => pp_line_numbers(__LINE__, <<'EOF'),
@@ -1772,7 +1769,6 @@ the expression
17721769
is always true (C<m> has to be less than 3).
17731770
=cut
17741771
EOD
1775-
P2Child => 1,
17761772
OtherPars => join('', map "PDL_Indx $_;", qw(nthdim nsp)),
17771773
AffinePriv => 1,
17781774
RedoDims => pp_line_numbers(__LINE__, <<'EOF'),
@@ -1845,7 +1841,6 @@ Put some dimensions to a broadcastid.
18451841

18461842
$y = $x->broadcastI(0,1,5); # broadcast over dims 1,5 in id 1
18471843
EOD
1848-
P2Child => 1,
18491844
AffinePriv => 1,
18501845
OtherPars => "PDL_Indx id; PDL_Indx whichdims[]",
18511846
Comp => 'PDL_Indx nrealwhichdims',
@@ -1924,7 +1919,6 @@ All broadcasted dimensions are made real again.
19241919
See [TBD Doc] for details and examples.
19251920
=cut
19261921
EOD
1927-
P2Child => 1,
19281922
AffinePriv => 1,
19291923
OtherPars => 'PDL_Indx atind;',
19301924
RedoDims => pp_line_numbers(__LINE__, <<'EOF'),
@@ -2304,7 +2298,6 @@ sub PDL::slice :lvalue {
23042298
$o;
23052299
}
23062300
EOD-slice
2307-
P2Child => 1,
23082301
OtherPars => 'pdl_slice_args *arglist;',
23092302
#
23102303
# Comp stash definitions:
@@ -2428,7 +2421,6 @@ EOF
24282421
);
24292422

24302423
pp_def('diagonal',
2431-
P2Child => 1,
24322424
AffinePriv => 1,
24332425
OtherPars => 'PDL_Indx whichdims[]',
24342426
MakeComp => pp_line_numbers(__LINE__-1, '

0 commit comments

Comments
 (0)