[Carpet] [CactusMaint] Cactus/2057: add new flesh functions to register/unregister notify callbacks for parameter set operations
Thomas Radke
tradke at aei.mpg.de
Wed Sep 20 17:38:53 CEST 2006
Erik Schnetter wrote:
> On Sep 20, 2006, at 09:50:11, tradke at aei.mpg.de wrote:
>
>>> Description:
>>
>> This patch implements what was proposed in a discussion on the Cactus
>> developers mailing list (see http://www.cactuscode.org/old/
>> pipermail/developers/2006-September/005090.html)
>
>
> I had the impression that there would be no regular expression that
> selects thorns or parameters. Maybe my memory misleads me, because
> that was the way I tried to argue.
>
> There is no other part of Cactus where thorns or parameters are
> selected via regular expressions. It would be difficult to find
> regular expressions that select exactly the thorns or parameters that
> one is interested in. In most cases (e.g., I/O routines), people will
> be interested either in a very specific set of parameters, or in all
> parameters from a given thorn.
>
> I'm afraid that regular expressions make notifications more expensive,
> since each parameter that is steered has to be checked against all
> regular expressions for all listeners.
>
> I would either use a plain mask, as in "interested in only this thorn",
> or "only this parameter from this thorn", or let the listener handle
> make its own decision. If the listener wants to use a regular
> expression, then the function call overhead is negligible in comparison.
The two regex parameters in the registration of a notify callback are
optional. If they are given as NULL pointer or an empty string, no
regcomp() is done in CCTK_ParameterSet() (this reminds me that I didn't
document it). I thought that this might be useful feature, with no cost
if it isn't used.
We can also leave it entirely up to the listener.
--
Cheers, Thomas.
More information about the developers
mailing list