Re: [eigen] Re: JacobiSVD and heap allocations |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/eigen Archives
]
- To: eigen@xxxxxxxxxxxxxxxxxxx
- Subject: Re: [eigen] Re: JacobiSVD and heap allocations
- From: Benoit Jacob <jacob.benoit.1@xxxxxxxxx>
- Date: Sun, 6 Mar 2011 12:30:34 -0500
- Cc: Adolfo Rodríguez Tsouroukdissian <adolfo.rodriguez@xxxxxxxxxxxxxxxx>
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=0xhlH3Z4AzpAXyNH5y8+MhwCtvHKESDfwGET7hzSvPQ=; b=i0n7RiKLjcI98rXiHsLEXuZIKlf2saR45/Z4gMkt8i+udVIf52O8P8K/hCfR/RA3am m/BqjhgfU22iTmjxK6oCWaQq9maFvXt3JHcBWL7bbdjOF79LibjJGrt5xqqSbc/V23Oq e5Nyl+Ro4M7vjIzJ5yx7HNy7UohKsO+aOf9Mo=
- 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 :cc:content-type:content-transfer-encoding; b=ReKsn9rCWLRZu+7Io9qNThmY1JRMqznrXiSq68RoWD7BDyZPPz/UHBdkrjvsnRkTOD 4g/yKnax1Ho5GvzV2I7z8kSwNAu4wQwk+o165F9e7h4DEQ7YwErI3Edw4x5Le0f5RmEZ z1iSGKJSQFoWYn/ZabRgSidXY8Mm+JPePM8Uo=
2011/3/2 Adolfo Rodríguez Tsouroukdissian <adolfo.rodriguez@xxxxxxxxxxxxxxxx>:
>
>
> 2011/2/28 Adolfo Rodríguez Tsouroukdissian
> <adolfo.rodriguez@xxxxxxxxxxxxxxxx>
>>
>> Hello,
>>
>> Now that 3.0 is fast approaching, I took a moment to play around with the
>> new implementation of the JacobiSVD (Eigen3 beta 4). The first and most
>> important thing I noticed is that the problem size constructor no longer
>> preallocates all of its resources. Example code:
>>
>> MatrixXd A = MatrixXd::Random(rows, cols);
>> Eigen::JacobiSVD<MatrixXd> svd(rows, cols, Eigen::ComputeThinU |
>> Eigen::ComputeThinV); // Performs 4 allocations
>> svd.compute(A); // Performs 7 allocations, but does not compute U nor V!
>> svd.compute(A, Eigen::ComputeThinU | Eigen::ComputeThinV); // Performs 8
>> allocations. Does compute U and V
>>
>> All (undesired) allocations performed by compute() take place in lines
>> 558-559 of JacobiSVD:
>>
>> if(!internal::qr_preconditioner_impl<MatrixType, QRPreconditioner,
>> internal::PreconditionIfMoreColsThanRows>::run(*this, matrix)
>> && !internal::qr_preconditioner_impl<MatrixType, QRPreconditioner,
>> internal::PreconditionIfMoreRowsThanCols>::run(*this, matrix))
>>
>> I ticketed this as issue 206.
>>
> It turns out that I did manage to find some time and propose a patch for
> this issue.
>
>>
>> Secondly, I was expecting svd.compute(A) to use the computationOptions
>> passed to the constructor, otherwise why specify them in advance?.
>
> I'd still like to hear something on this one :)
Hi, sorry for the late reply, I've now replied on bug 206, let's
continue the discussion there.
Benoit