Description
This RFC proposes to generalize the generation of random arrays in C benchmarks for sorted-input packages. It mainly tries to add a random factor for the generated values and make use of the already existing rand_double() function and time.h header for consistency between packages.
For example, for double precision packages, to be changed from: (e.g., from stats/base/strided/dminsorted)
x = (double *) malloc( len * sizeof( double ) );
for ( i = 0; i < len; i++ ) {
x[ i ] = i;
}
To:
x = (double *) malloc( len * sizeof( double ) );
for ( i = 0; i < len; i++ ) {
x[ i ] = (double)i + rand_double();
}
Packages that are directly affected by this (add more if found):
Related Issues
None.
Questions
Question 1
I suggest that we either enforce this or refactor the already existing packages that don't use any randomness by removing the time.h header and rand_double() function since they're not used anywhere in the benchmark.
Question 2
What about the absolute sorted-input packages? Current approach is: (from stats/base/strided/dmaxabssorted)
x = (double *) malloc( len * sizeof( double ) );
for ( i = 0; i < len; i++ ) {
x[ i ] = i - (len/2);
}
Other
No.
Checklist
Description
This RFC proposes to generalize the generation of random arrays in C benchmarks for sorted-input packages. It mainly tries to add a random factor for the generated values and make use of the already existing
rand_double()function andtime.hheader for consistency between packages.For example, for double precision packages, to be changed from: (e.g., from
stats/base/strided/dminsorted)To:
Packages that are directly affected by this (add more if found):
stats/strided/dmediansortedstats/strided/dmaxsortedstats/strided/dminsortedstats/strided/smediansortedstats/strided/smaxsortedstats/strided/sminsortedRelated Issues
None.
Questions
Question 1
I suggest that we either enforce this or refactor the already existing packages that don't use any randomness by removing the
time.hheader andrand_double()function since they're not used anywhere in the benchmark.Question 2
What about the absolute sorted-input packages? Current approach is: (from
stats/base/strided/dmaxabssorted)Other
No.
Checklist
RFC:.