Skip to content

Commit

Permalink
fix dataflow when vaffine ndarray is between modified and downstream -
Browse files Browse the repository at this point in the history
  • Loading branch information
mohawk2 committed Feb 23, 2024
1 parent b519d28 commit c07933b
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions Basic/Core/pdlapi.c
Original file line number Diff line number Diff line change
Expand Up @@ -774,6 +774,7 @@ pdl_error pdl__make_physical_recprotect(pdl *it, int recurse_count) {
PDL_RETERROR(PDL_err, pdl__make_physvaffine_recprotect(it, recurse_count+1));
if(PDL_VAFFOK(it)) {
PDLDEBUG_f(printf("make_physical: VAFFOK\n"));
PDL_RETERROR(PDL_err, pdl__make_physical_recprotect(it->vafftrans->from, recurse_count+1));
PDL_RETERROR(PDL_err, pdl_readdata_vaffine(it));
PDLDEBUG_f(printf("make_physical turning off anychanged, before="); pdl_dump_flags_fixspace(it->state, 0, PDL_FLAGS_PDL));
it->state &= (~PDL_ANYCHANGED);
Expand Down
1 change: 1 addition & 0 deletions Changes
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
- PP add loop(n=value) idiom to start not at 0
- add whichover, inspired by https://stackoverflow.com/questions/77551179/perl-pdl-indexing-and-which
- random/randsym only produce real data
- fix dataflow when vaffine ndarray is between modified and downstream (#461) - thanks @vadim-160102 for continued reporting

2.085_01 2024-02-10
- test, document PDL::string, make more consistent (#459) - thanks @vadim-160102 for report
Expand Down
3 changes: 2 additions & 1 deletion t/slice.t
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,8 @@ vafftest($all, [[0,1,0],[0,1,0],[0,1,0]], "clumped2 physvaff 1");
$root .= 3;
vafftest($all, [[0,1,0],[1,1,0],[1,1,0]], "root assigned to");
$clumped2->make_physvaffine;
vafftest($all, [[0,1,0],[1,1,0],[0,1,0]], "clumped2 physvaff 2");
vafftest($all, [[0,1,0],[0,1,0],[0,1,0]], "clumped2 physvaff 2");
is "@{$clumped2->unpdl}", "3 3 3 3 3 3 3 3";

# Make sure that vaffining is properly working:
my $y = xvals(5,6,2) + 0.1 * yvals(5,6,2) + 0.01 * zvals(5,6,2);
Expand Down

0 comments on commit c07933b

Please sign in to comment.