Skip to content

Commit

Permalink
rename PP flag to CanVaffine, use in less-confusing way
Browse files Browse the repository at this point in the history
  • Loading branch information
mohawk2 committed Feb 9, 2024
1 parent 825b092 commit 602e1a2
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions Basic/Gen/PP.pm
Original file line number Diff line number Diff line change
Expand Up @@ -1482,8 +1482,8 @@ EOD
'if ( $PRIV(bvalflag) ) { ' . $bad . ' } else { ' . $good . '}';
}),

PDL::PP::Rule::Returns::Zero->new("Affine_Ok", "EquivCPOffsCode"),
PDL::PP::Rule::Returns::One->new("Affine_Ok"),
PDL::PP::Rule::Returns::Zero->new("CanVaffine", "EquivCPOffsCode"),
PDL::PP::Rule::Returns::One->new("CanVaffine"),

PDL::PP::Rule::Returns::NULL->new("ReadDataFuncName", "AffinePriv"),
PDL::PP::Rule::Returns::NULL->new("WriteBackDataFuncName", "AffinePriv"),
Expand Down Expand Up @@ -2025,19 +2025,19 @@ EOF
PDL::PP::Rule->new("VTableDef",
["VTableName","ParamStructType","RedoDimsFuncName","ReadDataFuncName",
"WriteBackDataFuncName","FreeFuncName",
"SignatureObj","Affine_Ok","HaveBroadcasting","NoPthread","Name",
"SignatureObj","CanVaffine","HaveBroadcasting","NoPthread","Name",
"GenericTypes","IsAffineFlag","TwoWayFlag","DefaultFlowFlag",
"BadFlag"],
sub {
my($vname,$ptype,$rdname,$rfname,$wfname,$ffname,
$sig,$affine_ok,$havebroadcasting, $noPthreadFlag, $name, $gentypes,
$sig,$canvaffine,$havebroadcasting, $noPthreadFlag, $name, $gentypes,
$affflag, $revflag, $flowflag, $badflag) = @_;
my ($pnames, $pobjs) = ($sig->names_sorted, $sig->objs);
my $nparents = 0 + grep !$pobjs->{$_}->{FlagW}, @$pnames;
my $aff = ($affine_ok ? "PDL_TPDL_VAFFINE_OK" : 0);
my $npdls = scalar @$pnames;
my $join_flags = join(", ",map {$pobjs->{$pnames->[$_]}->{FlagPhys} ?
0 : $aff} 0..$npdls-1) || '0';
my $join_flags = join(", ",
map $canvaffine && !$pobjs->{$pnames->[$_]}->{FlagPhys}
? "PDL_TPDL_VAFFINE_OK" : 0, 0..$npdls-1) || '0';
my @op_flags;
push @op_flags, 'PDL_TRANS_DO_BROADCAST' if $havebroadcasting;
push @op_flags, 'PDL_TRANS_BADPROCESS' if $badflag;
Expand Down

0 comments on commit 602e1a2

Please sign in to comment.