Skip to content

Commit

Permalink
add {Int,Mat}Scalar possibilities
Browse files Browse the repository at this point in the history
  • Loading branch information
mohawk2 committed Dec 16, 2024
1 parent 26ea162 commit 14059c6
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions slatec.pd
Original file line number Diff line number Diff line change
Expand Up @@ -278,6 +278,9 @@ my %KIND2I = (
Mat => ['', sub{"\$P($_[0][2])"}, sub {PDL::Type->new($_[0])->ctype." *"}],
FuncRet => ['', sub {()}, sub {()}],
Integer => ['longlong ', sub{"\$P($_[0][2])"}, sub {"PDL_LongLong *"}],
# scalar for calling C functions
IntScalar => ['longlong ', sub{"\$$_[0][2]()"}, sub {"PDL_LongLong "}],
MatScalar => ['', sub{"\$$_[0][2]()"}, sub {PDL::Type->new($_[0])->ctype." "}],
Logical => ['int ', sub{"\$P($_[0][2])"}, sub {"PDL_Long *"}],
OtherParDim => [\'PDL_LongLong ', intcopy(sub {"dim_$_[0][2]"}, sub {"\$SIZE($_[0][2])"})],
IntVal => [undef, intcopy(sub {$_[0][2]}, sub {$_[0][4]})],
Expand Down Expand Up @@ -350,8 +353,8 @@ sub defslatec {
print <<"ENDDBG" if $debug;
pp_def('$pname',
Pars => '$pars',
OtherPars => '$otherpars',
ArgOrder => [qw(@$argorder)],
OtherPars => '$otherpars',@{[ !$argorder ? '' : "
ArgOrder => [qw(@$argorder)],"]}
Code => '$code',
CHeader => '@cheaders',
GenericTypes => [@{[join ", ", map $_->[0], @talts]}],
Expand Down

0 comments on commit 14059c6

Please # to comment.