Re: [eigen] [patch] Aligned new/delete |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/eigen Archives
]
- To: eigen@xxxxxxxxxxxxxxxxxxx
- Subject: Re: [eigen] [patch] Aligned new/delete
- From: Gael Guennebaud <gael.guennebaud@xxxxxxxxx>
- Date: Thu, 7 May 2009 22:34:15 +0200
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=nvRazp53lmg4ECVM+dUC0HiZCncQ6AgETN9bgZuV4U8=; b=FSYBDzj8/igzwhLH1qIcJEzCZvjCfO08tP8JlomRE8Yf6W5KLjG285SMLLD8sltJuk NBuR+ggaG0S2CkPpAm2zwfMLGtLpmTQpicQRcHgcs7OZAlqbXqoUJcyjBsVEiWIh/pD0 gNGUoyU9KWT88oYPS7/5+Dr4/n9SHIXDGujtg=
- 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=YthMXzTp2zIMMf5pAQneaZc2I+IScxMNxOCGmEqe3Zd10j/8IIAbJuK0nB+rUgoEsr BT/cH63yJHR00ujrVd9bojVBgl33ZujtyxNU5kko9sy9M95mVOQnSwEHm++M2ajlyabB 33Lm1j6OGlxS76xUbNkp3apEA+d8ebXXxTU9U=
I'm not expert in that area, but this sounds very good to me, so I applied it.
On Thu, May 7, 2009 at 8:42 PM, Benoit Jacob <jacob.benoit.1@xxxxxxxxx> wrote:
> can someone with experience with exceptions and overloading new/delete
> please review?
> I'm incompetent.
>
> 2009/5/6 Hauke Heibel <hauke.heibel@xxxxxxxxxxxxxx>:
>> I made the parameter std::nothrow_t unnamed and ... added the (still
>> *shame*) missing no-throw delete.
>>
>> On Wed, May 6, 2009 at 3:40 PM, Benoit Jacob <jacob.benoit.1@xxxxxxxxx> wrote:
>>> This needs review by someone more competent than me in these
>>> matters... I just learnt the meaning of the throw() declaration.
>>>
>>> One remark: the parameter nt is unused, so perhaps make it unnamed to
>>> avoid warnings?
>>>
>>> Benoit
>>>
>>> 2009/5/6 Hauke Heibel <hauke.heibel@xxxxxxxxxxxxxx>:
>>>> Two things are covered in this patch.
>>>>
>>>> 1. Each operator new needs its corresponding operator delete. This was
>>>> not the case for in-place new/delete.
>>>> 2. Operators new were declared with throw() which is not correct since
>>>> in the current standard implementation they may throw std::bad_alloc.
>>>> The throw() declaration was moved from new to delete which must never
>>>> throw.
>>>> 3. Added no-throw new/delete. In order to allow user using no-throw
>>>> new and delete I just added them. The difference is that instead of
>>>> throwing an exception they return 0 in case of an allocation failure.
>>>>
>>>> For the in-place new and delete I piped the calls to the global
>>>> in-place new and delete functions since actually no allocation is
>>>> performed. It is the job of the user to take care that when using
>>>> in-place new and delete the memory is properly aligned.
>>>>
>>>> I ran the unit tests and all besides the new matrix exponential passed
>>>> - could not submit to the dashboard since the daily limit is reached.
>>>>
>>>> Regards,
>>>> Hauke
>>>>
>>>
>>>
>>>
>>
>
>
>