summaryrefslogtreecommitdiff
path: root/tools
Commit message (Collapse)AuthorAgeFilesLines
* Simplify SIMD make scriptsBassam Tabbara2016-09-133-2/+14
| | | | | | | | | | | | | | | ax_ext.m4 no longer performs any CPU checks. Instead it just checks if the the compile supports SIMD flags. Runtime detection will choose the right methods base on CPU instructions available. Intel AVX support is still done through the build since it would require a major refactoring of the code base to support it at runtime. For now I added a configuration flag --enable-avx that can be used to compile with AVX support. Also use cpu intrinsics instead of __asm__
* Support for runtime SIMD detectionBassam Tabbara2016-09-132-0/+233
| | | | | | | | | | This commits adds support for runtime detection of SIMD instructions. The idea is that you would build once with all supported SIMD functions and the same binaries could run on different machines with varying support for SIMD. At runtime gf-complete will select the right functions based on the processor. gf_cpu.c has the logic to detect SIMD instructions. On Intel processors this is done through cpuid. For ARM on linux we use getauxv. The logic in gf_w*.c has been changed to check for runtime SIMD support and fallback to generic code. Also a new test has been added. It compares the functions selected by gf_init when we enable/disable SIMD support through build flags, with runtime enabling/disabling. The test checks if the results are identical.
* Add SIMD test helpersBassam Tabbara2016-09-132-0/+379
| | | | | | | | | | | | | This commit adds a couple of scripts that help test SIMD functionality on different machines through QEMU. tools/test_simd_qemu.sh will automatically start qemu, run tests and stop it. it uses the Ubuntu cloud images which are built for x86_64, arm and arm64. tools/test_simd.sh run a number of tests including compiling with different flags, unit tests, and gathering the functions selected in gf_init (and when compiling with DEBUG_FUNCTIONS)
* Add support for printing functions selected in gf_initBassam Tabbara2016-09-131-3/+21
| | | | | | | | | | | | | | | | | | | | | | | | | There is currently no way to figure out which functions were selected during gf_init and as a result of SIMD options. This is not even possible in gdb since most functions are static. This commit adds a new macro SET_FUNCTION that records the name of the function selected during init inside the gf_internal structure. This macro only works when DEBUG_FUNCTIONS is defined during compile. Otherwise the code works exactly as it did before this change. The names of selected functions will be used during testing of SIMD runtime detection. All calls such as: gf->multiply.w32 = gf_w16_shift_multiply; need to be replaced with the following: SET_FUNCTION(gf,multiply,w32,gf_w16_shift_multiply) Also added a new flag to tools/gf_methods that will print the names of functions selected during gf_init.
* log-zero-ext: workaround for uninitialized memoryLoic Dachary2016-09-131-1/+2
| | | | | | Workaround until issue #13 is dealt with. Signed-off-by: Loic Dachary <loic@dachary.org>
* add --enable-valgrind for make checkLoic Dachary2016-09-131-1/+5
| | | | | | | If --enable-valgrind is given to ./configure, all tests are run with valgrind set to fail if an error is reported ( --error-exitcode=1 ) Signed-off-by: Loic Dachary <loic@dachary.org>
* use posix_memalign to align memory for SIMD region testsJanne Grunau2014-10-091-2/+22
| | | | Properly emulate aligned allocation if posix_memalign is not available.
* simd: rename the region flags from SSE to SIMDJanne Grunau2014-10-091-1/+1
| | | | | SSE is not the only supported SIMD instruction set. Keep the old names for backward compatibility.
* check: split unit tests and support paralell executionJanne Grunau2014-10-092-11/+16
|
* build: fix out of source tree buildJanne Grunau2014-10-091-2/+2
|
* Removed comments marking CARRY_FREE_GK additions.Adam Disney2014-06-161-1/+0
|
* Merge remote-tracking branch 'dalgaaf/wip-da-sca-20140513'Adam Disney2014-06-163-8/+14
|\
| * gf_time.c: remove dead assignment to 'elapsed'Danny Al-Gaaf2014-05-141-2/+0
| | | | | | | | Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
| * tools/gf_poly.c: fix undefined allocation of 0 bytesDanny Al-Gaaf2014-05-141-2/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Due to man page of malloc the behaviour in case of allocation size of 0 bytes is undefined: "If size was equal to 0, either NULL or a pointer suitable to be passed to free() is returned" Fix for clang scan-build report: Unix API Undefined allocation of 0 bytes (CERT MEM04-C; CWE-131) 210 poly = (gf_general_t *) malloc(sizeof(gf_general_t)*(n+1)); 9 Call to 'malloc' has an allocation size of 0 bytes Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
| * gf_inline_time.c: fix memory leakDanny Al-Gaaf2014-05-131-4/+6
| | | | | | | | | | | | | | | | Free all with malloc allocated memory before exit. Change if checks against 'w' to be a if-else check to prevent checking after already matched. Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
* | Fixed a few minor warnings when running autogen.sh.Adam Disney2014-06-161-1/+1
| |
* | Merge remote-tracking branch 'jayrde/wip-autoconf-cleanup'Adam Disney2014-06-161-1068/+0
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: .gitignore INSTALL Makefile.in aclocal.m4 config.guess config.sub configure examples/Makefile.in include/config.h.in include/config.h.in~ install-sh ltmain.sh m4/libtool.m4 m4/ltversion.m4 missing src/Makefile.in test/Makefile.in tools/Makefile.in
| * | remove autogenerated files from repositoryJens Rosenboom2014-03-181-512/+0
| | |
* | | Implemented CARRY_FREE_GK. Sections added are tagged with a comment //ADAMAdam Disney2014-06-061-2/+3
| |/ |/| | | | | for easy navigation.
* | Ran autogen to pick-up the changes needed to run 'make check'Kevin Greenan2014-04-021-118/+674
| |
* | add make check target and basic testsLoic Dachary2014-04-022-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | To conveniently run tests as $ make check ============================================================================ Testsuite summary for gf-complete 1.0 ============================================================================ # TOTAL: 1 # PASS: 1 # SKIP: 0 # XFAIL: 0 # FAIL: 0 # XPASS: 0 # ERROR: 0 ============================================================================ The run-tests.sh script loops over gf_methods and is introduced because autotools does not allow tests to have parameters in the Makefile.am Signed-off-by: Loic Dachary <loic@dachary.org>
* | main() returns intLoic Dachary2014-03-062-1/+2
| | | | | | | | Signed-off-by: Loic Dachary <loic@dachary.org>
* | remove unused variables from #if SSE blocsLoic Dachary2014-03-063-5/+3
| | | | | | | | Signed-off-by: Loic Dachary <loic@dachary.org>
* | remove spurious i < in for loopLoic Dachary2014-03-061-1/+1
| | | | | | | | Signed-off-by: Loic Dachary <loic@dachary.org>
* | silence some warnings for unset variablesLoic Dachary2014-03-061-2/+2
| | | | | | | | | | | | | | By setting them when they are defined and when the compiler fails to see the logic is ok. Signed-off-by: Loic Dachary <loic@dachary.org>
* | cast void* to char* for pointer arithmeticLoic Dachary2014-03-061-6/+7
|/ | | | Signed-off-by: Loic Dachary <loic@dachary.org>
* Removed GROUP/128/SSE. It wasn't compiling, and it needed an overhaul.Jim Plank2014-01-011-2/+2
| | | | I'll do it someday when I'm bored.
* Third.1 time's a charm (autoconf non-sense for PCLMUL).Kevin Greenan2013-12-301-234/+114
|
* Revert "Third time's a charm (autoconf non-sense for PCLMUL)."Kevin Greenan2013-12-301-66/+136
| | | | | | The commit was not successfully pushed (not sure what happened). This reverts commit 762926920aa6b0067443e7c085bddf22d03a1d04.
* Third time's a charm (autoconf non-sense for PCLMUL).Kevin Greenan2013-12-301-136/+66
|
* Added entry to configure.ac to avoid running autotools during normal build.Kevin Greenan2013-12-301-3/+4
|
* Added PCLMUL to the autoconf macro...Kevin Greenan2013-12-301-66/+136
|
* Some wordsmithing.Jim Plank2013-12-302-14/+18
|
* Added time_tool.sh to tools for quick timing.Jim Plank2013-12-292-81/+256
| | | | Modified gf_methods to be a little more flexible.
* Added exhaustive test support (Ethan's changes to gf_unit and gf_methods) ↵Kevin Greenan2013-12-073-51/+58
| | | | and overrode autoconf's defaults for CFLAGS.
* Setting up autoconf/automake for GF-CompleteKevin Greenan2013-12-049-0/+1637
Also re-organized the directory structure. Signed-off-by: Kevin Greenan <kmgreen2@gmail.com>