PP.pm (PDL-2.076) | : | PP.pm (PDL-2.077) | ||
---|---|---|---|---|
skipping to change at line 2011 | skipping to change at line 2011 | |||
grep !$_->[1], $sig->names_sorted_tuples; | grep !$_->[1], $sig->names_sorted_tuples; | |||
}), | }), | |||
PDL::PP::Rule->new("NewXSRunTrans", ["StructName"], sub { | PDL::PP::Rule->new("NewXSRunTrans", ["StructName"], sub { | |||
my($trans) = @_; | my($trans) = @_; | |||
PDL::PP::pp_line_numbers(__LINE__, | PDL::PP::pp_line_numbers(__LINE__, | |||
"PDL_RETERROR(PDL_err, PDL->make_trans_mutual($trans));\n"); | "PDL_RETERROR(PDL_err, PDL->make_trans_mutual($trans));\n"); | |||
}), | }), | |||
PDL::PP::Rule->new(PDL::PP::Code::make_args("Code"), | PDL::PP::Rule->new(PDL::PP::Code::make_args("Code"), | |||
sub { PDL::PP::Code->new(@_, undef, undef); }), | sub { PDL::PP::Code->new(@_, undef, undef, 1); }), | |||
PDL::PP::Rule->new(PDL::PP::Code::make_args("BackCode"), | PDL::PP::Rule->new(PDL::PP::Code::make_args("BackCode"), | |||
sub { PDL::PP::Code->new(@_, undef, 1); }), | sub { PDL::PP::Code->new(@_, undef, 1, 1); }), | |||
# Compiled representations i.e. what the RunFunc function leaves | # Compiled representations i.e. what the RunFunc function leaves | |||
# in the params structure. By default, copies of the parameters | # in the params structure. By default, copies of the parameters | |||
# but in many cases (e.g. slice) a benefit can be obtained | # but in many cases (e.g. slice) a benefit can be obtained | |||
# by parsing the string in that function. | # by parsing the string in that function. | |||
# If the user wishes to specify their own MakeComp code and Comp content, | # If the user wishes to specify their own MakeComp code and Comp content, | |||
# The next definitions allow this. | # The next definitions allow this. | |||
PDL::PP::Rule->new("CompObj", ["BadFlag","Comp"], | PDL::PP::Rule->new("CompObj", ["BadFlag","Comp"], | |||
sub { PDL::PP::Signature->new('', @_) }), | sub { PDL::PP::Signature->new('', @_) }), | |||
PDL::PP::Rule->new("CompObj", "SignatureObj", sub { @_ }), # provide default | PDL::PP::Rule->new("CompObj", "SignatureObj", sub { @_ }), # provide default | |||
skipping to change at line 2062 | skipping to change at line 2062 | |||
["SignatureObj"], | ["SignatureObj"], | |||
sub { join "\n", sort map $_->get_initdim, $_[0]->dims_values }), | sub { join "\n", sort map $_->get_initdim, $_[0]->dims_values }), | |||
PDL::PP::Rule->new("RedoDimsFuncName", ["Name", \"RedoDims", \"RedoDimsCode", "DimsSetters"], | PDL::PP::Rule->new("RedoDimsFuncName", ["Name", \"RedoDims", \"RedoDimsCode", "DimsSetters"], | |||
sub { (scalar grep $_ && /\S/, @_[1..$#_]) ? "pdl_$_[0]_redodims" : 'NULL' }), | sub { (scalar grep $_ && /\S/, @_[1..$#_]) ? "pdl_$_[0]_redodims" : 'NULL' }), | |||
PDL::PP::Rule::Returns->new("RedoDimsCode", [], | PDL::PP::Rule::Returns->new("RedoDimsCode", [], | |||
'Code that can be inserted to set the size of outp ut ndarrays dynamically based on input ndarrays; is parsed', | 'Code that can be inserted to set the size of outp ut ndarrays dynamically based on input ndarrays; is parsed', | |||
''), | ''), | |||
PDL::PP::Rule->new(PDL::PP::Code::make_args("RedoDimsCode"), | PDL::PP::Rule->new(PDL::PP::Code::make_args("RedoDimsCode"), | |||
'makes the parsed representation from the supplied RedoDimsCode', | 'makes the parsed representation from the supplied RedoDimsCode', | |||
sub { return '' if !$_[0]; PDL::PP::Code->new(@_, 1, undef); }), | sub { return '' if !$_[0]; PDL::PP::Code->new(@_, 1, undef, 0); }), | |||
PDL::PP::Rule->new("RedoDims", | PDL::PP::Rule->new("RedoDims", | |||
["DimsSetters","ParsedRedoDimsCode","DefaultRedoDims"], | ["DimsSetters","ParsedRedoDimsCode","DefaultRedoDims"], | |||
'makes the redodims function from the various bits and pieces', | 'makes the redodims function from the various bits and pieces', | |||
sub { join "\n", grep $_ && /\S/, @_ }), | sub { join "\n", grep $_ && /\S/, @_ }), | |||
PDL::PP::Rule::Returns::EmptyString->new("Priv"), | PDL::PP::Rule::Returns::EmptyString->new("Priv"), | |||
PDL::PP::Rule->new("PrivObj", ["BadFlag","Priv"], | PDL::PP::Rule->new("PrivObj", ["BadFlag","Priv"], | |||
sub { PDL::PP::Signature->new('', @_) }), | sub { PDL::PP::Signature->new('', @_) }), | |||
PDL::PP::Rule->new("NTPrivFreeCode", "PrivObj", sub {$_[0]->getfree("PRIV")}) , | PDL::PP::Rule->new("NTPrivFreeCode", "PrivObj", sub {$_[0]->getfree("PRIV")}) , | |||
End of changes. 3 change blocks. | ||||
3 lines changed or deleted | 3 lines changed or added |