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

Allow arrays with runtime defined rank. #918

Closed
1uc opened this issue Jan 17, 2024 · 2 comments
Closed

Allow arrays with runtime defined rank. #918

1uc opened this issue Jan 17, 2024 · 2 comments
Labels
v3 Anything that needs to be resolved before `v3`.

Comments

@1uc
Copy link
Collaborator

1uc commented Jan 17, 2024

Arrays do not need to have a compile-time constant number of dimensions (rank). There's two compile-time constant variable:

static constexpr size_t ndim = 0;
static constexpr size_t recursive_ndim = ndim;

It's uses seems to be mostly for input validation
https://github.com/search?q=repo%3ABlueBrain%2FHighFive%20recursive_ndim&type=code

Here it's not immediately used for input validation, and there's no container near by to get he runtime-value:

template <typename T>
template <class F>
BufferInfo<T>::BufferInfo(const DataType& dtype, F getName, Operation _op)
: op(_op)
, is_fixed_len_string(dtype.isFixedLenStr())
// In case we are using Fixed-len strings we need to subtract one dimension
, n_dimensions(details::inspector<type_no_const>::recursive_ndim -
((is_fixed_len_string && is_char_array) ? 1 : 0))
, data_type(
string_type_checker<char_array_t>::getDataType(create_datatype<elem_type>(), dtype)) {
// We warn. In case they are really not convertible an exception will rise on read/write
if (dtype.getClass() != data_type.getClass()) {

@1uc 1uc added the v3 Anything that needs to be resolved before `v3`. label Feb 6, 2024
@1uc
Copy link
Collaborator Author

1uc commented Feb 6, 2024

Marked as v3 since it requires changes to the internal inspector. Given how close we are to v3 and that users have touch this internal detail to add new containers, we might as well consider changes to the inspector as breaking changes.

@1uc
Copy link
Collaborator Author

1uc commented May 14, 2024

Fixed by #938.

@1uc 1uc closed this as completed May 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
v3 Anything that needs to be resolved before `v3`.
Projects
None yet
Development

No branches or pull requests

1 participant