Skip to content

Commit

Permalink
Add more changes from Matrix package and update primme package versio…
Browse files Browse the repository at this point in the history
…n number
  • Loading branch information
eromero-vlc committed Sep 30, 2023
1 parent 541d59e commit fc9ff67
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions R/DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
Package: PRIMME
Type: Package
Title: Eigenvalues and Singular Values and Vectors from Large Matrices
Version: 3.2-4
Date: 2023-05-9
Version: 3.2-5
Date: 2023-09-30
Authors@R: c(person("Eloy", "Romero", role=c("aut", "cre"), email="eloy@cs.wm.edu"),
person("Andreas", "Stathopoulos", role="aut", email="andreas@cs.wm.edu"),
person("Lingfei", "Wu", role="aut", email="wuli@us.ibm.com"),
Expand Down
2 changes: 1 addition & 1 deletion R/cran-comments.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
## Changes

* Fix prototype warnings
* Accommodate following changes in Matrix's API

## Test environments
* Ubuntu 20.04, R 4.3 and devel
Expand Down
8 changes: 4 additions & 4 deletions R/src/primmeR.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -550,7 +550,7 @@ void matrixMatvecEigs_CHM_SP(void *x, PRIMME_INT *ldx, void *y, PRIMME_INT *ldy,
{
checkUserInterrupt(primme);

const_CHM_SP chm = (const_CHM_SP)((void**)F::get(primme))[0];
CHM_SP chm = (CHM_SP)((void**)F::get(primme))[0];
ASSERT(chm->nrow == chm->ncol && (PRIMME_INT)chm->nrow == primme->nLocal);

cholmod_dense chx, chy;
Expand All @@ -573,7 +573,7 @@ void matrixMatvecEigs_CHM_SP(void *x, PRIMME_INT *ldx, void *y, PRIMME_INT *ldy,
double ONEf[] = {1.0, 0.0}, ZEROf[] = {0.0, 0.0};
CHM_CM chol_c = (CHM_CM)((void**)F::get(primme))[1];

M_cholmod_sdmult(chm, 0, ONEf, ZEROf, (const_CHM_DN)&chx, &chy, chol_c);
M_cholmod_sdmult(chm, 0, ONEf, ZEROf, (CHM_DN)&chx, &chy, chol_c);

*ierr = 0;
}
Expand Down Expand Up @@ -1114,7 +1114,7 @@ static void matrixMatvecSvds_CHM_SP(void *x, PRIMME_INT *ldx, void *y, PRIMME_IN
{
checkUserInterrupt(primme_svds);

const_CHM_SP chm = (const_CHM_SP)((void**)primme_svds->matrix)[0];
CHM_SP chm = (CHM_SP)((void**)primme_svds->matrix)[0];
ASSERT((PRIMME_INT)chm->nrow == primme_svds->mLocal && (PRIMME_INT)chm->ncol == primme_svds->nLocal);

cholmod_dense chx, chy;
Expand All @@ -1137,7 +1137,7 @@ static void matrixMatvecSvds_CHM_SP(void *x, PRIMME_INT *ldx, void *y, PRIMME_IN
double ONEf[] = {1.0, 0.0}, ZEROf[] = {0.0, 0.0};
CHM_CM chol_c = (CHM_CM)((void**)primme_svds->matrix)[1];

M_cholmod_sdmult(chm, *transpose?1:0, ONEf, ZEROf, (const_CHM_DN)&chx, &chy,
M_cholmod_sdmult(chm, *transpose?1:0, ONEf, ZEROf, (CHM_DN)&chx, &chy,
chol_c);

*ierr = 0;
Expand Down

0 comments on commit fc9ff67

Please sign in to comment.