Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Accomodate upcoming change in package Matrix (fixes #415) #417

Merged
merged 3 commits into from Jun 5, 2023
Merged

Accomodate upcoming change in package Matrix (fixes #415) #417

merged 3 commits into from Jun 5, 2023

Conversation

jaganmn
Copy link
Contributor

@jaganmn jaganmn commented Jun 4, 2023

Finally got around to working on this. A few comments:

  • Perhaps verify that I haven't introduced whitespace issues. I noticed that my Emacs inserted tabs where the file otherwise had none. Well, I fixed whatever I saw ...
  • Unrelated to the issue, I replaced 5 lines of code repeated throughout the file with a macro. It was too upsetting ...
  • I noticed that in several places you have ncol + 1, where ncol is an int. Note that ncol may take the value INT_MAX and in that case ncol + 1 will overflow. The patch does not attempt to address this.
  • I've used R_alloc somewhere, but maybe that is not idiomatic ... I needed to do a[i]++ and did not feel like checking whether that was legal for a of type IntegerVector rather than int * ...

@eddelbuettel
Copy link
Member

Thanks for the follow-up! I had getting back to you on the TODO list has I was left a little bewildered and lost about what you wanted me to do. Will peruse the PR -- thanks for sending it in!

arma::access::rwp(res.values)); \
} while (0)

DO_RESULT;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Old school :) Maybe we have too much C around R to not let go of macros.

Copy link
Member

@eddelbuettel eddelbuettel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks pretty good, and is actually not code I have been looking at much (all this was part of a nice Google Summer of Code project).

Could you add an entry to the ChangeLog in standard Emacs ChangeLog mode (ie two spaces between date and name, and between name and email?

@eddelbuettel eddelbuettel changed the title fixes #415 Accomodate upcoming change in package Matrix (fixes #415) Jun 4, 2023
Copy link
Member

@eddelbuettel eddelbuettel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@eddelbuettel eddelbuettel merged commit e3cf2d7 into RcppCore:master Jun 5, 2023
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants