Skip to content

Commit

Permalink
Merge pull request #20 from moocow-the-bovine/fixups
Browse files Browse the repository at this point in the history
Fixups
  • Loading branch information
moocow-the-bovine authored Jan 3, 2025
2 parents 56a5f2e + 6d21d84 commit 60574f9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 14 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest]
perl-version: ['5.14', '5.20']
perl-version: ['5.16', '5.20']
include:
- perl-version: '5.30'
os: ubuntu-latest
Expand Down
16 changes: 3 additions & 13 deletions CCS/MatrixOps/ccsmatops.pd
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ pp_def
('ccs_matmult2d_sdd',
Pars => ("\n "
.join("\n ",
"$INDX ixa(Two,NnzA); nza(NnzA); missinga();", ## a(M,N) (M~i, N~x): formerly here as a(N,M)
"$INDX ixa(Two=2,NnzA); nza(NnzA); missinga();", ## a(M,N) (M~i, N~x): formerly here as a(N,M)
'b(O,M);', ## b(O,M) (O~z, M~i)
'zc(O);', ## zc(O)
'[o]c(O,N)', ## c(O,N) (O~z, N~x)
Expand All @@ -97,9 +97,6 @@ pp_def

OtherPars => "PDL_Indx sizeN;",
RedoDimsCode => q{
if ($SIZE(Two) != 2)
$CROAK("bogus input dimension Two=%ld for index PDL ixa(Two,NnzA) must be 2", $SIZE(Two));
/*-- we're getting SIZE(N)==1 if c() is passed in as null here too --*/
if ( CCS_PDL_IS_NULL($PDL(c)) )
$SIZE(N) = $COMP(sizeN);
Expand Down Expand Up @@ -159,16 +156,13 @@ pp_def
('ccs_matmult2d_zdd',
Pars => ("\n "
.join("\n ",
"$INDX ixa(Two,NnzA); nza(NnzA);", ## a(M,N) (M~i, N~x)
"$INDX ixa(Two=2,NnzA); nza(NnzA);", ## a(M,N) (M~i, N~x)
'b(O,M);', ## b(O,M) (O~z, M~i)
'[o]c(O,N)', ## c(O,N) (O~z, N~x)
'')),

OtherPars => "PDL_Indx sizeN;",
RedoDimsCode => q{
if ($SIZE(Two) != 2)
$CROAK("bogus input dimension Two=%ld for index PDL ixa(Two,NnzA) must be 2", $SIZE(Two));
/*-- we're getting SIZE(N)==1 if c() is passed in as null here too --*/
if ( CCS_PDL_IS_NULL($PDL(c)) )
$SIZE(N) = $COMP(sizeN);
Expand Down Expand Up @@ -356,7 +350,7 @@ pp_def
('_ccs_vcos_zdd',
Pars => ("\n "
.join("\n ",
"$INDX ixa(Two,NnzA); nza(NnzA);", ##-- logical (M,N)
"$INDX ixa(Two=2,NnzA); nza(NnzA);", ##-- logical (M,N)
"b(N);", ##-- logical (1,N)
"float+ anorm(M);", ##-- dense (required)
"float+ [o]vcos(M);",
Expand All @@ -367,10 +361,6 @@ pp_def
$GENERIC(anorm) bnorm;
$GENERIC(nza) av;
/*-- sanity check: dimension "Two" --*/
if ($SIZE(Two) != 2)
$CROAK("bogus input dimension Two=%ld for index PDL ixa(Two,NnzA) must be 2", $SIZE(Two));
broadcastloop %{
/*-- cache bnorm as \sum_{i=1}^N b[i]**2 --*/
bnorm = 0;
Expand Down

0 comments on commit 60574f9

Please sign in to comment.