[eigen] OuterstrideMatch in src/Core/Ref.h |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/eigen Archives
]
- To: eigen@xxxxxxxxxxxxxxxxxxx
- Subject: [eigen] OuterstrideMatch in src/Core/Ref.h
- From: Dale Lukas Peterson <hazelnusse@xxxxxxxxx>
- Date: Tue, 8 Dec 2020 09:15:49 -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=v3skH/aDqqnPC4JUL5ASoFrL5V2Ixa6nvfJu6ovsWHk=; b=fHOi5GlcPFuMa+OSoL9AMAUtTfbRhQ1+6Sfh5iiwqEToBOrSOOk7wGHlM/kvqeIskc zksbp5Em74GCVZj+V0ELwCo+BWEn2k9ajfBoL+7ZXnZ48y3qlVRs4yrVq5j+qwvEzF6x QWONw6c+bvrtcWDk2xJBPjC2amjk5qf6xORTJldMv1jk/POBpUrvBn8yGqNTXQ84OVP1 /QMcT9Ds/PxGO2P6tAzGCzuOLw7V9Ipao79hpGJ7AXmae4X8RzAn6JZxBXE19O6pPJ2u AgtFpMBiOCNfJJuvmgAWnQt/Wk2pifIoFzzt1v2IlfS1S++/l46m3x0ftwduJYTXQBRv aodA==
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
diff --git a/Eigen/src/Core/Ref.h b/Eigen/src/Core/Ref.h
index 17a1496b8..d063d5eec 100644
--- a/Eigen/src/Core/Ref.h
+++ b/Eigen/src/Core/Ref.h
@@ -34,7 +34,7 @@ struct traits<Ref<_PlainObjectType, _Options, _StrideType> >
InnerStrideMatch = int(StrideType::InnerStrideAtCompileTime)==int(Dynamic)
|| int(StrideType::InnerStrideAtCompileTime)==int(Derived::InnerStrideAtCompileTime)
|| (int(StrideType::InnerStrideAtCompileTime)==0 && int(Derived::InnerStrideAtCompileTime)==1),
- OuterStrideMatch = IsVectorAtCompileTime
+ OuterStrideMatch = Derived::IsVectorAtCompileTime
|| int(StrideType::OuterStrideAtCompileTime)==int(Dynamic) || int(StrideType::OuterStrideAtCompileTime)==int(Derived::OuterStrideAtCompileTime),
// NOTE, this indirection of evaluator<Derived>::Alignment is needed
// to workaround a very strange bug in MSVC related to the instantiation