yade-dev team mailing list archive
-
yade-dev team
-
Mailing list archive
-
Message #00969
Re: shared_ptr<PhysicalAction>
-
To:
yade-dev@xxxxxxxxxxxxxxxxxxx
-
From:
Václav Šmilauer <eudoxos@xxxxxxxx>
-
Date:
Tue, 17 Feb 2009 13:48:55 +0100
-
In-reply-to:
<20090217133804.373015d4@szpak>
-
User-agent:
Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.8.1.19) Gecko/20090105 Lightning/0.8 Thunderbird/2.0.0.19 Mnenhy/0.7.6.666
>>> memset(action[0],0,sizeof(thisAction)) and perhaps would save some
>>> shared_ptr overhead we have currently. V.
>>>
>> feel free to experiment.
>>
>
> you could try memset(.....get(),0,sizeof(thisAction)); maybe?
>
My mistake, I wanted to write
memset(action[0],0,sizeof(thisAction)*numberOfBodies), that would reset
the whole array at once, which was the point. What you suggest wouldn't
be any faster thatn the current was, I think, except the reset() call
overhead. V.
Follow ups
References