mirror of
https://github.com/intel/isa-l.git
synced 2024-12-12 17:33:50 +01:00
raid: Change example to use multi-binary function
Change-Id: I9a3edf4ad0b9b8afad6d0545bfc7436b4c8fdfe0 Signed-off-by: Greg Tucker <greg.b.tucker@intel.com>
This commit is contained in:
parent
4b45beff4f
commit
5af4e4aa0a
@ -55,15 +55,15 @@ int main(int argc, char *argv[])
|
||||
((char *)buffs[i])[j] = rand();
|
||||
|
||||
printf("Generate xor parity\n");
|
||||
xor_gen_sse(TEST_SOURCES + 1, TEST_LEN, buffs);
|
||||
xor_gen(TEST_SOURCES + 1, TEST_LEN, buffs);
|
||||
|
||||
printf("Check parity: ");
|
||||
should_pass = xor_check_sse(TEST_SOURCES + 1, TEST_LEN, buffs);
|
||||
should_pass = xor_check(TEST_SOURCES + 1, TEST_LEN, buffs);
|
||||
printf("%s\n", should_pass == 0 ? "Pass" : "Fail");
|
||||
|
||||
printf("Find corruption: ");
|
||||
((char *)buffs[TEST_SOURCES / 2])[TEST_LEN / 2] ^= 1; // flip one bit
|
||||
should_fail = xor_check_sse(TEST_SOURCES + 1, TEST_LEN, buffs); //recheck
|
||||
should_fail = xor_check(TEST_SOURCES + 1, TEST_LEN, buffs); //recheck
|
||||
printf("%s\n", should_fail != 0 ? "Pass" : "Fail");
|
||||
|
||||
return 0;
|
||||
|
Loading…
Reference in New Issue
Block a user