[vtk-developers] Changes to the way the pipeline is updated
Aashish Chaudhary
aashish.chaudhary at kitware.com
Wed Mar 2 15:50:30 EST 2016
Yeah, I can see that it could cause some issue and if you and David
already discussed this then I am good but i will find the thread as
suggested. Although in this case both of these methods are so similar
in construct that it seems bit odd that I have to call UpdateTimeStamp
again almost with same parameters.
Can you not cache the args pass to Update so the UpdateTimeStamp will
just take the time parameter? I am sure you must have thought about
this too, in that case please ignore my suggestion.
Overall, this will be huge step forward.
- Aashish
On Wed, Mar 2, 2016 at 3:41 PM, Berk Geveci <berk.geveci at kitware.com> wrote:
> Aashish,
>
> Go find the discussion David and I had about why overloads are not good :-)
> Having many different overloads puts a lot of burden on the subclass that
> may want to overwrite only one of the signatures.
>
> Best,
> -berk
>
> On Wed, Mar 2, 2016 at 3:39 PM, Aashish Chaudhary
> <aashish.chaudhary at kitware.com> wrote:
>>
>> Berk,
>>
>> +100 for the new API. Why not pass time as part of the update? So
>> instead of this
>>
>> Update(int piece, int numPieces, int ghostLevel);
>> Update(int piece, int numPieces, int ghostLevel, int* updateExtent);
>> UpdateTimeStep(double time);
>> UpdateTimeStep(double time, int piece, int numPieces, int ghostLevel);
>> UpdateTimeStep(double time, int piece, int numPieces, int ghostLevel,
>> int* updateExtent);
>>
>> You will have:
>> Update(int piece, int numPieces, int ghostLevel);
>> Update(int piece, int numPieces, double time, int ghostLevel);
>> Update(int piece, int numPieces, int ghostLevel, int* updateExtent);
>> Update(int piece, int numPieces, double time, int ghostLevel, int*
>> updateExtent);
>>
>> since for most part their argument is almost identical.
>>
>> - aashish
>>
>> On Wed, Mar 2, 2016 at 3:32 PM, Sean McBride <sean at rogue-research.com>
>> wrote:
>> > I guess that obsoletes this:
>> > <https://gitlab.kitware.com/vtk/vtk/merge_requests/1292>
>> >
>> > Maybe you could fix that up at the same time David?
>> >
>> > Sean
>> >
>> >
>> > On Wed, 2 Mar 2016 13:12:44 -0700, David Gobbi said:
>> >
>> >>Will do.
>> >>
>> >>On Wed, Mar 2, 2016 at 1:08 PM, Berk Geveci <berk.geveci at kitware.com>
>> >> wrote:
>> >>
>> >>> Ugh. That's a typo (probably copy & paste error). If you look at the
>> >>> implementation, it actually doesn't check for NULL pointer. I am
>> >>> swamped
>> >>> now. Do you have a few cycles to push a fix?
>> >>>
>> >>> On Wed, Mar 2, 2016 at 2:12 PM, David Gobbi <david.gobbi at gmail.com>
>> >>> wrote:
>> >>>
>> >>>> Hi Berk,
>> >>>>
>> >>>> One of the things that I'm not quite sure about is, why is it
>> >>>> permitted
>> >>>> to call algorithm->UpdateExtent() with no arguments?
>> >>>>
>> >>>> int UpdateExtent(const int extents[6]=0)
>> >>>>
>> >>>> If I understand the code, UpdateExtent() with no args is the same as
>> >>>> Update(). It seems dangerous to allow this, because a programmer
>> >>>> could
>> >>>> easily type UpdateExtent() by accident instead of
>> >>>> UpdateWholeExtent(),
>> >>>> especially if they have autocompletion turned on in their code editor
>> >>>> (and
>> >>>> especially because Update() and UpdateWholeExtent() give the same
>> >>>> result
>> >>>> most of the time).
>> >
>> >
>> > _______________________________________________
>> > Powered by www.kitware.com
>> >
>> > Visit other Kitware open-source projects at
>> > http://www.kitware.com/opensource/opensource.html
>> >
>> > Search the list archives at:
>> > http://markmail.org/search/?q=vtk-developers
>> >
>> > Follow this link to subscribe/unsubscribe:
>> > http://public.kitware.com/mailman/listinfo/vtk-developers
>> >
>>
>>
>>
>> --
>> | Aashish Chaudhary
>> | Technical Leader
>> | Kitware Inc.
>> | http://www.kitware.com/company/team/chaudhary.html
>
>
--
| Aashish Chaudhary
| Technical Leader
| Kitware Inc.
| http://www.kitware.com/company/team/chaudhary.html
More information about the vtk-developers
mailing list