Re: [eigen] strange sizeof on windows |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/eigen Archives
]
- To: eigen@xxxxxxxxxxxxxxxxxxx
- Subject: Re: [eigen] strange sizeof on windows
- From: "Benoit Jacob" <jacob.benoit.1@xxxxxxxxx>
- Date: Mon, 5 Jan 2009 17:08:31 +0100
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=xnJmohesIX3hhq/qF8nAZvHq/DyNuEFpBFI3BX/J2/4=; b=irdc8d7eKcBDQKvSFm2ktuiXZMrhBfMGDWrWPNkHIEbE27sGjdAnfYDjoFumt5Xqms L2hge3ebtMEAa9MQQSb2EgPYBQ/nx19WkGdMbaodfZRiD2hLB/Naw+PI1YDgCl8hMKuo P4ITH/0Ao2oD8HtnBkyBKNcIWjZbjBje5OxnE=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=AXIiQ27jtAWSmtw+imQYuTK/eQC8R8LHDxB0zJPxSrHFyzWmyGh23gA8Jd9VvFVSkF Lc1xgi5HbR3JHIS0LnHUEfR0fvxGphn4TyJMmuHBEj2m+FnDZPkK2CvHPGswyUmqnhGf ibYiGiGlrA9Zpsrd8k++ut3zetm2fZB6IWKO8=
2009/1/5 FMDSPAM <fmdspam@xxxxxxxxx>:
> Do you know what is about the ?class member?
> a) Eigen::MatrixBase... (Size is 1)
> and b) Eigen::ei:_matrix_with_aligned... (Sieze is 1 too)
>
> If this two ?class member? are regular, then the minimal Size of m should
> be 1+1+sizeof(float) = 6, correct?
> With some alignment-magic maybe the array-part starts later and sizeof(m)=8.
> (0xFD4C - 0xFD48 = 4)
>
> So, the question is: Are a) and b) regular member variables.
No, they are no member variables, they are base classes. They are
empty. Since the sizeof of a class is at least 1, their sizeof is 1.
But inheriting an empty class should nevertheless not increase the
sizeof.
Not sure though if this is defined in the standard or just some common
sense that msvc is missing.
Note sure either what the workaround is.
Cheers,
Benoit
---