Re: [eigen] Zero-Sized Blocks |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/eigen Archives
]
- To: eigen <eigen@xxxxxxxxxxxxxxxxxxx>
- Subject: Re: [eigen] Zero-Sized Blocks
- From: Gael Guennebaud <gael.guennebaud@xxxxxxxxx>
- Date: Tue, 14 May 2013 13:06:23 +0200
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:mime-version:in-reply-to:references:from:date:message-id :subject:to:content-type:content-transfer-encoding; bh=cy4Ox+rENoOrfxNu3uX451/G/oww++op3U4u0tZdQrU=; b=0RQcPhXdq2mnwKBM3QtsGKNCK+cZKcYKgDrEGqZMgwy5bpIiNUop+vYXaNkVHUbXfu YPOEcDyFbHrmq14y2HO8sHWxvD1ZKAOed9UU1C8LwBFPnDX4yKR7FCT9WS6jXz6nAK4a x2DhrwHsdCBRYVh7XBP9+WC+qxPotdwcSs+V0kCPGuK8iIJpTutTpKcKBsgETPzfEcQa piqseh5fnTHgG89aJXnRGJm19fu4RZXvTRbjrubgVnKn4N/7xSVDyyMIaYUlArxSpD2e nRBHiIaeH19JRd+86bbFAXQFO3iIrSLHJ6JxIvtZH/1wR9+WG5kokNz1+Erb9FoPpFLB ufew==
If this is already allowed for Matrix<> objects, then I don't see why
this would not be the case for blocks. It would be nice that the
block.cpp unit test checks for 0-sized blocks.
gael
On Mon, May 13, 2013 at 4:56 PM, Christoph Hertzberg
<chtz@xxxxxxxxxxxxxxxxxxxxxxxx> wrote:
> Hi,
>
> is it intended that fixed sized blocks can't have 0 rows or 0 columns (while
> dynamic-sized can)?
> It's hard to explain a useful use-case without much context, but it allows
> me to reduce code-duplication (resulting essentially in a NOP for the 0
> case).
> The fix is actually just to relax an assertion in Block.h
>
> I don't see anything that could go wrong with that (and in other places
> fixed size 0 is allowed, e.g. Matrix<double, 0, 1>), but I don't dare to
> commit that without asking first.
>
> Christoph
>
>
> --
> ----------------------------------------------
> Dipl.-Inf., Dipl.-Math. Christoph Hertzberg
> Cartesium 0.049
> Universität Bremen
> Enrique-Schmidt-Straße 5
> 28359 Bremen
>
> Tel: +49 (421) 218-64252
> ----------------------------------------------
>
>