Added code to not use gf-complete mult_by_one if region size is small (less than 16 bytes).

master
Kevin Greenan 2013-12-27 20:55:04 -08:00
parent c4ab254bbc
commit 16838859dc
1 changed files with 10 additions and 1 deletions

View File

@ -326,7 +326,16 @@ void galois_w32_region_xor(void *src, void *dest, int nbytes)
void galois_region_xor(char *src, char *dest, int nbytes)
{
galois_w32_region_xor(src, dest, nbytes);
if (nbytes >= 16) {
galois_w32_region_xor(src, dest, nbytes);
} else {
int i = 0;
for (i = 0; i < nbytes; i++) {
*dest ^= *src;
dest++;
src++;
}
}
}
int galois_inverse(int y, int w)