We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Hello,
I have a use case in which I iterative over a const range, do some transformation on it and store it another range. The original range is const float.
I modelled this as:
using FloatArray = enoki::Array<float, 8, true, enoki::RoundingMode::Default>; enoki::DynamicArray<const FloatArray> input; enoki::DynamicArray<FloatArray> destination;
and I do DynamicArray::map over my float ranges like this:
DynamicArray::map
void foo(const float* input, size_t s) { input = enoki::DynamicArray<const FloatArray>(input, s); }
However, map signature is:
map
static Derived map(void *ptr, size_t size) {
and I get a compiler error that I am casting away my constness.
If I change this to:
template <typename T> static Derived map(T *ptr, size_t size) {
everything works out since now template type T has constness in it.
Would you be open to accept this change as a PR?
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Hello,
I have a use case in which I iterative over a const range, do some transformation on it and store it another range. The original range is const float.
I modelled this as:
and I do
DynamicArray::map
over my float ranges like this:However,
map
signature is:and I get a compiler error that I am casting away my constness.
If I change this to:
everything works out since now template type T has constness in it.
Would you be open to accept this change as a PR?
The text was updated successfully, but these errors were encountered: