aboutsummaryrefslogtreecommitdiffhomepage
path: root/Eigen/src/Core/CwiseUnaryView.h
diff options
context:
space:
mode:
authorGravatar Antonio Sanchez <cantonios@google.com>2020-12-10 14:05:38 -0800
committerGravatar Antonio Sanchez <cantonios@google.com>2021-01-05 10:41:25 -0800
commitbb1de9dbdede6669c2c86c028a9deff637e3d1f6 (patch)
tree3d7936aeea85b1541c2ff8c5eece202aefe82c42 /Eigen/src/Core/CwiseUnaryView.h
parent12dda34b15fe2ea4d994fafdba8c4666963e1a55 (diff)
Fix Ref Stride checks.
The existing `Ref` class failed to consider cases where the Ref's `Stride` setting *could* match the underlying referred object's stride, but **didn't** at runtime. This led to trying to set invalid stride values, causing runtime failures in some cases, and garbage due to mismatched strides in others. Here we add the missing runtime checks. This involves computing the strides necessary to align with the referred object's storage, and verifying we can actually set those strides at runtime. In the `const` case, if it *may* be possible to refer to the original storage at compile-time but fails at runtime, then we defer to the `construct(...)` method that makes a copy. Added more tests to check these cases. Fixes #2093.
Diffstat (limited to 'Eigen/src/Core/CwiseUnaryView.h')
0 files changed, 0 insertions, 0 deletions