Re: [eigen] RowsAtCompileTime vs MaxRowsAtCompileTime |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/eigen Archives
]
- To: eigen@xxxxxxxxxxxxxxxxxxx
- Subject: Re: [eigen] RowsAtCompileTime vs MaxRowsAtCompileTime
- From: Benoit Jacob <jacob.benoit.1@xxxxxxxxx>
- Date: Wed, 21 Jul 2010 17:15:03 -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=UDqmDtJ6nO91zOXapQuhQAfBz6MYXsuWqIjX+HdMFx8=; b=X+9mst5kLTGPvFM1fClXuRNpH1b9hFz9qdm87Gwu13Xmx/61ik+UpDovmAybf8lau3 QjXoo4MJIgxq+Og5q/H7sqqb+uB6Cu2LydZyoQBciHqeK6OomBri3ZZBehK5zPsrgl0A NVVek9KfQdAepEY5Qoy/6yEfeES7y8hLvsvUk=
- 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=XgN697fMwn5K2SduzATVGo/YPLM9JTB+Dg+G7rSZWxFEjF5HddjI6knEF3eoZhjeS+ ZQEX0dR2Z4dOZwY8dQfrXIFXbBpbS+rDccTyYT7ZmzWhdkUvjvtGsfnoLHQnqVR6WxJX OLp0ywHAQ0oMnlMHnwdoepbHB15Ttjou1oBcM=
This is because the checks are done at the level of DenseStorageBase.
By the time you reach ei_matrix_storage, the tests have already been done.
By the way, ei_matrix_storage needs to be renamed to something like
ei_dense_storage.
Benoit
2010/7/21 Manoj Rajagopalan <rmanoj@xxxxxxxxx>:
> hi Eigen developers,
>
> Another question about the design of Eigen3.
>
> I notice that no checks are performed in ei_matrix_storage<> in the resize
> member functions, to see if the rows requested exceeds MaxRowsAtCompileTime
> if the latter is finite (specified when instantiating the template). Likewise
> for columns. So, is the max-value only for memory allocation purposes with
> the programmer being responsible for preventing out-of-bounds access? I am
> just a little surprised to see no static assertion to check for this error.
>
> thanks,
> Manoj
>
>
>