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

Use 64-bit rownrs in Dysco #1166

Merged
merged 2 commits into from Mar 16, 2022
Merged

Use 64-bit rownrs in Dysco #1166

merged 2 commits into from Mar 16, 2022

Conversation

gervandiepen
Copy link
Contributor

@gervandiepen gervandiepen commented Feb 22, 2022

The Dysco storage manager has been changed to use 64-bit row numbers.
Furthermore, it has been assured that the array storage is contiguous by using getStorage.

Close #1139

Copy link
Contributor

@aroffringa aroffringa left a comment

Choose a reason for hiding this comment

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

Looks fine to me!

casacore::rownr_t rowNr, casacore::Array<DataType> *dataArr) {
// Make sure array storage is contiguous.
casacore::Bool deleteIt;
DataType* dataPtr = dataArr->getStorage (deleteIt);
Copy link
Contributor

Choose a reason for hiding this comment

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

Sometime in the future, it would be better to do this using a RAII structure. There are all kind of exceptions possible in the code below, which would lead to leaks. Not really directly a concern now, so no changes required, but maybe for a future MR.

casacore::uInt rowNr, casacore::Array<DataType> *dataPtr) {
casacore::rownr_t rowNr, casacore::Array<DataType> *dataArr) {
// Make sure array storage is contiguous.
casacore::Bool deleteIt;
Copy link
Contributor

Choose a reason for hiding this comment

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

Would it be possible to start using just bool for new code?

@gervandiepen gervandiepen merged commit 69fb7b3 into master Mar 16, 2022
@gervandiepen gervandiepen deleted the issue1139-dysco64 branch March 16, 2022 09:26
aroffringa pushed a commit to aroffringa/dysco that referenced this pull request Mar 16, 2022
This merges the changes from casacore/casacore#1166 back to here, and changes a few other things to be in line with casacore.
After merging a new version should be released.
aroffringa pushed a commit to aroffringa/dysco that referenced this pull request Mar 16, 2022
This merges the changes from casacore/casacore#1166 back to here, and changes a few other things to be in line with casacore.
After merging a new version should be released.
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.

Let Dysco support 64-bit rownrs
2 participants