summaryrefslogtreecommitdiffstats
path: root/src/erasure-code/jerasure/gf-complete/include/gf_w64.h
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 18:45:59 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 18:45:59 +0000
commit19fcec84d8d7d21e796c7624e521b60d28ee21ed (patch)
tree42d26aa27d1e3f7c0b8bd3fd14e7d7082f5008dc /src/erasure-code/jerasure/gf-complete/include/gf_w64.h
parentInitial commit. (diff)
downloadceph-6d07fdb6bb33b1af39833b850bb6cf8af79fe293.tar.xz
ceph-6d07fdb6bb33b1af39833b850bb6cf8af79fe293.zip
Adding upstream version 16.2.11+ds.upstream/16.2.11+dsupstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/erasure-code/jerasure/gf-complete/include/gf_w64.h')
-rw-r--r--src/erasure-code/jerasure/gf-complete/include/gf_w64.h50
1 files changed, 50 insertions, 0 deletions
diff --git a/src/erasure-code/jerasure/gf-complete/include/gf_w64.h b/src/erasure-code/jerasure/gf-complete/include/gf_w64.h
new file mode 100644
index 000000000..9a74a8125
--- /dev/null
+++ b/src/erasure-code/jerasure/gf-complete/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 */