Commit Graph

160 Commits (58eebabd204998364355eee293402929502bf1a9)

Author SHA1 Message Date
Loic Dachary 58eebabd20 documentation: update with jerasure.org new home
Signed-off-by: Loic Dachary <loic@dachary.org>
2014-12-25 11:55:49 +01:00
Loic Dachary cbbf35b6d2 Revert "Removed PDF from the repo and added a note in the README that describes how to"
This reverts commit 9311b4fc10.
2014-12-25 11:51:38 +01:00
kmgreen2 e0e400aaf6 Merge pull request #1 from dachary/wip-assert
use assert(0) instead of exit(1)
2014-12-06 08:09:55 -08:00
Loic Dachary 29427efac2 use assert(0) instead of exit(1)
When a fatal error (unaligned memory etc.) is detected, gf-complete should
assert(3) instead of exit(3) to give a chance to the calling program to
catch the exception and display a stack trace. Although it is possible
for gdb to display the stack trace and break on exit, libraries are not
usually expected to terminate the calling program in this way.

Signed-off-by: Loic Dachary <loic@dachary.org>
2014-12-02 00:27:27 +01:00
Kevin Greenan 70dd94ae38 Merged in jannau/gf-complete/neon (pull request #25)
arm neon optimisations
2014-10-24 14:19:31 -07:00
Janne Grunau 6fdd8bc3d3 arm: NEON optimisations for gf_w64
Optimisations for 4,64 split table region multiplications. Only used on
ARMv8-A since it is not faster on ARMv7-A.
2014-10-24 14:54:55 +02:00
Janne Grunau 370c88b901 arm: NEON optimisations for gf_w32
Optimisations for 4,32 split table multiplications.

Selected time_tool.sh results on a 1.7 GHz cortex-a9:
Region Best (MB/s):   346.67   W-Method: 32 -m SPLIT 32 4 -r SIMD -
Region Best (MB/s):    92.89   W-Method: 32 -m SPLIT 32 4 -r NOSIMD -
Region Best (MB/s):   258.17   W-Method: 32 -m SPLIT 32 4 -r SIMD -r ALTMAP -
Region Best (MB/s):   162.00   W-Method: 32 -m SPLIT 32 8 -
Region Best (MB/s):   160.53   W-Method: 32 -m SPLIT 8 8 -
Region Best (MB/s):    32.74   W-Method: 32 -m COMPOSITE 2 - -
Region Best (MB/s):   199.79   W-Method: 32 -m COMPOSITE 2 - -r ALTMAP -
2014-10-24 14:54:27 +02:00
Janne Grunau 474010a91d arm: NEON optimisations for gf_w16
Optimisations for the 4,16 split table region multiplications.

Selected time_tool.sh 16 -A -B results for a 1.7 GHz cortex-a9:
Region Best (MB/s):   532.14   W-Method: 16 -m SPLIT 16 4 -r SIMD -
Region Best (MB/s):   212.34   W-Method: 16 -m SPLIT 16 4 -r NOSIMD -
Region Best (MB/s):   801.36   W-Method: 16 -m SPLIT 16 4 -r SIMD -r ALTMAP -
Region Best (MB/s):    93.20   W-Method: 16 -m SPLIT 16 4 -r NOSIMD -r ALTMAP -
Region Best (MB/s):   273.99   W-Method: 16 -m SPLIT 16 8 -
Region Best (MB/s):   270.81   W-Method: 16 -m SPLIT 8 8 -
Region Best (MB/s):    70.42   W-Method: 16 -m COMPOSITE 2 - -
Region Best (MB/s):   393.54   W-Method: 16 -m COMPOSITE 2 - -r ALTMAP -
2014-10-24 14:53:57 +02:00
Janne Grunau bec15359de arm: NEON optimisations for gf_w8
Optimisations for the 4,4 split table region multiplication and carry
less multiplication using NEON's polynomial long multiplication.
arm: w8: NEON carry less multiplication

Selected time_tool.sh results for a 1.7GHz cortex-a9:
Region Best (MB/s):   375.86   W-Method: 8 -m CARRY_FREE -
Region Best (MB/s):   142.94   W-Method: 8 -m TABLE -
Region Best (MB/s):   225.01   W-Method: 8 -m TABLE -r DOUBLE -
Region Best (MB/s):   211.23   W-Method: 8 -m TABLE -r DOUBLE -r LAZY -
Region Best (MB/s):   160.09   W-Method: 8 -m LOG -
Region Best (MB/s):   123.61   W-Method: 8 -m LOG_ZERO -
Region Best (MB/s):   123.85   W-Method: 8 -m LOG_ZERO_EXT -
Region Best (MB/s):  1183.79   W-Method: 8 -m SPLIT 8 4 -r SIMD -
Region Best (MB/s):   177.68   W-Method: 8 -m SPLIT 8 4 -r NOSIMD -
Region Best (MB/s):    87.85   W-Method: 8 -m COMPOSITE 2 - -
Region Best (MB/s):   428.59   W-Method: 8 -m COMPOSITE 2 - -r ALTMAP -
2014-10-24 14:53:35 +02:00
Janne Grunau 1311a44f7a arm: NEON optimisations for gf_w4
Optimisations for the single table region multiplication and carry less
multiplication using NEON's polynomial multiplication of 8-bit values.

The single polynomial multiplication is not that useful but vector
version is for region multiplication.

Selected time_tool.sh results for a 1.7GHz cortex-a9:
Region Best (MB/s):   672.72   W-Method: 4 -m CARRY_FREE -
Region Best (MB/s):   265.84   W-Method: 4 -m BYTWO_p -
Region Best (MB/s):   329.41   W-Method: 4 -m TABLE -r DOUBLE -
Region Best (MB/s):   278.63   W-Method: 4 -m TABLE -r QUAD -
Region Best (MB/s):   329.81   W-Method: 4 -m TABLE -r QUAD -r LAZY -
Region Best (MB/s):  1318.03   W-Method: 4 -m TABLE -r SIMD -
Region Best (MB/s):   165.15   W-Method: 4 -m TABLE -r NOSIMD -
Region Best (MB/s):    99.73   W-Method: 4 -m LOG -
2014-10-24 14:53:12 +02:00
Janne Grunau 3a1be40ea8 arm: NEON optimisations for XOR in gf_multby_one 2014-10-09 23:25:36 +02:00
Janne Grunau 36e75c3efe use posix_memalign to align memory for SIMD region tests
Properly emulate aligned allocation if posix_memalign is not available.
2014-10-09 23:22:34 +02:00
Janne Grunau eb5ce0ca42 configure: add ARM/AArch64 NEON support
Checks for arm_neon.h header.
2014-10-09 23:22:33 +02:00
Janne Grunau 568df90edc simd: rename the region flags from SSE to SIMD
SSE is not the only supported SIMD instruction set. Keep the old names
for backward compatibility.
2014-10-09 23:22:32 +02:00
Janne Grunau 2a2f1e306f check: split unit tests and support paralell execution 2014-10-09 23:22:29 +02:00
Janne Grunau f6828cfbc1 build: fix out of source tree build 2014-10-09 23:22:28 +02:00
Janne Grunau d315d20d56 build: make CFLAGS user setable
There is no need to force the non-default CFLAGS on users trying to set
them via enviroment variable or on configure command.
2014-10-09 23:19:28 +02:00
Kevin Greenan 62d4b81a83 Merged in dachary/gf-complete/wip-static-code-analysis (pull request #24)
static code analysis fixes
2014-10-03 08:55:35 -07:00
Loic Dachary dfffff2740 remove dead code in create_gf_from_argv
Since there can only be one -m, base cannot be set by -m COMPOSITE and
then deallocated on the second -m if it is bugous. The second -m will
exit on error at _gf_errno = GF_E_TWOMULT;.

Signed-off-by: Loic Dachary <loic-201408@dachary.org>
2014-09-17 10:08:37 +02:00
Loic Dachary 7c06749ab8 disable gf_error_check test that requires >> 64
Because >> 64 does not have a defined behavior.

Signed-off-by: Loic Dachary <loic-201408@dachary.org>
2014-09-17 10:08:37 +02:00
Kevin Greenan 87d7e8fbb0 Merged in beol/gf-complete (pull request #23)
On CPU that doesn't support SSE4.2 instructions set, this will fail
2014-08-23 11:14:11 -07:00
Leo Laksmana 6f160921dc On CPU that doesn't support SSE4.2 instructions set, this will fail
because incorrect header is included.

smmintrin.h => SSE4.1
nmmintrin.h => SSE4.2
2014-08-23 18:08:31 +08:00
Adam Disney c25310f215 Removed comments marking CARRY_FREE_GK additions. 2014-06-16 13:04:15 -04:00
Adam Disney f48f2d38af Merge remote-tracking branch 'dalgaaf/wip-da-sca-20140513' 2014-06-16 12:44:45 -04:00
Adam Disney 5be1fecbcb Fixed a few minor warnings when running autogen.sh. 2014-06-16 12:27:19 -04:00
Adam Disney d08de3bdcb Merge remote-tracking branch 'jayrde/wip-autoconf-cleanup'
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
2014-06-16 12:24:06 -04:00
Kevin Greenan 259d91ad43 autoreconf'd to reflect addition of --disable-sse 2014-06-09 12:36:05 -07:00
Kevin Greenan a11dc931ff Adding option to disable SSE in autoconf script 2014-06-09 11:21:01 -07:00
Kevin Greenan 9311b4fc10 Removed PDF from the repo and added a note in the README that describes how to
get the manual.
2014-06-09 08:34:50 -07:00
Adam Disney 6bb1ebb9f4 Implemented CARRY_FREE_GK. Sections added are tagged with a comment //ADAM
for easy navigation.
2014-06-06 13:09:04 -04:00
Danny Al-Gaaf 5832024d68 gf_w32.c: remove dead assignment with no effect
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2014-05-14 16:15:52 +02:00
Danny Al-Gaaf 40b9f8f968 gf_time.c: remove dead assignment to 'elapsed'
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2014-05-14 16:12:59 +02:00
Danny Al-Gaaf 83f1eee1c2 gf_w32.c: fix/remove some dead assignments
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2014-05-14 16:10:49 +02:00
Danny Al-Gaaf bfa6671fa9 gf_w16.c: fix/remove some dead assignments
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2014-05-14 16:09:55 +02:00
Danny Al-Gaaf eb3bb91d84 gf_w128.c: remove some dead assignments
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2014-05-14 16:00:05 +02:00
Danny Al-Gaaf 925802a06a gf_w8.c: fix dead assignment report from scan-build
Fix dead assignment in case of INTEL_SSSE3 defined.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2014-05-14 15:44:06 +02:00
Danny Al-Gaaf c0dd8e0fe2 gf_w64.c: remove dead assignments and unused variable 'm2'
The 'm2' variable in gf_w64_clm_multiply_region_from_single_2() isn't
used except for calculations on 'm2' which are not used later in the code.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2014-05-14 10:49:20 +02:00
Danny Al-Gaaf 277819a972 gf_w64.c: remove dead assigments in gf_w64_shift_multiply()
These assigments are never used and directly overwritten later
in the function.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2014-05-14 10:46:05 +02:00
Danny Al-Gaaf 3e242830b0 tools/gf_poly.c: fix undefined allocation of 0 bytes
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>
2014-05-14 09:55:57 +02:00
Danny Al-Gaaf f6936562b2 gf_w32.c: fix dereference of undefined pointer value
Check for array boundaries of 't' in while loop header.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2014-05-13 19:29:32 +02:00
Danny Al-Gaaf cb87c41f28 test/gf_unit.c: free memory after usage
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2014-05-13 19:24:47 +02:00
Danny Al-Gaaf 33492be5db gf_inline_time.c: fix memory leak
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>
2014-05-13 19:06:13 +02:00
Kevin Greenan 9d53ea590b Merged in dalgaaf/gf-complete/wip-da-coverity-rebased (pull request #21)
Fixes for some issues found via Coverity in the Ceph project.
2014-04-27 09:24:00 -07:00
Danny Al-Gaaf df2c84d232 gf_w4.c: remove some dead code
Fix for coverity issue from Ceph project:

CID 1193093 (#1 of 1): Structurally dead code (UNREACHABLE)
 unreachable: This code cannot be reached: "return gf_w4_double_table_i...".

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2014-04-22 20:08:27 +02:00
Danny Al-Gaaf 0c04d6e3db gf.c: fix pointless expression
Remove identical expression, reorganize code in gf_error_check()
to be identical handled trough all checks. Removed (raltmap && arg1 != 4)
check - this is dead code (arg1 is always 4 in this code path).

Fix for coverity issue from Ceph project:

CID 1193071 (#1 of 1): Same on both sides (CONSTANT_EXPRESSION_RESULT)
 pointless_expression: The expression (arg1 == 4 && arg2 == 32) ||
 (arg1 == 4 && arg2 == 32) does not accomplish anything because it
 evaluates to either of its identical operands, arg1 == 4 && arg2 == 32.
 Did you intend the operands to be different?

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2014-04-22 20:08:27 +02:00
Danny Al-Gaaf 13f0e8888f fix comment/message on GF_E_SP128_A/GF_E_SP128_S
Swap comments/messages on GF_E_SP128_A/GF_E_SP128_S.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2014-04-22 20:08:26 +02:00
Danny Al-Gaaf fa5ec8112b gf_w8.c: add missing breaks
Since there is no comment indicating fallthrough on purpose added a
break in switch value 5 and 6.

Fix for coverity issue from Ceph project:

CID 1193084 (#1 of 1): Missing break in switch (MISSING_BREAK)
 unterminated_case: This case (value 5) is not terminated by a 'break'
 statement.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2014-04-22 20:08:26 +02:00
Danny Al-Gaaf 3b6364e5f2 gf_w4.c: add missing breaks
Since there is no comment indicating fallthrough on purpose added a
break in switch value 5 and 6.

Fix for coverity issue from Ceph project:

CID 1193082 (#1 of 1): Missing break in switch (MISSING_BREAK)
 unterminated_case: This case (value 5) is not terminated by a 'break'
 statement.

CID 1193083 (#1 of 1): Missing break in switch (MISSING_BREAK)
 unterminated_case: This case (value 6) is not terminated by a 'break'
 statement.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2014-04-22 20:08:26 +02:00
Danny Al-Gaaf 86b994df05 gf_w32.c: add missing breaks
Since there is no comment indicating fallthrough on purpose added a
break in switch value 3 and 5/before default.

Fix for coverity issue from Ceph project:

CID 1193080 (#1 of 1): Missing break in switch (MISSING_BREAK)
 unterminated_case: This case (value 3) is not terminated by a 'break'
 statement.

CID 1193081 (#1 of 1): Missing break in switch (MISSING_BREAK)
 unterminated_case: This case (value 5) is not terminated by a 'break'
 statement.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2014-04-22 20:08:26 +02:00
Danny Al-Gaaf e958b0437d gf_w16.c: add missing break
Since there is no comment indicating fallthrough on purpose added a
break in switch value 5/before default.

Fix for coverity issue from Ceph project:

CID 1193079 (#1 of 1): Missing break in switch (MISSING_BREAK)
 unterminated_case: This case (value 5) is not terminated by a 'break'
 statement.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2014-04-22 20:08:26 +02:00