[Developers] Proposed Cactus Timer API Completion

Steve White swhite at aei.mpg.de
Tue Aug 3 11:59:42 CDT 2004


I intended this function to return the number of clocks that are utilized
by the Timer.  The number should be small, typically it will be 2.  If
it's very big, something is severely wrong.

I meant to contain the actual time duration in the double valued function.

------------------------------------------------------------------------
Steve White : Programmer
Max-Planck-Institut für Gravitationsphysik      Albert-Einstein-Institut
Am Mühlenberg 1, D-14476 Golm, Germany                  +49-331-567-7329

On Tue, 3 Aug 2004, Jonathan Thornburg wrote:

> Hi, Steve,
> 
> On Tue, 3 Aug 2004, Steve White wrote:
> 
> > unsigned int
> > CCTK_NumTimerClocks( const cTimerData *info )
> > 	// Gets the number of clocks recorded in a timer measurement
> 
> What happens if 'unsigned int' isn't big enough?
> 
> E.g. at 1 microsecond resolution, a 32-bit unsigned integer will
> overflow in 71 minutes.  At 0.5 nanosecond resolution (= counting
> cpu clock cycles for a 2 GHz processor) it will overflow in just 2.1
> seconds. :(
> 
> Maybe we want either 'double' or CCTK_INT8 here?
> 
> ciao,
> 
> -- 
> -- Jonathan Thornburg <jthorn at aei.mpg.de>      
>    Max-Planck-Institut fuer Gravitationsphysik (Albert-Einstein-Institut),
>    Golm, Germany, "Old Europe"     http://www.aei.mpg.de/~jthorn/home.html      
>    "Washing one's hands of the conflict between the powerful and the
>     powerless means to side with the powerful, not to be neutral."
>                                       -- quote by Freire / poster by Oxfam
> 
> _______________________________________________
> Developers mailing list
> Developers at cactuscode.org
> http://www.cactuscode.org/mailman/listinfo/developers
> 
> 





More information about the Developers mailing list