Re: [eigen] VS2008 triangularView compiler error |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/eigen Archives
]
- To: eigen@xxxxxxxxxxxxxxxxxxx
- Subject: Re: [eigen] VS2008 triangularView compiler error
- From: Benoit Jacob <jacob.benoit.1@xxxxxxxxx>
- Date: Tue, 24 Aug 2010 11:12:09 -0400
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=t2hKd2gTO1Sghn6Dkhg7Uid2Lb+Zha6UZ0yuvinLLiE=; b=Si2u1kTpBLsZZGfq0YX4gqVtslIUO3L52YR7yECEtwRTU0y7lYP2zLM0aq8jjiUPL/ xqi5IJWXDGap8TUFx/jjDdKNOy8ujp2Nm52mP4Ies+n58g0Tr5gWnML42PYRUpwrgRLY TrepGnXYToAi3oDSzB0AuGrz0nzyPZrh6mok4=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=WgBatoCO70N9VR/sFhB+SxuJNhBwRRhsn5BeAmP4S7sKyxxfvvC606qGss1SBKsU3W 58FTPXtKiEnFVG0qdWN1LdQlDzj4ZsbIIEiAvyjEJMlLnCUd+Eza2ySKJQea0LJwAq4m dQfkhyAJucfH6UkzjFLdDPsA/O+merXe8Njqk=
2010/8/24 Benoit Jacob <jacob.benoit.1@xxxxxxxxx>
> Not adding a unit test as this is a plain compilation issue.
This was the stupidest thing I've said in a while (although there are
other strong candidates). Will add unit test asap. Being a pure
template library, without unit tests, we can't even known if we
compile. We've been writing compilation-oriented unit tests since
eigen 1.
Benoit
>
> Benoit
>
> 2010/8/24 SHIROKOBROD Oleg <Oleg.Shirokobrod@xxxxxxxxxx>
>>
>> Hello,
>>
>>
>>
>> I’ve just updated Eigen development branch. I use MSVS 2008 for compiling this code:
>>
>>
>>
>> // HelperTest.cpp
>>
>> #include <Eigen\Core>
>>
>> #include <Eigen\QR>
>>
>>
>>
>> int main(int argc, char* argv[])
>>
>> {
>>
>> typedef Eigen::Matrix<double, Eigen::Dynamic, Eigen::Dynamic> Matrix;
>>
>>
>>
>> int numberOfObservations = 100;
>>
>> int numberOfParameters = 10;
>>
>> Matrix J =Matrix::Random(numberOfObservations, numberOfParameters);
>>
>>
>>
>> Eigen::ColPivHouseholderQR<Matrix> colPivHouseholderQR;
>>
>> colPivHouseholderQR.compute(J);
>>
>>
>>
>> Matrix R = Matrix::Zero(numberOfParameters, numberOfParameters);
>>
>> R.triangularView<Eigen::Upper>() =
>>
>> colPivHouseholderQR.matrixQR().
>>
>> topLeftCorner(numberOfParameters, numberOfParameters).
>>
>> triangularView<Eigen::Upper>(); // Line 20
>>
>> }
>>
>>
>>
>> With recent version of Eigen the Compiler issues an error message
>>
>>
>>
>> Compiling...
>>
>> HelperTest.cpp
>>
>>
>>
>> eigen\eigen\src\core\triangularmatrix.h(549) : error C2248: 'Eigen::TriangularView<_MatrixType,_Mode>::DenseMatrixType' : cannot access protected typedef declared in class 'Eigen::TriangularView<_MatrixType,_Mode>'
>>
>> with
>>
>> [
>>
>> _MatrixType=Eigen::Block<EIGEN::MATRIX,-1,-1,false>,
>>
>> _Mode=2
>>
>> ]
>>
>> eigen\eigen\src\core\triangularmatrix.h(160) : see declaration of 'Eigen::TriangularView<_MatrixType,_Mode>::DenseMatrixType'
>>
>> with
>>
>> [
>>
>> _MatrixType=Eigen::Block<EIGEN::MATRIX,-1,-1,false>,
>>
>> _Mode=2
>>
>> ]
>>
>> helpertest.cpp(20) : see reference to function template instantiation
>>
>> 'Eigen::TriangularView<_MatrixType,_Mode> &Eigen::TriangularView<_MatrixType,_Mode>::operator =<EIGEN::TRIANGULARVIEW>(const Eigen::TriangularBase<EIGEN::TRIANGULARVIEW> &)' being compiled
>>
>> with
>>
>> [
>>
>> _MatrixType=Eigen::Matrix,
>>
>> _Mode=2,
>>
>> Derived=Eigen::Block<EIGEN::MATRIX,-1,-1,false>
>>
>> ]
>>
>>
>>
>>
>>
>> What’s wrong with this code?
>>
>>
>>
>> Thanks,
>>
>>
>>
>> Oleg Shirokobrod
>>
>>
>>
>> ___________________________________________________________________________
>> This e-mail is confidential and is for the addressee only. Please refer to
>> www.oxinst.com/email-statement for regulatory information.