On 01/24/16 12:29 PM, Erik de Castro Lopo wrote:> Dave Yeo wrote:> >> After this the build dies with, >> util.c: In function 'benchmark_function': >> util.c:124:17: error: 'CLOCK_PROCESS_CPUTIME_ID' undeclared (first use >> in this function) >> clock_gettime (CLOCK_PROCESS_CPUTIME_ID, &start) ; >> >> Would using gettimeofday() be accurate enough? > > AS a fall back yes, but not as replacement on platforms with clock_gettime(). > >> Perhaps simpler just to >> disable the microbench test on OS/2 as gettimeofday() would require a >> configure test and OS/2 is a minor platform? > > > I would accept a patch that disables the microsbenchmark on OS/2 I would > also accept one that uses gettimeofday() when clock_gettime() is not > available.Here's one attempt, added configure options to disable AVX and clock_gettime, only tested on OS/2. With this compilation succeeds on OS/2. Make check does eventually fail with, ... WAVE fixup test... prepare... encode... decode... compare... OK AIFF fixup test... prepare... encode... decode... compare... OK Generating multiple input files from noise... ERROR: creating files with dd ... which I don't understand. Perhaps buggy dd. I take it this succeeds on Windows. Since $COMSPEC is set here we take the if_win path. Dave -------------- next part -------------- A non-text attachment was scrubbed... Name: 0001-Enable-disabling-AVX-and-AVX2-instructions-through-a.patch Type: application/x-patch Size: 1903 bytes Desc: not available Url : http://lists.xiph.org/pipermail/flac-dev/attachments/20160203/a1593929/attachment.bin -------------- next part -------------- A non-text attachment was scrubbed... Name: 0002-Use-gettimeofday-for-benchmarking.patch Type: application/x-patch Size: 2802 bytes Desc: not available Url : http://lists.xiph.org/pipermail/flac-dev/attachments/20160203/a1593929/attachment-0001.bin
Dave Yeo wrote:> On 01/24/16 12:29 PM, Erik de Castro Lopo wrote:> Dave Yeo wrote: > > > >> After this the build dies with, > >> util.c: In function 'benchmark_function': > >> util.c:124:17: error: 'CLOCK_PROCESS_CPUTIME_ID' undeclared (first use > >> in this function) > >> clock_gettime (CLOCK_PROCESS_CPUTIME_ID, &start) ; > >> > >> Would using gettimeofday() be accurate enough? > > > > AS a fall back yes, but not as replacement on platforms with clock_gettime(). > > > >> Perhaps simpler just to > >> disable the microbench test on OS/2 as gettimeofday() would require a > >> configure test and OS/2 is a minor platform? > > > > > > I would accept a patch that disables the microsbenchmark on OS/2 I would > > also accept one that uses gettimeofday() when clock_gettime() is not > > available.I'm happy with the first patch (making AVX and AVX2 a configure option) and I've committed and pushed it to the repo. The configure stuff in the second seems overly complex. Is something like this: AC_CHECK_LIB(rt, clock_gettime, have_clock_gettime=yes) if test x$have_clock_gettime = xyes; then AC_DEFINE(HAVE_CLOCK_GETTIME) fi not sufficient? You can either test this and provide an updated patch or I can fix it here. Cheers, Erik -- ---------------------------------------------------------------------- Erik de Castro Lopo http://www.mega-nerd.com/
On 02/08/16 03:25 AM, Erik de Castro Lopo wrote:> The configure stuff in the second seems overly complex. Is something like > this: > > AC_CHECK_LIB(rt, clock_gettime, have_clock_gettime=yes) > if test x$have_clock_gettime = xyes; then > AC_DEFINE(HAVE_CLOCK_GETTIME) > fi > > not sufficient? You can either test this and provide an updated patch or > I can fix it here.Yes, much simpler and works fine. Thanks Dave -------------- next part -------------- A non-text attachment was scrubbed... Name: 0001-Use-gettimeofday-for-benchmarking.patch Type: application/x-patch Size: 2451 bytes Desc: not available Url : http://lists.xiph.org/pipermail/flac-dev/attachments/20160208/900ea89d/attachment-0001.bin