Skip to content

Commit

Permalink
make_trans_mutual to stop setting trans_parent on child if already se…
Browse files Browse the repository at this point in the history
…t - #511
  • Loading branch information
mohawk2 committed Dec 24, 2024
1 parent 59dea4c commit c908cf4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/PDL/Core/pdlapi.c
Original file line number Diff line number Diff line change
Expand Up @@ -732,7 +732,7 @@ pdl_error pdl_make_trans_mutual(pdl_trans *trans)
child->state |= PDL_PARENTDIMSCHANGED | ((trans->flags & PDL_ITRANS_ISAFFINE) ? 0 : PDL_PARENTDATACHANGED);
PDLDEBUG_f(printf("make_trans_mutual after change="); pdl_dump_flags_fixspace(child->state, 0, PDL_FLAGS_PDL));
}
if (dataflow || wasnull[i]) child->trans_parent = trans;
if (!child->trans_parent || wasnull[i]) child->trans_parent = trans;
if (wasnull[i])
child->state = (child->state & ~PDL_NOMYDIMS) | PDL_MYDIMS_TRANS;
}
Expand Down
2 changes: 1 addition & 1 deletion t/core.t
Original file line number Diff line number Diff line change
Expand Up @@ -859,7 +859,7 @@ for ([\&float,\&cfloat,\&cdouble], [\&double,\&cdouble,\&cfloat], [\&ldouble,\&c
is_pdl $o_cmplx, $ct->(0), 'current wrong answer from flowing, supplied output '.$rt->();
}
eval {czip($rt->(3)->flowing, $rt->(2), $ct->(0)->slice(''))};
is $@, '', 'current wrongly no error when supply output with parent to flowing';
is $@, '', 'current wrongly no error when supply output with parent to flowing '.$rt->();
next if !$other_ct;
czip($rt->(3)->flowing, $rt->(2), $o_cmplx = $other_ct->(0));
is_pdl $o_cmplx, $other_ct->(0), 'current wrong answer from flowing, input '.$rt->().', supplied output '.$other_ct->();
Expand Down

0 comments on commit c908cf4

Please sign in to comment.