diff options
author | Janne Grunau <j@jannau.net> | 2014-09-17 16:15:27 +0200 |
---|---|---|
committer | Janne Grunau <j@jannau.net> | 2014-10-24 14:54:55 +0200 |
commit | 6fdd8bc3d32cb2f7fa55d2de9dc7cc5bb2f885aa (patch) | |
tree | 6d55be6869bcef1882fff82751dfcf10424aaca1 /include | |
parent | 370c88b9015cbe874aca81442a5d8f6f99bfb654 (diff) | |
download | gf-complete-6fdd8bc3d32cb2f7fa55d2de9dc7cc5bb2f885aa.tar.gz |
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.
Diffstat (limited to 'include')
-rw-r--r-- | include/gf_w64.h | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/include/gf_w64.h b/include/gf_w64.h new file mode 100644 index 0000000..9a74a81 --- /dev/null +++ b/include/gf_w64.h @@ -0,0 +1,50 @@ +/* + * GF-Complete: A Comprehensive Open Source Library for Galois Field Arithmetic + * James S. Plank, Ethan L. Miller, Kevin M. Greenan, + * Benjamin A. Arnold, John A. Burnum, Adam W. Disney, Allen C. McBride. + * + * gf_w64.h + * + * Defines and data structures for 64-bit Galois fields + */ + +#ifndef GF_COMPLETE_GF_W64_H +#define GF_COMPLETE_GF_W64_H + +#include <stdint.h> + +#define GF_FIELD_WIDTH (64) +#define GF_FIRST_BIT (1ULL << 63) + +#define GF_BASE_FIELD_WIDTH (32) +#define GF_BASE_FIELD_SIZE (1ULL << GF_BASE_FIELD_WIDTH) +#define GF_BASE_FIELD_GROUP_SIZE GF_BASE_FIELD_SIZE-1 + +struct gf_w64_group_data { + uint64_t *reduce; + uint64_t *shift; + uint64_t *memory; +}; + +struct gf_split_4_64_lazy_data { + uint64_t tables[16][16]; + uint64_t last_value; +}; + +struct gf_split_8_64_lazy_data { + uint64_t tables[8][(1<<8)]; + uint64_t last_value; +}; + +struct gf_split_16_64_lazy_data { + uint64_t tables[4][(1<<16)]; + uint64_t last_value; +}; + +struct gf_split_8_8_data { + uint64_t tables[15][256][256]; +}; + +void gf_w64_neon_split_init(gf_t *gf); + +#endif /* GF_COMPLETE_GF_W64_H */ |