mirror of
https://github.com/intel/isa-l.git
synced 2024-12-13 09:52:56 +01:00
erasure_code: use internal gf_vect_mul_base for ppc64le encoding
gf_vect_mul_base is expected to work for all buffer sizes. However, this function is checking for size alignment to 32 bytes, to follow the other gf_vect_mul implementations. Therefore, another implementation for this function is included inside ppc64le folder to be used by the encoding functions. Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
This commit is contained in:
parent
b8d5633e51
commit
e0fd782974
@ -1,5 +1,19 @@
|
||||
#include "ec_base_vsx.h"
|
||||
|
||||
/*
|
||||
* Same as gf_vect_mul_base in "ec_base.h" but without the size restriction.
|
||||
*/
|
||||
static void _gf_vect_mul_base(int len, unsigned char *a, unsigned char *src,
|
||||
unsigned char *dest)
|
||||
{
|
||||
//2nd element of table array is ref value used to fill it in
|
||||
unsigned char c = a[1];
|
||||
|
||||
while (len-- > 0)
|
||||
*dest++ = gf_mul(c, *src++);
|
||||
return 0;
|
||||
}
|
||||
|
||||
void gf_vect_mul_vsx(int len, unsigned char *gftbl, unsigned char *src, unsigned char *dest)
|
||||
{
|
||||
unsigned char *s, *t0;
|
||||
@ -19,8 +33,7 @@ void gf_vect_mul_vsx(int len, unsigned char *gftbl, unsigned char *src, unsigned
|
||||
|
||||
head = len % 128;
|
||||
if (head != 0) {
|
||||
// errors are ignored.
|
||||
gf_vect_mul_base(head, gftbl, src, dest);
|
||||
_gf_vect_mul_base(head, gftbl, src, dest);
|
||||
}
|
||||
|
||||
vlo0 = EC_vec_xl(0, gftbl);
|
||||
|
Loading…
Reference in New Issue
Block a user