Skip to content

Commit 72ff3a8

Browse files
committed
AffinePriv implies TwoWay
1 parent 43e4b3a commit 72ff3a8

File tree

5 files changed

+4
-10
lines changed

5 files changed

+4
-10
lines changed

Changes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +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
1112

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

lib/PDL/Core/pdlaffine.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ pdl_error pdl_writebackdata_affine(pdl_trans *trans) {
1616
/* generated from:
1717
pp_def( 'affine',
1818
P2Child => 1,
19-
TwoWay => 1,
2019
AffinePriv => 1,
2120
GlobalNew => 'affine_new',
2221
OtherPars => 'PDL_Indx offset; PDL_Indx dims[]; PDL_Indx incs[]',

lib/PDL/PP.pm

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1484,6 +1484,7 @@ EOF
14841484
}),
14851485
PDL::PP::Rule::Returns->new("OverloadDocValues", []),
14861486

1487+
PDL::PP::Rule::Returns::One->new('TwoWay', 'AffinePriv', 'AffinePriv => TwoWay'),
14871488
PDL::PP::Rule::Returns->new("TwoWayFlag", "TwoWay", "PDL_ITRANS_TWOWAY"),
14881489
PDL::PP::Rule::Returns::Zero->new("TwoWayFlag"),
14891490
PDL::PP::Rule::Returns->new("DefaultFlowFlag", "DefaultFlow", "PDL_ITRANS_DO_DATAFLOW_ANY"),

lib/PDL/PP.pod

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1708,7 +1708,6 @@ C<EquivPDimExpr> and maybe a C<EquivDimCheck>:
17081708
pp_def(
17091709
'xchg',
17101710
OtherPars => 'PDL_Indx n1; PDL_Indx n2;',
1711-
TwoWay => 1,
17121711
P2Child => 1,
17131712
AffinePriv => 1,
17141713
EquivDimCheck => '
@@ -2589,6 +2588,7 @@ transformation back to the parent when C<BackCode> is supplied.
25892588

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

25932593
=head3 GlobalNew
25942594

@@ -2628,6 +2628,7 @@ first argument's C<copy> method will be used.
26282628
If true, sets in the C<pdl_transvtable> (see L<PDL::Internals>) the
26292629
C<iflags> such as to inform the trans's error checks connected to dataflow.
26302630
As of 2.104, also automatically sets C<Lvalue>.
2631+
As of 2.104, implied by C<AffinePriv>.
26312632

26322633
=head3 Identity
26332634

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-
TwoWay => 1,
14151414
P2Child => 1,
14161415
AffinePriv => 1,
14171416
EquivDimCheck =>pp_line_numbers(__LINE__, <<'EOF'),
@@ -1575,7 +1574,6 @@ EOD
15751574

15761575
pp_def('mv',
15771576
OtherPars => 'PDL_Indx n1; PDL_Indx n2;',
1578-
TwoWay => 1,
15791577
P2Child => 1,
15801578
AffinePriv => 1,
15811579
CHeader => <<'EOF',
@@ -1718,7 +1716,6 @@ in the usual way (-1 = last dim).
17181716
=cut
17191717
EOD
17201718
P2Child => 1,
1721-
TwoWay => 1,
17221719
AffinePriv => 1,
17231720
OtherPars => join('', map "PDL_Indx $_;", qw(nthdim step nlags)),
17241721
RedoDims => pp_line_numbers(__LINE__, <<'EOF'),
@@ -1776,7 +1773,6 @@ is always true (C<m> has to be less than 3).
17761773
=cut
17771774
EOD
17781775
P2Child => 1,
1779-
TwoWay => 1,
17801776
OtherPars => join('', map "PDL_Indx $_;", qw(nthdim nsp)),
17811777
AffinePriv => 1,
17821778
RedoDims => pp_line_numbers(__LINE__, <<'EOF'),
@@ -1850,7 +1846,6 @@ Put some dimensions to a broadcastid.
18501846
$y = $x->broadcastI(0,1,5); # broadcast over dims 1,5 in id 1
18511847
EOD
18521848
P2Child => 1,
1853-
TwoWay => 1,
18541849
AffinePriv => 1,
18551850
OtherPars => "PDL_Indx id; PDL_Indx whichdims[]",
18561851
Comp => 'PDL_Indx nrealwhichdims',
@@ -1930,7 +1925,6 @@ See [TBD Doc] for details and examples.
19301925
=cut
19311926
EOD
19321927
P2Child => 1,
1933-
TwoWay => 1,
19341928
AffinePriv => 1,
19351929
OtherPars => 'PDL_Indx atind;',
19361930
RedoDims => pp_line_numbers(__LINE__, <<'EOF'),
@@ -2333,7 +2327,6 @@ EOD-slice
23332327
PDL_Indx end[$COMP(nargs)];
23342328
',
23352329
AffinePriv => 1,
2336-
TwoWay => 1,
23372330
MakeComp => pp_line_numbers(__LINE__, <<'SLICE-MC'),
23382331
PDL_Indx nargs = 0;
23392332
pdl_slice_args *argsptr = arglist;
@@ -2436,7 +2429,6 @@ EOF
24362429

24372430
pp_def('diagonal',
24382431
P2Child => 1,
2439-
TwoWay => 1,
24402432
AffinePriv => 1,
24412433
OtherPars => 'PDL_Indx whichdims[]',
24422434
MakeComp => pp_line_numbers(__LINE__-1, '

0 commit comments

Comments
 (0)