Hello community, here is the log from the commit of package libm4rie for openSUSE:Factory checked in at 2015-11-16 18:51:43 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/libm4rie (Old) and /work/SRC/openSUSE:Factory/.libm4rie.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "libm4rie" Changes: -------- --- /work/SRC/openSUSE:Factory/libm4rie/libm4rie.changes 2014-10-14 08:59:29.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.libm4rie.new/libm4rie.changes 2015-11-16 18:51:43.000000000 +0100 @@ -1,0 +2,6 @@ +Sat Nov 14 11:21:43 UTC 2015 - [email protected] + +- Update to new upstream release 20150908 +* Improvements to the build system and fixing a bug in the tests. + +------------------------------------------------------------------- Old: ---- m4rie-20140914.tar.gz New: ---- m4rie-20150908.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ libm4rie.spec ++++++ --- /var/tmp/diff_new_pack.BJ1nUK/_old 2015-11-16 18:51:44.000000000 +0100 +++ /var/tmp/diff_new_pack.BJ1nUK/_new 2015-11-16 18:51:44.000000000 +0100 @@ -1,7 +1,7 @@ # # spec file for package libm4rie # -# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -19,17 +19,17 @@ Name: libm4rie # Note that libm4rie is not always updated in lockstep with libm4ri, # and that is absolutely normal. -%define date 20140914 +%define date 20150908 %define lname libm4rie-0_0_%date Version: 0~%date Release: 0 Summary: Library for fast linear arithmetic over GF(2^e) License: GPL-2.0+ Group: Productivity/Scientific/Math -Url: http://m4ri.sagemath.org/ +Url: https://bitbucket.org/malb/m4rie -#Hg-Clone: https://bitbucket.org/malb/m4rie -Source: http://m4ri.sagemath.org/downloads/m4rie/m4rie-%date.tar.gz +#Git-Clone: https://bitbucket.org/malb/m4rie.git +Source: https://bitbucket.org/malb/m4rie/downloads/m4rie-%date.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: libm4ri-devel @@ -62,12 +62,11 @@ %build %configure --disable-static -make %{?_smp_mflags}; +make %{?_smp_mflags} %install -b="%buildroot"; -make install DESTDIR="$b"; -rm -f "$b/%_libdir"/*.la; +%make_install +rm -f "%buildroot/%_libdir"/*.la %files -n %lname %defattr(-,root,root) @@ -76,6 +75,6 @@ %files devel %defattr(-,root,root) %_libdir/libm4rie.so -%_includedir/m4rie +%_includedir/m4rie/ %changelog ++++++ m4rie-20140914.tar.gz -> m4rie-20150908.tar.gz ++++++ ++++ 4535 lines of diff (skipped) ++++ retrying with extended exclude list diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/m4rie-20140914/Makefile.am new/m4rie-20150908/Makefile.am --- old/m4rie-20140914/Makefile.am 2014-09-13 18:58:03.000000000 +0200 +++ new/m4rie-20150908/Makefile.am 2015-09-04 11:47:02.000000000 +0200 @@ -49,43 +49,6 @@ libm4rie_la_LDFLAGS = -release 0.0.$(RELEASE) -no-undefined ${M4RIE_M4RI_LDFLAGS} libm4rie_la_LIBADD = -lm4ri -#testing -TESTCFLAGS = ${AM_CFLAGS} @CFLAGS@ ${M4RIE_M4RI_CFLAGS} ${M4RI_CFLAGS} -I./tests -TESTLIBADD = -lm4ri -lm4rie -lm -TESTLDADD = -TESTLDFLAGS = ${M4RIE_M4RI_LDFLAGS} +SUBDIRS = . tests +DIST_SUBDIRS = $(SUBDIRS) bench -check_PROGRAMS = test_trsm test_elimination test_multiplication test_smallops test_ple -test_elimination_SOURCES = tests/test_elimination.c tests/testing.h -test_elimination_LDADD = ${TESTLDADD} ${TESTLIBADD} -test_elimination_LDFLAGS = ${TESTLDFLAGS} -test_elimination_CFLAGS = ${TESTCFLAGS} - -test_multiplication_SOURCES = tests/test_multiplication.c tests/testing.h -test_multiplication_LDADD = ${TESTLDADD} ${TESTLIBADD} -test_multiplication_LDFLAGS = ${TESTLDFLAGS} -test_multiplication_CFLAGS = ${TESTCFLAGS} - -test_smallops_SOURCES = tests/test_smallops.c tests/testing.h -test_smallops_LDADD = ${TESTLDADD} ${TESTLIBADD} -test_smallops_LDFLAGS = ${TESTLDFLAGS} -test_smallops_CFLAGS = ${TESTCFLAGS} - -test_trsm_SOURCES = tests/test_trsm.c tests/testing.h -test_trsm_LDADD = ${TESTLDADD} ${TESTLIBADD} -test_trsm_LDFLAGS = ${TESTLDFLAGS} -test_trsm_CFLAGS = ${TESTCFLAGS} - -test_ple_SOURCES = tests/test_ple.c tests/testing.h -test_ple_LDADD = ${TESTLDADD} ${TESTLIBADD} -test_ple_LDFLAGS = ${TESTLDFLAGS} -test_ple_CFLAGS = ${TESTCFLAGS} - -TESTS = test_trsm test_elimination test_multiplication test_smallops test_ple - -# benchmarketing - -SUBDIRS = . bench - -clean-local: - (cd tests; make clean; cd ..) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/m4rie-20140914/bench/Makefile.am new/m4rie-20150908/bench/Makefile.am --- old/m4rie-20140914/bench/Makefile.am 2014-09-13 19:01:19.000000000 +0200 +++ new/m4rie-20150908/bench/Makefile.am 2015-09-04 11:29:53.000000000 +0200 @@ -1,40 +1,63 @@ -CPUCYCLES_DIR=./cpucycles-20060326 +# TOPSRCDIR allows to compile this testsuite for a clone (and different revision) of this +# repository. If the environment variable topsrcdir is the top source directory of the clone, +# compile this testsuite as: +# +# make TOPSRCDIR="$topsrcdir" +# +# Finally, if you also leave out TOPSRCDIR and just run 'make' then the testsuite +# is compiled against the current source tree. + +AUTOMAKE_OPTIONS = foreign +TOPSRCDIR = $(srcdir)/.. +TOPBUILDDIR = $(builddir)/.. +DEFINES = +# include TOPBUILDIR for m4ri_config.h +AM_CFLAGS = -I$(TOPSRCDIR) -I$(TOPBUILDDIR) -D_XOPEN_SOURCE=600 @CFLAGS@ $(DEFINES) @OPENMP_CFLAGS@ ${M4RIE_M4RI_CFLAGS} + +STAGEDIR := $(realpath -s $(TOPBUILDDIR)/.libs) +AM_LDFLAGS = -L$(STAGEDIR) -Wl,-rpath,$(STAGEDIR) cpucycles.o -lm4ri -lm4rie -lm ${M4RIE_M4RI_LDFLAGS} -Wl,-rpath,${M4RIE_M4RI_PREFIX}/lib + +BENCH = bench_multiplication \ + bench_elimination \ + bench_smallops \ + bench_trsm \ + bench_ple + + +CPUCYCLES_DIR = cpucycles-20060326 + +CPUCYCLES_EXTRA_DIST = $(srcdir)/cpucycles-20060326/*.c \ + $(srcdir)/cpucycles-20060326/*.h \ + $(srcdir)/cpucycles-20060326/compile \ + $(srcdir)/cpucycles-20060326/do + +EXTRA_DIST = $(CPUCYCLES_EXTRA_DIST) + +bin_PROGRAMS = $(BENCH) + +bench_elimination_SOURCES = bench_elimination.c benchmarking.c benchmarking.h +bench_multiplication_SOURCES = bench_multiplication.c benchmarking.c benchmarking.h +bench_ple_SOURCES = bench_ple.c benchmarking.c benchmarking.h +bench_smallops_SOURCES = bench_smallops.c benchmarking.c benchmarking.h +bench_trsm_SOURCES = bench_trsm.c benchmarking.c benchmarking.h -BENCHCFLAGS = $(AM_CFLAGS) -I.. -I${CPUCYCLES_DIR} @CXXFLAGS@ -DNDEBUG ${M4RIE_M4RI_CFLAGS} -BENCHLIBADD = -lm4ri -lm cpucycles.o -BENCHLDFLAGS = -Wl,-rpath,../.libs/ ../.libs/libm4rie.so -L${CPUCYCLES_DIR} ${M4RIE_M4RI_LDFLAGS} -Wl,-rpath,${M4RIE_M4RI_PREFIX}/lib +BUILT_SOURCES = cpucycles.h -EXTRA_PROGRAMS = bench_multiplication bench_elimination bench_smallops bench_trsm bench_ple - -.PHONY: clean dist-clean +cpucycles.h: cpucycles.o cpucycles.o: - (cd $(CPUCYCLES_DIR); sh do; mv cpucycles.o ..; mv cpucycles.h ..; cd ../..) + (if [ $(srcdir) != $(builddir) ]; then \ + cp -r $(srcdir)/$(CPUCYCLES_DIR) $(builddir); \ + chmod +w -R $(CPUCYCLES_DIR)/; \ + fi; \ + cd $(CPUCYCLES_DIR); \ + sh do; \ + cp cpucycles.o ..; \ + cp cpucycles.h ..; \ + cd ..; \ + if [ $(srcdir) != $(builddir) ]; then \ + rm -r $(CPUCYCLES_DIR); \ + fi) -cpucycles.h: cpucycles.o - -clean-local: +distclean-local: -rm -f cpucycles.h - -rm -f $(EXTRA_PROGRAMS) - -bench_elimination_SOURCES=bench_elimination.c cpucycles.h benchmarking.c -bench_elimination_CFLAGS=${BENCHCFLAGS} -bench_elimination_LDFLAGS=${BENCHLDFLAGS} ${BENCHLIBADD} - -bench_multiplication_SOURCES=bench_multiplication.c cpucycles.h benchmarking.c -bench_multiplication_CFLAGS=${BENCHCFLAGS} -bench_multiplication_LDFLAGS=${BENCHLDFLAGS} ${BENCHLIBADD} - -bench_smallops_SOURCES=bench_smallops.c cpucycles.h benchmarking.c -bench_smallops_CFLAGS=${BENCHCFLAGS} -bench_smallops_LDFLAGS=${BENCHLDFLAGS} ${BENCHLIBADD} - -bench_trsm_SOURCES=bench_trsm.c cpucycles.h benchmarking.c -bench_trsm_CFLAGS=${BENCHCFLAGS} -bench_trsm_LDFLAGS=${BENCHLDFLAGS} ${BENCHLIBADD} - -bench_ple_SOURCES=bench_ple.c cpucycles.h benchmarking.c -bench_ple_CFLAGS=${BENCHCFLAGS} -bench_ple_LDFLAGS=${BENCHLDFLAGS} ${BENCHLIBADD} - -bench: cpucycles.o ${EXTRA_PROGRAMS} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/m4rie-20140914/bench/bench_elimination.c new/m4rie-20150908/bench/bench_elimination.c --- old/m4rie-20140914/bench/bench_elimination.c 2014-09-13 17:27:23.000000000 +0200 +++ new/m4rie-20150908/bench/bench_elimination.c 2015-01-15 18:05:23.000000000 +0100 @@ -1,5 +1,5 @@ #include <m4rie/m4rie.h> -#include <cpucycles.h> +#include "cpucycles.h" #include "benchmarking.h" struct elim_params { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/m4rie-20140914/bench/bench_multiplication.c new/m4rie-20150908/bench/bench_multiplication.c --- old/m4rie-20140914/bench/bench_multiplication.c 2014-09-13 17:27:31.000000000 +0200 +++ new/m4rie-20150908/bench/bench_multiplication.c 2015-01-15 18:04:25.000000000 +0100 @@ -1,5 +1,5 @@ #include <m4rie/m4rie.h> -#include <cpucycles.h> +#include "cpucycles.h" #include "benchmarking.h" struct mul_params { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/m4rie-20140914/bench/bench_ple.c new/m4rie-20150908/bench/bench_ple.c --- old/m4rie-20140914/bench/bench_ple.c 2014-09-13 17:27:40.000000000 +0200 +++ new/m4rie-20150908/bench/bench_ple.c 2015-01-15 18:05:47.000000000 +0100 @@ -1,5 +1,5 @@ #include <m4rie/m4rie.h> -#include <cpucycles.h> +#include "cpucycles.h" #include "benchmarking.h" struct ple_params { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/m4rie-20140914/bench/bench_smallops.c new/m4rie-20150908/bench/bench_smallops.c --- old/m4rie-20140914/bench/bench_smallops.c 2014-09-13 17:27:46.000000000 +0200 +++ new/m4rie-20150908/bench/bench_smallops.c 2015-01-15 18:04:53.000000000 +0100 @@ -1,5 +1,5 @@ #include <m4rie/m4rie.h> -#include <cpucycles.h> +#include "cpucycles.h" #include "benchmarking.h" struct smallops_params { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/m4rie-20140914/bench/bench_trsm.c new/m4rie-20150908/bench/bench_trsm.c --- old/m4rie-20140914/bench/bench_trsm.c 2014-09-13 17:27:52.000000000 +0200 +++ new/m4rie-20150908/bench/bench_trsm.c 2015-01-15 18:04:40.000000000 +0100 @@ -1,5 +1,5 @@ #include <m4rie/m4rie.h> -#include <cpucycles.h> +#include "cpucycles.h" #include "benchmarking.h" struct elim_params { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/m4rie-20140914/bench/benchmarking.h new/m4rie-20150908/bench/benchmarking.h --- old/m4rie-20140914/bench/benchmarking.h 1970-01-01 01:00:00.000000000 +0100 +++ new/m4rie-20150908/bench/benchmarking.h 2014-10-16 19:36:25.000000000 +0200 @@ -0,0 +1,37 @@ +#ifndef BENCHMARKETING_H +#define BENCHMARKETING_H + +#include <stdint.h> + +/* + * Command line options. See benchmarking.h for documentation. + */ +extern int bench_quiet; +extern int bench_dump; +extern int bench_minimum; +extern int bench_maximum; +extern unsigned long long bench_maxtime; +extern double bench_accuracy; +extern int bench_confidence_index; +extern char const* progname; +extern uint64_t bench_count; + +unsigned long long walltime(unsigned long long t0); + +int global_options(int* argcp, char*** argvp); +void bench_print_global_options(FILE*); + +int run_bench( + int (*f)(void* params, unsigned long long* data, int *data_len), + void* params, + unsigned long long* data, + int data_len); + +#ifdef HAVE_LIBPAPI +extern int papi_events[]; +extern int papi_array_len; +char* papi_event_name(int event); +#endif + +#define __M4RIE_OMEGA 2.80735492205760 +#endif //BENCHMARKETING_H diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/m4rie-20140914/bench/cpucycles-20060326/alpha.c new/m4rie-20150908/bench/cpucycles-20060326/alpha.c --- old/m4rie-20140914/bench/cpucycles-20060326/alpha.c 1970-01-01 01:00:00.000000000 +0100 +++ new/m4rie-20150908/bench/cpucycles-20060326/alpha.c 2014-10-16 19:36:25.000000000 +0200 @@ -0,0 +1,80 @@ +/* +cpucycles/alpha.c version 20060316 +D. J. Bernstein +Public domain. +*/ + +#include <time.h> +#include <unistd.h> +#include <sys/time.h> + +static long long tod(void) +{ + struct timeval t; + gettimeofday(&t,(struct timezone *) 0); + return t.tv_sec * (long long) 1000000 + t.tv_usec; +} + +static long long rpcc(void) +{ + unsigned long long t; + asm volatile("rpcc %0" : "=r"(t)); + return t & 0xffffffff; +} + +static long long firstrpcc; +static long long firsttod; +static long long lastrpcc; +static long long lasttod; +static double mhz = 0; + +static void init(void) +{ + firstrpcc = rpcc(); + firsttod = tod(); + + do { + lastrpcc = rpcc(); + lasttod = tod(); + } while (lasttod - firsttod < 10000); + + lastrpcc -= firstrpcc; lastrpcc &= 0xffffffff; + lasttod -= firsttod; + + mhz = (double) lastrpcc / (double) lasttod; +} + +long long cpucycles_alpha(void) +{ + double x; + long long y; + + if (!mhz) init(); + + lastrpcc = rpcc(); + lasttod = tod(); + + lastrpcc -= firstrpcc; lastrpcc &= 0xffffffff; + lasttod -= firsttod; + + /* Number of cycles since firstrpcc is lastrpcc + 2^32 y for unknown y. */ + /* Number of microseconds since firsttod is lasttod. */ + + x = (lasttod * mhz - lastrpcc) * 0.00000000023283064365386962890625; + y = x; + while (x > y + 0.5) y += 1; + while (x < y - 0.5) y -= 1; + + y *= 4294967296ULL; + lastrpcc += y; + + mhz = (double) lastrpcc / (double) lasttod; + + return firstrpcc + lastrpcc; +} + +long long cpucycles_alpha_persecond(void) +{ + if (!mhz) init(); + return 1000000.0 * mhz; +} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/m4rie-20140914/bench/cpucycles-20060326/alpha.h new/m4rie-20150908/bench/cpucycles-20060326/alpha.h --- old/m4rie-20140914/bench/cpucycles-20060326/alpha.h 1970-01-01 01:00:00.000000000 +0100 +++ new/m4rie-20150908/bench/cpucycles-20060326/alpha.h 2014-10-16 19:36:25.000000000 +0200 @@ -0,0 +1,27 @@ +/* +cpucycles alpha.h version 20060318 +D. J. Bernstein +Public domain. +*/ + +#ifndef CPUCYCLES_alpha_h +#define CPUCYCLES_alpha_h + +#ifdef __cplusplus +extern "C" { +#endif + +extern long long cpucycles_alpha(void); +extern long long cpucycles_alpha_persecond(void); + +#ifdef __cplusplus +} +#endif + +#ifndef cpucycles_implementation +#define cpucycles_implementation "alpha" +#define cpucycles cpucycles_alpha +#define cpucycles_persecond cpucycles_alpha_persecond +#endif + +#endif diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/m4rie-20140914/bench/cpucycles-20060326/amd64cpuinfo.c new/m4rie-20150908/bench/cpucycles-20060326/amd64cpuinfo.c --- old/m4rie-20140914/bench/cpucycles-20060326/amd64cpuinfo.c 1970-01-01 01:00:00.000000000 +0100 +++ new/m4rie-20150908/bench/cpucycles-20060326/amd64cpuinfo.c 2014-10-16 19:36:25.000000000 +0200 @@ -0,0 +1,30 @@ +#include <stdio.h> +#include <sys/types.h> + +long long cpucycles_amd64cpuinfo(void) +{ + unsigned long long result; + asm volatile(".byte 15;.byte 49;shlq $32,%%rdx;orq %%rdx,%%rax" + : "=a" (result) :: "%rdx"); + return result; +} + +long long cpucycles_amd64cpuinfo_persecond(void) +{ + FILE *f; + double result; + int s; + + f = fopen("/proc/cpuinfo","r"); + if (!f) return 0; + + for (;;) { + s = fscanf(f,"cpu MHz : %lf",&result); + if (s > 0) break; + if (s == 0) s = fscanf(f,"%*[^\n]\n"); + if (s < 0) { result = 0; break; } + } + + fclose(f); + return 1000000.0 * result; +} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/m4rie-20140914/bench/cpucycles-20060326/amd64cpuinfo.h new/m4rie-20150908/bench/cpucycles-20060326/amd64cpuinfo.h --- old/m4rie-20140914/bench/cpucycles-20060326/amd64cpuinfo.h 1970-01-01 01:00:00.000000000 +0100 +++ new/m4rie-20150908/bench/cpucycles-20060326/amd64cpuinfo.h 2014-10-16 19:36:25.000000000 +0200 @@ -0,0 +1,27 @@ +/* +cpucycles amd64cpuinfo.h version 20060318 +D. J. Bernstein +Public domain. +*/ + +#ifndef CPUCYCLES_amd64cpuinfo_h +#define CPUCYCLES_amd64cpuinfo_h + +#ifdef __cplusplus +extern "C" { +#endif + +extern long long cpucycles_amd64cpuinfo(void); +extern long long cpucycles_amd64cpuinfo_persecond(void); + +#ifdef __cplusplus +} +#endif + +#ifndef cpucycles_implementation +#define cpucycles_implementation "amd64cpuinfo" +#define cpucycles cpucycles_amd64cpuinfo +#define cpucycles_persecond cpucycles_amd64cpuinfo_persecond +#endif + +#endif diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/m4rie-20140914/bench/cpucycles-20060326/amd64tscfreq.c new/m4rie-20150908/bench/cpucycles-20060326/amd64tscfreq.c --- old/m4rie-20140914/bench/cpucycles-20060326/amd64tscfreq.c 1970-01-01 01:00:00.000000000 +0100 +++ new/m4rie-20150908/bench/cpucycles-20060326/amd64tscfreq.c 2014-10-16 19:36:25.000000000 +0200 @@ -0,0 +1,18 @@ +#include <stdio.h> +#include <sys/types.h> + +long long cpucycles_amd64tscfreq(void) +{ + unsigned long long result; + asm volatile(".byte 15;.byte 49;shlq $32,%%rdx;orq %%rdx,%%rax" + : "=a" (result) :: "%rdx"); + return result; +} + +long long cpucycles_amd64tscfreq_persecond(void) +{ + long result = 0; + size_t resultlen = sizeof(long); + sysctlbyname("machdep.tsc_freq",&result,&resultlen,0,0); + return result; +} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/m4rie-20140914/bench/cpucycles-20060326/amd64tscfreq.h new/m4rie-20150908/bench/cpucycles-20060326/amd64tscfreq.h --- old/m4rie-20140914/bench/cpucycles-20060326/amd64tscfreq.h 1970-01-01 01:00:00.000000000 +0100 +++ new/m4rie-20150908/bench/cpucycles-20060326/amd64tscfreq.h 2014-10-16 19:36:25.000000000 +0200 @@ -0,0 +1,27 @@ +/* +cpucycles amd64tscfreq.h version 20060318 +D. J. Bernstein +Public domain. +*/ + +#ifndef CPUCYCLES_amd64tscfreq_h +#define CPUCYCLES_amd64tscfreq_h + +#ifdef __cplusplus +extern "C" { +#endif + +extern long long cpucycles_amd64tscfreq(void); +extern long long cpucycles_amd64tscfreq_persecond(void); + +#ifdef __cplusplus +} +#endif + +#ifndef cpucycles_implementation +#define cpucycles_implementation "amd64tscfreq" +#define cpucycles cpucycles_amd64tscfreq +#define cpucycles_persecond cpucycles_amd64tscfreq_persecond +#endif + +#endif diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/m4rie-20140914/bench/cpucycles-20060326/clockmonotonic.c new/m4rie-20150908/bench/cpucycles-20060326/clockmonotonic.c --- old/m4rie-20140914/bench/cpucycles-20060326/clockmonotonic.c 1970-01-01 01:00:00.000000000 +0100 +++ new/m4rie-20150908/bench/cpucycles-20060326/clockmonotonic.c 2014-10-16 19:36:25.000000000 +0200 @@ -0,0 +1,34 @@ +#include <time.h> +#include <stdio.h> +#include <unistd.h> +#include <sys/time.h> +#include <sys/types.h> +#include <sys/sysctl.h> + +static double cpufrequency = 0; + +static void init(void) +{ + long result = 0; size_t resultlen = sizeof(long); + sysctlbyname("machdep.tsc_freq",&result,&resultlen,0,0); + cpufrequency = result; +} + +long long cpucycles_clockmonotonic(void) +{ + double result; + struct timespec t; + if (!cpufrequency) init(); + clock_gettime(CLOCK_MONOTONIC,&t); + result = t.tv_nsec; + result *= 0.000000001; + result += (double) t.tv_sec; + result *= cpufrequency; + return result; +} + +long long cpucycles_clockmonotonic_persecond(void) +{ + if (!cpufrequency) init(); + return cpufrequency; +} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/m4rie-20140914/bench/cpucycles-20060326/clockmonotonic.h new/m4rie-20150908/bench/cpucycles-20060326/clockmonotonic.h --- old/m4rie-20140914/bench/cpucycles-20060326/clockmonotonic.h 1970-01-01 01:00:00.000000000 +0100 +++ new/m4rie-20150908/bench/cpucycles-20060326/clockmonotonic.h 2014-10-16 19:36:25.000000000 +0200 @@ -0,0 +1,27 @@ +/* +cpucycles clockmonotonic.h version 20060318 +D. J. Bernstein +Public domain. +*/ + +#ifndef CPUCYCLES_clockmonotonic_h +#define CPUCYCLES_clockmonotonic_h + +#ifdef __cplusplus +extern "C" { +#endif + +extern long long cpucycles_clockmonotonic(void); +extern long long cpucycles_clockmonotonic_persecond(void); + +#ifdef __cplusplus +} +#endif + +#ifndef cpucycles_implementation +#define cpucycles_implementation "clockmonotonic" +#define cpucycles cpucycles_clockmonotonic +#define cpucycles_persecond cpucycles_clockmonotonic_persecond +#endif + +#endif diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/m4rie-20140914/bench/cpucycles-20060326/compile new/m4rie-20150908/bench/cpucycles-20060326/compile --- old/m4rie-20140914/bench/cpucycles-20060326/compile 1970-01-01 01:00:00.000000000 +0100 +++ new/m4rie-20150908/bench/cpucycles-20060326/compile 2014-10-16 19:36:25.000000000 +0200 @@ -0,0 +1,31 @@ +#!/bin/sh +case "$COMPILER" in + suncc) + case "$ARCHITECTURE" in + 64) /opt/SUNWspro/bin/cc -xarch=v9 -O2 "$@" ;; + 32) /opt/SUNWspro/bin/cc -xarch=v8 -O2 "$@" ;; + *) /opt/SUNWspro/bin/cc -O2 "$@" ;; + esac + ;; + ibmcc) + case "$ARCHITECTURE" in + 64) xlc -q64 -O2 "$@" ;; + 32) xlc -q32 -O2 "$@" ;; + *) xlc -O2 "$@" ;; + esac + ;; + hpcc) + case "$ARCHITECTURE" in + 64) /opt/ansic/bin/cc +DD64 -O2 "$@" ;; + 32) /opt/ansic/bin/cc +DD32 -O2 "$@" ;; + *) /opt/ansic/bin/cc -O2 "$@" ;; + esac + ;; + *) + case "$ARCHITECTURE" in + 64) gcc -m64 -O2 "$@" ;; + 32) gcc -m32 -O2 "$@" ;; + *) gcc -O2 "$@" ;; + esac + ;; +esac diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/m4rie-20140914/bench/cpucycles-20060326/cpucycles.h new/m4rie-20150908/bench/cpucycles-20060326/cpucycles.h --- old/m4rie-20140914/bench/cpucycles-20060326/cpucycles.h 1970-01-01 01:00:00.000000000 +0100 +++ new/m4rie-20150908/bench/cpucycles-20060326/cpucycles.h 2015-09-04 11:27:25.000000000 +0200 @@ -0,0 +1,27 @@ +/* +cpucycles amd64cpuinfo.h version 20060318 +D. J. Bernstein +Public domain. +*/ + +#ifndef CPUCYCLES_amd64cpuinfo_h +#define CPUCYCLES_amd64cpuinfo_h + +#ifdef __cplusplus +extern "C" { +#endif + +extern long long cpucycles_amd64cpuinfo(void); +extern long long cpucycles_amd64cpuinfo_persecond(void); + +#ifdef __cplusplus +} +#endif + +#ifndef cpucycles_implementation +#define cpucycles_implementation "amd64cpuinfo" +#define cpucycles cpucycles_amd64cpuinfo +#define cpucycles_persecond cpucycles_amd64cpuinfo_persecond +#endif + +#endif diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/m4rie-20140914/bench/cpucycles-20060326/do new/m4rie-20150908/bench/cpucycles-20060326/do --- old/m4rie-20140914/bench/cpucycles-20060326/do 1970-01-01 01:00:00.000000000 +0100 +++ new/m4rie-20150908/bench/cpucycles-20060326/do 2014-10-16 19:36:25.000000000 +0200 @@ -0,0 +1,47 @@ +#!/bin/sh + +output="cpucycles.o cpucycles.h" +cleanup="test cpucycles-impl.o cpucycles-impl.h cpucycles-impl.c" + +exec 2>do.notes +rm -f $output $cleanup + +( + echo amd64tscfreq gcc + echo amd64cpuinfo gcc + echo x86tscfreq gcc + echo x86cpuinfo gcc + echo powerpclinux gcc + echo powerpcmacos gcc + echo powerpcaix gcc + echo powerpcaix ibmcc + echo sparcpsrinfo gcc + echo sparcpsrinfo suncc + echo sparc32psrinfo gcc + echo sparc32psrinfo suncc + echo hppapstat gcc + echo hppapstat hpcc + echo alpha gcc + echo clockmonotonic gcc + echo gettimeofday gcc +) | ( + while read name compiler + do + echo ===== Trying $name.c with $compiler... >&2 + rm -f $cleanup + cp $name.c cpucycles-impl.c || continue + cp $name.h cpucycles-impl.h || continue + env COMPILER=$compiler ./compile -c cpucycles-impl.c || continue + env COMPILER=$compiler ./compile -o test test.c cpucycles-impl.o || continue + ./test || continue + echo ===== Success. Using $name.c. >&2 + mv cpucycles-impl.o cpucycles.o + mv cpucycles-impl.h cpucycles.h + rm -f $cleanup + exit 0 + done + + echo ===== Giving up. >&2 + rm -f $output $cleanup + exit 111 +) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/m4rie-20140914/bench/cpucycles-20060326/gettimeofday.c new/m4rie-20150908/bench/cpucycles-20060326/gettimeofday.c --- old/m4rie-20140914/bench/cpucycles-20060326/gettimeofday.c 1970-01-01 01:00:00.000000000 +0100 +++ new/m4rie-20150908/bench/cpucycles-20060326/gettimeofday.c 2014-10-16 19:36:25.000000000 +0200 @@ -0,0 +1,45 @@ +#include <time.h> +#include <stdio.h> +#include <unistd.h> +#include <sys/time.h> + +static double cpufrequency = 0; + +static void init(void) +{ + FILE *f; + double result; + int s; + + f = fopen("/proc/cpuinfo","r"); + if (!f) return; + + for (;;) { + s = fscanf(f,"cpu MHz : %lf",&result); + if (s > 0) break; + if (s == 0) s = fscanf(f,"%*[^\n]\n"); + if (s < 0) { result = 0; break; } + } + fclose(f); + + cpufrequency = 1000000.0 * result; +} + +long long cpucycles_gettimeofday(void) +{ + double result; + struct timeval t; + if (!cpufrequency) init(); + gettimeofday(&t,(struct timezone *) 0); + result = t.tv_usec; + result *= 0.000001; + result += (double) t.tv_sec; + result *= cpufrequency; + return result; +} + +long long cpucycles_gettimeofday_persecond(void) +{ + if (!cpufrequency) init(); + return cpufrequency; +} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/m4rie-20140914/bench/cpucycles-20060326/gettimeofday.h new/m4rie-20150908/bench/cpucycles-20060326/gettimeofday.h --- old/m4rie-20140914/bench/cpucycles-20060326/gettimeofday.h 1970-01-01 01:00:00.000000000 +0100 +++ new/m4rie-20150908/bench/cpucycles-20060326/gettimeofday.h 2014-10-16 19:36:25.000000000 +0200 @@ -0,0 +1,27 @@ +/* +cpucycles gettimeofday.h version 20060318 +D. J. Bernstein +Public domain. +*/ + +#ifndef CPUCYCLES_gettimeofday_h +#define CPUCYCLES_gettimeofday_h + +#ifdef __cplusplus +extern "C" { +#endif + +extern long long cpucycles_gettimeofday(void); +extern long long cpucycles_gettimeofday_persecond(void); + +#ifdef __cplusplus +} +#endif + +#ifndef cpucycles_implementation +#define cpucycles_implementation "gettimeofday" +#define cpucycles cpucycles_gettimeofday +#define cpucycles_persecond cpucycles_gettimeofday_persecond +#endif + +#endif diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/m4rie-20140914/bench/cpucycles-20060326/hppapstat.c new/m4rie-20150908/bench/cpucycles-20060326/hppapstat.c --- old/m4rie-20140914/bench/cpucycles-20060326/hppapstat.c 1970-01-01 01:00:00.000000000 +0100 +++ new/m4rie-20150908/bench/cpucycles-20060326/hppapstat.c 2014-10-16 19:36:25.000000000 +0200 @@ -0,0 +1,26 @@ +#include <stdio.h> +#include <unistd.h> +#include <sys/types.h> +#include <sys/param.h> +#include <sys/pstat.h> +#include <machine/inline.h> + +long long cpucycles_hppapstat(void) +{ + register long long result; + _MFCTL(16,result); + return result; +} + +long long cpucycles_hppapstat_persecond(void) +{ + struct pst_processor pst; + union pstun pu; + double result; + + pu.pst_processor = &pst; + if (pstat(PSTAT_PROCESSOR,pu,sizeof(pst),1,0) < 0) return 0; + result = pst.psp_iticksperclktick; + result *= (double) sysconf(_SC_CLK_TCK); + return result; +} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/m4rie-20140914/bench/cpucycles-20060326/hppapstat.h new/m4rie-20150908/bench/cpucycles-20060326/hppapstat.h --- old/m4rie-20140914/bench/cpucycles-20060326/hppapstat.h 1970-01-01 01:00:00.000000000 +0100 +++ new/m4rie-20150908/bench/cpucycles-20060326/hppapstat.h 2014-10-16 19:36:25.000000000 +0200 @@ -0,0 +1,27 @@ +/* +cpucycles hppapstat.h version 20060319 +D. J. Bernstein +Public domain. +*/ + +#ifndef CPUCYCLES_hppapstat_h +#define CPUCYCLES_hppapstat_h + +#ifdef __cplusplus +extern "C" { +#endif + +extern long long cpucycles_hppapstat(void); +extern long long cpucycles_hppapstat_persecond(void); + +#ifdef __cplusplus +} +#endif + +#ifndef cpucycles_implementation +#define cpucycles_implementation "hppapstat" +#define cpucycles cpucycles_hppapstat +#define cpucycles_persecond cpucycles_hppapstat_persecond +#endif + +#endif diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/m4rie-20140914/bench/cpucycles-20060326/powerpcaix.c new/m4rie-20150908/bench/cpucycles-20060326/powerpcaix.c --- old/m4rie-20140914/bench/cpucycles-20060326/powerpcaix.c 1970-01-01 01:00:00.000000000 +0100 +++ new/m4rie-20150908/bench/cpucycles-20060326/powerpcaix.c 2014-10-16 19:36:25.000000000 +0200 @@ -0,0 +1,76 @@ +#include <time.h> +#include <stdio.h> +#include <unistd.h> +#include <sys/time.h> +#include <sys/types.h> + +static long myround(double u) +{ + long result = u; + while (result + 0.5 < u) result += 1; + while (result - 0.5 > u) result -= 1; + return result; +} + +static long long microseconds(void) +{ + struct timeval t; + gettimeofday(&t,(struct timezone *) 0); + return t.tv_sec * (long long) 1000000 + t.tv_usec; +} + +static long long timebase(void) +{ + unsigned long high; + unsigned long low; + unsigned long newhigh; + unsigned long long result; + asm volatile( + "Lcpucycles:mftbu %0;mftb %1;mftbu %2;cmpw %0,%2;bne Lcpucycles" + : "=r" (high), "=r" (low), "=r" (newhigh) + ); + result = high; + result <<= 32; + result |= low; + return result; +} + +static double cpufrequency = 0; +static long tbcycles = 0; + +static void init(void) +{ + FILE *f; + long long tb0; long long us0; + long long tb1; long long us1; + + f = popen("/usr/sbin/lsattr -E -l proc0 -a frequency","r"); + if (!f) return; + if (fscanf(f,"frequency %lf",&cpufrequency) < 1) cpufrequency = 0; + pclose(f); + if (!cpufrequency) return; + + tb0 = timebase(); + us0 = microseconds(); + do { + tb1 = timebase(); + us1 = microseconds(); + } while (us1 - us0 < 10000); + if (tb1 <= tb0) return; + + tb1 -= tb0; + us1 -= us0; + tbcycles = myround((cpufrequency * 0.000001 * (double) us1) / (double) tb1); +} + +long long cpucycles_powerpcaix(void) +{ + if (!tbcycles) init(); + return timebase() * tbcycles; +} + +long long cpucycles_powerpcaix_persecond(void) +{ + if (!tbcycles) init(); + return cpufrequency; +} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/m4rie-20140914/bench/cpucycles-20060326/powerpcaix.h new/m4rie-20150908/bench/cpucycles-20060326/powerpcaix.h --- old/m4rie-20140914/bench/cpucycles-20060326/powerpcaix.h 1970-01-01 01:00:00.000000000 +0100 +++ new/m4rie-20150908/bench/cpucycles-20060326/powerpcaix.h 2014-10-16 19:36:25.000000000 +0200 @@ -0,0 +1,27 @@ +/* +cpucycles powerpcaix.h version 20060318 +D. J. Bernstein +Public domain. +*/ + +#ifndef CPUCYCLES_powerpcaix_h +#define CPUCYCLES_powerpcaix_h + +#ifdef __cplusplus +extern "C" { +#endif + +extern long long cpucycles_powerpcaix(void); +extern long long cpucycles_powerpcaix_persecond(void); + +#ifdef __cplusplus +} +#endif + +#ifndef cpucycles_implementation +#define cpucycles_implementation "powerpcaix" +#define cpucycles cpucycles_powerpcaix +#define cpucycles_persecond cpucycles_powerpcaix_persecond +#endif + +#endif diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/m4rie-20140914/bench/cpucycles-20060326/powerpclinux.c new/m4rie-20150908/bench/cpucycles-20060326/powerpclinux.c --- old/m4rie-20140914/bench/cpucycles-20060326/powerpclinux.c 1970-01-01 01:00:00.000000000 +0100 +++ new/m4rie-20150908/bench/cpucycles-20060326/powerpclinux.c 2014-10-16 19:36:25.000000000 +0200 @@ -0,0 +1,85 @@ +#include <time.h> +#include <stdio.h> +#include <unistd.h> +#include <sys/time.h> +#include <sys/types.h> + +static long myround(double u) +{ + long result = u; + while (result + 0.5 < u) result += 1; + while (result - 0.5 > u) result -= 1; + return result; +} + +static long long microseconds(void) +{ + struct timeval t; + gettimeofday(&t,(struct timezone *) 0); + return t.tv_sec * (long long) 1000000 + t.tv_usec; +} + +static long long timebase(void) +{ + unsigned long high; + unsigned long low; + unsigned long newhigh; + unsigned long long result; + asm volatile( + "Lcpucycles:mftbu %0;mftb %1;mftbu %2;cmpw %0,%2;bne Lcpucycles" + : "=r" (high), "=r" (low), "=r" (newhigh) + ); + result = high; + result <<= 32; + result |= low; + return result; +} + +static double cpufrequency = 0; +static long tbcycles = 0; + +static void init(void) +{ + FILE *f; + int s; + long long tb0; long long us0; + long long tb1; long long us1; + + f = fopen("/proc/cpuinfo","r"); + if (!f) return 0; + + for (;;) { + s = fscanf(f," clock : %lf MHz",&cpufrequency); + if (s > 0) break; + if (s == 0) s = fscanf(f,"%*[^\n]\n"); + if (s < 0) { cpufrequency = 0; break; } + } + + fclose(f); + if (!cpufrequency) return; + cpufrequency *= 1000000.0; + + tb0 = timebase(); + us0 = microseconds(); + do { + tb1 = timebase(); + us1 = microseconds(); + } while (us1 - us0 < 10000); + if (tb1 <= tb0) return; + + tb1 -= tb0; + us1 -= us0; + tbcycles = myround((cpufrequency * 0.000001 * (double) us1) / (double) tb1); +} + +long long cpucycles_powerpclinux(void) +{ + if (!tbcycles) init(); + return timebase() * tbcycles; +} + +long long cpucycles_powerpclinux_persecond(void) +{ + if (!tbcycles) init(); + return cpufrequency; +} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/m4rie-20140914/bench/cpucycles-20060326/powerpclinux.h new/m4rie-20150908/bench/cpucycles-20060326/powerpclinux.h --- old/m4rie-20140914/bench/cpucycles-20060326/powerpclinux.h 1970-01-01 01:00:00.000000000 +0100 +++ new/m4rie-20150908/bench/cpucycles-20060326/powerpclinux.h 2014-10-16 19:36:25.000000000 +0200 @@ -0,0 +1,27 @@ +/* +cpucycles powerpclinux.h version 20060319 +D. J. Bernstein +Public domain. +*/ + +#ifndef CPUCYCLES_powerpclinux_h +#define CPUCYCLES_powerpclinux_h + +#ifdef __cplusplus +extern "C" { +#endif + +extern long long cpucycles_powerpclinux(void); +extern long long cpucycles_powerpclinux_persecond(void); + +#ifdef __cplusplus +} +#endif + +#ifndef cpucycles_implementation +#define cpucycles_implementation "powerpclinux" +#define cpucycles cpucycles_powerpclinux +#define cpucycles_persecond cpucycles_powerpclinux_persecond +#endif + +#endif diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/m4rie-20140914/bench/cpucycles-20060326/powerpcmacos.c new/m4rie-20150908/bench/cpucycles-20060326/powerpcmacos.c --- old/m4rie-20140914/bench/cpucycles-20060326/powerpcmacos.c 1970-01-01 01:00:00.000000000 +0100 +++ new/m4rie-20150908/bench/cpucycles-20060326/powerpcmacos.c 2014-10-16 19:36:25.000000000 +0200 @@ -0,0 +1,41 @@ +#include <sys/types.h> +#include <sys/sysctl.h> +#include <mach/mach_time.h> + +#define timebase mach_absolute_time + +static int cpumib[2] = { CTL_HW, HW_CPU_FREQ } ; +static int tbmib[2] = { CTL_HW, HW_TB_FREQ } ; + +static long myround(double u) +{ + long result = u; + while (result + 0.5 < u) result += 1; + while (result - 0.5 > u) result -= 1; + return result; +} + +static long tbcycles = 0; + +static void init(void) +{ + int cpufrequency = 0; size_t cpufrequencylen = sizeof(int); + int tbfrequency = 0; size_t tbfrequencylen = sizeof(int); + sysctl(cpumib,2,&cpufrequency,&cpufrequencylen,0,0); + sysctl(tbmib,2,&tbfrequency,&tbfrequencylen,0,0); + if (tbfrequency > 0) + tbcycles = myround((double) cpufrequency / (double) tbfrequency); +} + +long long cpucycles_powerpcmacos(void) +{ + if (!tbcycles) init(); + return timebase() * tbcycles; +} + +long long cpucycles_powerpcmacos_persecond(void) +{ + int result = 0; size_t resultlen = sizeof(int); + sysctl(cpumib,2,&result,&resultlen,0,0); + return result; +} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/m4rie-20140914/bench/cpucycles-20060326/powerpcmacos.h new/m4rie-20150908/bench/cpucycles-20060326/powerpcmacos.h --- old/m4rie-20140914/bench/cpucycles-20060326/powerpcmacos.h 1970-01-01 01:00:00.000000000 +0100 +++ new/m4rie-20150908/bench/cpucycles-20060326/powerpcmacos.h 2014-10-16 19:36:25.000000000 +0200 @@ -0,0 +1,27 @@ +/* +cpucycles powerpcmacos.h version 20060319 +D. J. Bernstein +Public domain. +*/ + +#ifndef CPUCYCLES_powerpcmacos_h +#define CPUCYCLES_powerpcmacos_h + +#ifdef __cplusplus +extern "C" { +#endif + +extern long long cpucycles_powerpcmacos(void); +extern long long cpucycles_powerpcmacos_persecond(void); + +#ifdef __cplusplus +} +#endif + +#ifndef cpucycles_implementation +#define cpucycles_implementation "powerpcmacos" +#define cpucycles cpucycles_powerpcmacos +#define cpucycles_persecond cpucycles_powerpcmacos_persecond +#endif + +#endif diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/m4rie-20140914/bench/cpucycles-20060326/sparc32psrinfo.c new/m4rie-20150908/bench/cpucycles-20060326/sparc32psrinfo.c --- old/m4rie-20140914/bench/cpucycles-20060326/sparc32psrinfo.c 1970-01-01 01:00:00.000000000 +0100 +++ new/m4rie-20150908/bench/cpucycles-20060326/sparc32psrinfo.c 2014-10-16 19:36:25.000000000 +0200 @@ -0,0 +1,34 @@ +#include <stdio.h> +#include <sys/types.h> + +long long cpucycles_sparc32psrinfo(void) +{ + long long result; + asm volatile( + ".word 0x93410000;.word 0x91327020;mov %%g0,%0" + : "=r" (result) + : + : "%g0" + ); + return result; +} + +long long cpucycles_sparc32psrinfo_persecond(void) +{ + FILE *f; + double result; + int s; + + f = popen("/usr/sbin/psrinfo -v","r"); + if (!f) return 0; + + for (;;) { + s = fscanf(f," The %*s processor operates at %lf MHz",&result); + if (s > 0) break; + if (s == 0) s = fscanf(f,"%*[^\n]\n"); + if (s < 0) { result = 0; break; } + } + + pclose(f); + return 1000000.0 * result; +} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/m4rie-20140914/bench/cpucycles-20060326/sparc32psrinfo.h new/m4rie-20150908/bench/cpucycles-20060326/sparc32psrinfo.h --- old/m4rie-20140914/bench/cpucycles-20060326/sparc32psrinfo.h 1970-01-01 01:00:00.000000000 +0100 +++ new/m4rie-20150908/bench/cpucycles-20060326/sparc32psrinfo.h 2014-10-16 19:36:25.000000000 +0200 @@ -0,0 +1,27 @@ +/* +cpucycles sparc32psrinfo.h version 20060319 +D. J. Bernstein +Public domain. +*/ + +#ifndef CPUCYCLES_sparc32psrinfo_h +#define CPUCYCLES_sparc32psrinfo_h + +#ifdef __cplusplus +extern "C" { +#endif + +extern long long cpucycles_sparc32psrinfo(void); +extern long long cpucycles_sparc32psrinfo_persecond(void); + +#ifdef __cplusplus +} +#endif + +#ifndef cpucycles_implementation +#define cpucycles_implementation "sparc32psrinfo" +#define cpucycles cpucycles_sparc32psrinfo +#define cpucycles_persecond cpucycles_sparc32psrinfo_persecond +#endif + +#endif diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/m4rie-20140914/bench/cpucycles-20060326/sparcpsrinfo.c new/m4rie-20150908/bench/cpucycles-20060326/sparcpsrinfo.c --- old/m4rie-20140914/bench/cpucycles-20060326/sparcpsrinfo.c 1970-01-01 01:00:00.000000000 +0100 +++ new/m4rie-20150908/bench/cpucycles-20060326/sparcpsrinfo.c 2014-10-16 19:36:25.000000000 +0200 @@ -0,0 +1,29 @@ +#include <stdio.h> +#include <sys/types.h> + +long long cpucycles_sparcpsrinfo(void) +{ + long long result; + asm volatile("rd %%tick,%0" : "=r" (result)); + return result; +} + +long long cpucycles_sparcpsrinfo_persecond(void) +{ + FILE *f; + double result; + int s; + + f = popen("/usr/sbin/psrinfo -v","r"); + if (!f) return 0; + + for (;;) { + s = fscanf(f," The %*s processor operates at %lf MHz",&result); + if (s > 0) break; + if (s == 0) s = fscanf(f,"%*[^\n]\n"); + if (s < 0) { result = 0; break; } + } + + pclose(f); + return 1000000.0 * result; +} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/m4rie-20140914/bench/cpucycles-20060326/sparcpsrinfo.h new/m4rie-20150908/bench/cpucycles-20060326/sparcpsrinfo.h --- old/m4rie-20140914/bench/cpucycles-20060326/sparcpsrinfo.h 1970-01-01 01:00:00.000000000 +0100 +++ new/m4rie-20150908/bench/cpucycles-20060326/sparcpsrinfo.h 2014-10-16 19:36:25.000000000 +0200 @@ -0,0 +1,27 @@ +/* +cpucycles sparcpsrinfo.h version 20060318 +D. J. Bernstein +Public domain. +*/ + +#ifndef CPUCYCLES_sparcpsrinfo_h +#define CPUCYCLES_sparcpsrinfo_h + +#ifdef __cplusplus +extern "C" { +#endif + +extern long long cpucycles_sparcpsrinfo(void); +extern long long cpucycles_sparcpsrinfo_persecond(void); + +#ifdef __cplusplus +} +#endif + +#ifndef cpucycles_implementation +#define cpucycles_implementation "sparcpsrinfo" +#define cpucycles cpucycles_sparcpsrinfo +#define cpucycles_persecond cpucycles_sparcpsrinfo_persecond +#endif + +#endif diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/m4rie-20140914/bench/cpucycles-20060326/test.c new/m4rie-20150908/bench/cpucycles-20060326/test.c --- old/m4rie-20140914/bench/cpucycles-20060326/test.c 1970-01-01 01:00:00.000000000 +0100 +++ new/m4rie-20150908/bench/cpucycles-20060326/test.c 2014-10-16 19:36:25.000000000 +0200 @@ -0,0 +1,59 @@ +#include <time.h> +#include <stdio.h> +#include <unistd.h> +#include <sys/time.h> +#include "cpucycles-impl.h" + +static long long tod(void) +{ + struct timeval t; + gettimeofday(&t,(struct timezone *) 0); + return t.tv_sec * (long long) 1000000 + t.tv_usec; +} + +long long todstart; +long long todend; +long long cpustart; +long long cpuend; + +long long t[1001]; + +main() +{ + int i; + + for (i = 0;i <= 1000;++i) t[i] = cpucycles(); + for (i = 0;i < 1000;++i) if (t[i] > t[i + 1]) { + fprintf(stderr,"t[%d] = %lld\n",i,t[i]); + fprintf(stderr,"t[%d] = %lld\n",i + 1,t[i + 1]); + fprintf(stderr,"cpucycles_persecond() = %lld\n",cpucycles_persecond()); + return 100; + } + if (t[0] == t[1000]) { + fprintf(stderr,"t[%d] = %lld\n",0,t[0]); + fprintf(stderr,"t[%d] = %lld\n",1000,t[1000]); + fprintf(stderr,"cpucycles_persecond() = %lld\n",cpucycles_persecond()); + return 100; + } + if (cpucycles_persecond() <= 0) { + fprintf(stderr,"cpucycles_persecond() = %lld\n",cpucycles_persecond()); + return 100; + } + + todstart = tod(); + cpustart = cpucycles(); + sleep(1); + todend = tod(); + cpuend = cpucycles(); + + todend -= todstart; + cpuend -= cpustart; + + for (i = 0;i <= 1000;++i) t[i] = cpucycles(); + printf("%s",cpucycles_implementation); + printf(" %lld",cpucycles_persecond()); + printf(" %lld",(long long) (((double) cpuend) * 1000000.0 / (double) todend)); + for (i = 0;i < 64;++i) printf(" %lld",t[i + 1] - t[i]); + printf("\n"); + return 0; +} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/m4rie-20140914/bench/cpucycles-20060326/x86cpuinfo.c new/m4rie-20150908/bench/cpucycles-20060326/x86cpuinfo.c --- old/m4rie-20140914/bench/cpucycles-20060326/x86cpuinfo.c 1970-01-01 01:00:00.000000000 +0100 +++ new/m4rie-20150908/bench/cpucycles-20060326/x86cpuinfo.c 2014-10-16 19:36:25.000000000 +0200 @@ -0,0 +1,29 @@ +#include <stdio.h> +#include <sys/types.h> + +long long cpucycles_x86cpuinfo(void) +{ + long long result; + asm volatile(".byte 15;.byte 49" : "=A" (result)); + return result; +} + +long long cpucycles_x86cpuinfo_persecond(void) +{ + FILE *f; + double result; + int s; + + f = fopen("/proc/cpuinfo","r"); + if (!f) return 0; + + for (;;) { + s = fscanf(f,"cpu MHz : %lf",&result); + if (s > 0) break; + if (s == 0) s = fscanf(f,"%*[^\n]\n"); + if (s < 0) { result = 0; break; } + } + + fclose(f); + return 1000000.0 * result; +} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/m4rie-20140914/bench/cpucycles-20060326/x86cpuinfo.h new/m4rie-20150908/bench/cpucycles-20060326/x86cpuinfo.h --- old/m4rie-20140914/bench/cpucycles-20060326/x86cpuinfo.h 1970-01-01 01:00:00.000000000 +0100 +++ new/m4rie-20150908/bench/cpucycles-20060326/x86cpuinfo.h 2014-10-16 19:36:25.000000000 +0200 @@ -0,0 +1,27 @@ +/* +cpucycles x86cpuinfo.h version 20060318 +D. J. Bernstein +Public domain. +*/ + +#ifndef CPUCYCLES_x86cpuinfo_h +#define CPUCYCLES_x86cpuinfo_h + +#ifdef __cplusplus +extern "C" { +#endif + +extern long long cpucycles_x86cpuinfo(void); +extern long long cpucycles_x86cpuinfo_persecond(void); + +#ifdef __cplusplus +} +#endif + +#ifndef cpucycles_implementation +#define cpucycles_implementation "x86cpuinfo" +#define cpucycles cpucycles_x86cpuinfo +#define cpucycles_persecond cpucycles_x86cpuinfo_persecond +#endif + +#endif diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/m4rie-20140914/bench/cpucycles-20060326/x86tscfreq.c new/m4rie-20150908/bench/cpucycles-20060326/x86tscfreq.c --- old/m4rie-20140914/bench/cpucycles-20060326/x86tscfreq.c 1970-01-01 01:00:00.000000000 +0100 +++ new/m4rie-20150908/bench/cpucycles-20060326/x86tscfreq.c 2014-10-16 19:36:25.000000000 +0200 @@ -0,0 +1,17 @@ +#include <sys/types.h> +#include <sys/sysctl.h> + +long long cpucycles_x86tscfreq(void) +{ + long long result; + asm volatile(".byte 15;.byte 49" : "=A" (result)); + return result; +} + +long long cpucycles_x86tscfreq_persecond(void) +{ + long result = 0; + size_t resultlen = sizeof(long); + sysctlbyname("machdep.tsc_freq",&result,&resultlen,0,0); + return result; +} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/m4rie-20140914/bench/cpucycles-20060326/x86tscfreq.h new/m4rie-20150908/bench/cpucycles-20060326/x86tscfreq.h --- old/m4rie-20140914/bench/cpucycles-20060326/x86tscfreq.h 1970-01-01 01:00:00.000000000 +0100 +++ new/m4rie-20150908/bench/cpucycles-20060326/x86tscfreq.h 2014-10-16 19:36:25.000000000 +0200 @@ -0,0 +1,27 @@ +/* +cpucycles x86tscfreq.h version 20060318 +D. J. Bernstein +Public domain. +*/ + +#ifndef CPUCYCLES_x86tscfreq_h +#define CPUCYCLES_x86tscfreq_h + +#ifdef __cplusplus +extern "C" { +#endif + +extern long long cpucycles_x86tscfreq(void); +extern long long cpucycles_x86tscfreq_persecond(void); + +#ifdef __cplusplus +} +#endif + +#ifndef cpucycles_implementation +#define cpucycles_implementation "x86tscfreq" +#define cpucycles cpucycles_x86tscfreq +#define cpucycles_persecond cpucycles_x86tscfreq_persecond +#endif + +#endif diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/m4rie-20140914/bench/cpucycles.h new/m4rie-20150908/bench/cpucycles.h --- old/m4rie-20140914/bench/cpucycles.h 2014-09-13 22:32:32.000000000 +0200 +++ new/m4rie-20150908/bench/cpucycles.h 1970-01-01 01:00:00.000000000 +0100 @@ -1,27 +0,0 @@ -/* -cpucycles amd64cpuinfo.h version 20060318 -D. J. Bernstein -Public domain. -*/ - -#ifndef CPUCYCLES_amd64cpuinfo_h -#define CPUCYCLES_amd64cpuinfo_h - -#ifdef __cplusplus -extern "C" { -#endif - -extern long long cpucycles_amd64cpuinfo(void); -extern long long cpucycles_amd64cpuinfo_persecond(void); - -#ifdef __cplusplus -} -#endif - -#ifndef cpucycles_implementation -#define cpucycles_implementation "amd64cpuinfo" -#define cpucycles cpucycles_amd64cpuinfo -#define cpucycles_persecond cpucycles_amd64cpuinfo_persecond -#endif - -#endif diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/m4rie-20140914/configure.ac new/m4rie-20150908/configure.ac --- old/m4rie-20140914/configure.ac 2014-09-13 17:22:46.000000000 +0200 +++ new/m4rie-20150908/configure.ac 2015-09-04 10:52:09.000000000 +0200 @@ -1,4 +1,4 @@ -AC_INIT(m4rie,20140914) +AC_INIT(m4rie,20150908) AC_CANONICAL_HOST @@ -64,6 +64,6 @@ AC_PROG_MAKE_SET -AC_CONFIG_FILES([Makefile bench/Makefile]) +AC_CONFIG_FILES([Makefile tests/Makefile bench/Makefile]) AC_OUTPUT diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/m4rie-20140914/m4rie/blm.c new/m4rie-20150908/m4rie/blm.c --- old/m4rie-20140914/m4rie/blm.c 2014-06-30 06:50:21.000000000 +0200 +++ new/m4rie-20150908/m4rie/blm.c 2014-11-02 13:30:25.000000000 +0100 @@ -412,9 +412,9 @@ pivots->rows[r][1] = w; w++; - if (w == f->G->ncols) { + if (w == (word)f->G->ncols) { v++; - if (v == f->F->ncols) + if (v == (word)f->F->ncols) v = 0; w = v; } @@ -430,8 +430,6 @@ r = rank; } } - mzd_free(F_T); - mzd_free(G_T); mzp_free(P); mzp_free(Q); @@ -442,6 +440,8 @@ for(wi_t j=0; j< C->width; j++) C->rows[r][j] = F_T->rows[v][j] & G_T->rows[w][j]; } + mzd_free(F_T); + mzd_free(G_T); // This should be replaced by TRSM calls mzd_t *D = mzd_inv_m4ri(NULL, C, 0); @@ -457,7 +457,7 @@ for(rci_t j=0; j<m; j++) { v = pivots->rows[j][0]; w = pivots->rows[j][1]; - if ((v+w) == i) + if ((v+w) == (word)i) mzd_write_bit(a, 0, j, 1); } mzd_mul(b, a, DT, 0); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/m4rie-20140914/tests/Makefile.am new/m4rie-20150908/tests/Makefile.am --- old/m4rie-20140914/tests/Makefile.am 1970-01-01 01:00:00.000000000 +0100 +++ new/m4rie-20150908/tests/Makefile.am 2015-09-04 11:13:03.000000000 +0200 @@ -0,0 +1,13 @@ +AUTOMAKE_OPTIONS = foreign subdir-objects + +AM_CFLAGS = ${SIMD_FLAGS} ${OPENMP_CFLAGS} ${DEBUG_FLAGS} ${M4RIE_M4RI_CFLAGS} ${M4RI_CFLAGS} +CFLAGS = ${AM_CFLAGS} -I.. @CFLAGS@ ${M4RIE_M4RI_CFLAGS} ${M4RI_CFLAGS} +LDADD = ${top_builddir}/libm4rie.la -lm4ri -lm +LDFLAGS = ${M4RIE_M4RI_LDFLAGS} -no-install + +EXTRA_DIST = testing.h + +TESTS = test_trsm test_elimination test_multiplication test_smallops test_ple +check_PROGRAMS = ${TESTS} + +all: ${TESTS} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/m4rie-20140914/tests/test_smallops.c new/m4rie-20150908/tests/test_smallops.c --- old/m4rie-20140914/tests/test_smallops.c 2014-09-13 17:24:17.000000000 +0200 +++ new/m4rie-20150908/tests/test_smallops.c 2014-11-02 13:20:30.000000000 +0100 @@ -65,7 +65,7 @@ mzd_slice_free(b); return fail_ret; -}; +} int test_slice_known_answers(gf2e *ff, int m, int n) { int fail_ret = 0; @@ -210,7 +210,6 @@ fail_ret += test_batch(ff, 65, 129); fail_ret += test_batch(ff, 201, 200); fail_ret += test_batch(ff, 217, 2); - gf2e_free(ff); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/m4rie-20140914/tests/testing.h new/m4rie-20150908/tests/testing.h --- old/m4rie-20140914/tests/testing.h 2014-09-13 18:44:38.000000000 +0200 +++ new/m4rie-20150908/tests/testing.h 2014-11-02 13:21:47.000000000 +0100 @@ -1,5 +1,5 @@ #include <unistd.h> -#include <m4rie.h> +#include <m4rie/m4rie.h> #define m4rie_check(expr) \ if (!expr) { \ @@ -110,8 +110,8 @@ return 0; } } - return 1; } + return 1; } static inline mzed_t *random_mzed_t(gf2e *ff, int m, int n) {
