Hi Rasmus,
  Attached is a MWE that behaves identically to what we see in our
codebase. Is this a bug or are we doing something wrong? If this is
indeed a bug, I can do some work to put it into a proper unit test
which we can make pass.
Sincerely,
Luke

On Wed, Dec 9, 2020 at 9:56 AM Rasmus Munk Larsen <[email protected]> wrote:
>
> A MWE would be very nice, thanks! The test covereign in Eigen is not as 
> comprehensive as one could wish for, which probably explain why you don't see 
> this in the test suite. Ideally the MWE should be in the form of a new test.
>
> Rasmus
>
> On Tue, Dec 8, 2020 at 7:47 PM Dale Lukas Peterson <[email protected]> 
> wrote:
>>
>> I will see what I can do to create a MWE. Any thoughts on why ninja/make 
>> check passes with or without the patch?
>>
>> On Tue, Dec 8, 2020, 1:46 PM Rasmus Munk Larsen <[email protected]> wrote:
>>>
>>> Dale, could you send a minimal reproducer of the issue. Preferably file an 
>>> issue at https://gitlab.com/libeigen/eigen/-/issues
>>>
>>> On Tue, Dec 8, 2020 at 9:16 AM Dale Lukas Peterson <[email protected]> 
>>> wrote:
>>>>
>>>> Hi folks,
>>>>   We use Eigen at work and are trying to integrate the recent v3.3.9
>>>> release. Everything in our codebase builds and passes tests with the
>>>> exception of one set of numerical tests which only pass if we apply
>>>> the attached patch. This patch effectively ignores
>>>> PlainObjectBase::IsVectorAtCompileTime for the purposes of
>>>> OuterStrideMatch. I don't fully understand this part of Eigen nor the
>>>> failing code internally at my company. However, with this patch
>>>> applied, the check target behaves identically to without having it
>>>> applied so I am at a bit of a loss as to whether it is really safe for
>>>> us to apply.
>>>>
>>>> Are there any eigen devs out there who can speak to this part of Eigen
>>>> and give any feedback on whether this patch would be reasonable or
>>>> not?
>>>>
>>>> Sincerely,
>>>> Luke



-- 
For a successful technology, reality must take precedence over public
relations, for Nature cannot be fooled. -- Richard Feynman
#include <iostream>
#include <Eigen/Dense>

int main() {
  constexpr int num_rows = 3;
  constexpr int num_columns = 4;
  Eigen::MatrixXd y = Eigen::MatrixXd::Random(num_rows, num_columns);

  constexpr int num_bottom_rows = 1;
  const Eigen::Ref<const Eigen::Matrix<double, num_bottom_rows, num_columns>> z =
      y.bottomRows(num_bottom_rows);

  // These should be the same but are not.
  std::cout << y.bottomRows(num_bottom_rows) << '\n'
            << z << '\n';
}

Reply via email to