Coefficient sizes [was: Re: [PPL-devel] Tinderbox status]
Matthew Mundell
mattm at comp.leeds.ac.uk
Thu Sep 22 11:40:51 CEST 2005
>> 4) the matasciidumpload1 test fails for some choices of the
>> Coefficient type.
>
> This is just from the size of random numbers being generated in the
> test. I'm on it.
For this test I'd like to generate a positive random number within the
bounds of the coefficient type. This requires the size of the
coefficient type. Is there an existing way to this size?
I've thought of defining a directive in configure.ac, say
COEFFICIENT_RAW_TYPE, and then calculating the random number as
follows.
#if defined(NATIVE_INTEGERS) || defined(CHECKED_INTEGERS)
tem = rand() % std::numeric_limits<COEFFICIENT_RAW_TYPE>::max();
#else
tem = rand();
#endif
Is there a better way to do this?
More information about the PPL-devel
mailing list