Re: [eigen] OuterstrideMatch in src/Core/Ref.h |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/eigen Archives
]
- To: eigen@xxxxxxxxxxxxxxxxxxx
- Subject: Re: [eigen] OuterstrideMatch in src/Core/Ref.h
- From: Dale Lukas Peterson <hazelnusse@xxxxxxxxx>
- Date: Wed, 9 Dec 2020 11:35:06 -0800
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=LS+ruNP9lt3ERjwhO43zqJiWgXwzeYDwOLX5pCHtHX8=; b=JoPTeH9NOszT9dFVsGhMcZe0iqP3xUB/GTlQ6v1CnSalt5mV9WXk0xYgM818MfKXdu IsojNgcZt3Tq5Ub5/wR+5zKQBcWOxqns5897gKeVAs6A4SZHwm2sKMWruDmf/E4viDAY VRm6kbs+9DLJhBqiFG0taX5dKbAGvryqa6BFkJG6FmyISRF0nLkS0QM4dkbYWkYAQ2S3 +gVV9RLsn4FSj+1asZtY1r4ghlzavAk5QAXdhV9BvMg6RKhXiresZVUMLoszbrVHY6SJ 7BPzL/FjGl5rWCXZFnzh0HLyQ3doba4vGzS/7DeL2Iy1GQxJvGKl7moveJdeGhTa9/j9 o5Hg==
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 <rmlarsen@xxxxxxxxxx> 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 <hazelnusse@xxxxxxxxx> 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 <rmlarsen@xxxxxxxxxx> 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 <hazelnusse@xxxxxxxxx> 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';
}