Skip to content
This repository was archived by the owner on Feb 26, 2025. It is now read-only.

Conversation

@1uc
Copy link
Collaborator

@1uc 1uc commented May 6, 2024

These methods allow reshaping the memory space. This can be used as
an alternative to broadcasting.

Example:

Let dset be a dataset with shape [3, 1, 1]. Then,

dset.reshapeMemSpace({3}).read<std::vector<double>>();
dset.squeezeMemSpace({1, 2}).read<std::vector<double>>();

can be used to read into a one-dimensional dataset.

@1uc
Copy link
Collaborator Author

1uc commented May 6, 2024

This is preparatory work to allow #992.

@1uc 1uc force-pushed the 1uc/squeeze-reshape branch from 693470b to 54d7f91 Compare May 6, 2024 13:20
1uc added 5 commits May 6, 2024 17:23
These methods allow reshaping the memory space. This can be used as
an alternative to broadcasting.

Example:

Let `dset` be a dataset with shape `[3, 1, 1]`. Then,

    dset.reshapeMemSpace({3}).read<std::vector<double>>();
    dset.squeezeMemSpace({1, 2}).read<std::vector<double>>();

can be used to read into a one-dimensional dataset.
@1uc 1uc force-pushed the 1uc/squeeze-reshape branch from dddf1bd to cefb186 Compare May 6, 2024 15:23
@codecov-commenter
Copy link

codecov-commenter commented May 6, 2024

Codecov Report

Attention: Patch coverage is 83.75000% with 13 lines in your changes are missing coverage. Please review.

Project coverage is 86.26%. Comparing base (070badf) to head (1f09187).
Report is 1 commits behind head on master.

Files Patch % Lines
src/examples/broadcasting_arrays.cpp 0.00% 9 Missing ⚠️
include/highfive/bits/H5Attribute_misc.hpp 72.72% 3 Missing ⚠️
include/highfive/bits/H5Slice_traits_misc.hpp 92.85% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #991      +/-   ##
==========================================
- Coverage   86.31%   86.26%   -0.05%     
==========================================
  Files          92       94       +2     
  Lines        5919     5986      +67     
==========================================
+ Hits         5109     5164      +55     
- Misses        810      822      +12     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@1uc 1uc marked this pull request as ready for review May 7, 2024 06:40
Copy link
Member

@matz-e matz-e left a comment

Choose a reason for hiding this comment

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

LGTM

@1uc 1uc merged commit d79b5ac into master May 7, 2024
@1uc 1uc deleted the 1uc/squeeze-reshape branch May 7, 2024 16:03
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants