]> git.ipfire.org Git - thirdparty/vectorscan.git/commitdiff
replace "_avx2" with "_fat".
authorChang, Harry <harry.chang@intel.com>
Mon, 24 Jul 2017 07:09:17 +0000 (15:09 +0800)
committerMatthew Barr <matthew.barr@intel.com>
Mon, 21 Aug 2017 01:14:59 +0000 (11:14 +1000)
src/fdr/fdr.c
src/fdr/teddy.h
src/fdr/teddy_avx2.c

index f7da6981bdf54666a944ba549ed49ef669fd6d7a..d33756d3588bc69b0c27230aeee639fc8e5d4eea 100644 (file)
@@ -803,14 +803,14 @@ static const FDRFUNCTYPE funcs[] = {
     fdr_engine_exec,
     NULL, /* old: fast teddy */
     NULL, /* old: fast teddy */
-    ONLY_AVX2(fdr_exec_teddy_avx2_msks1_fat),
-    ONLY_AVX2(fdr_exec_teddy_avx2_msks1_pck_fat),
-    ONLY_AVX2(fdr_exec_teddy_avx2_msks2_fat),
-    ONLY_AVX2(fdr_exec_teddy_avx2_msks2_pck_fat),
-    ONLY_AVX2(fdr_exec_teddy_avx2_msks3_fat),
-    ONLY_AVX2(fdr_exec_teddy_avx2_msks3_pck_fat),
-    ONLY_AVX2(fdr_exec_teddy_avx2_msks4_fat),
-    ONLY_AVX2(fdr_exec_teddy_avx2_msks4_pck_fat),
+    ONLY_AVX2(fdr_exec_fat_teddy_msks1),
+    ONLY_AVX2(fdr_exec_fat_teddy_msks1_pck),
+    ONLY_AVX2(fdr_exec_fat_teddy_msks2),
+    ONLY_AVX2(fdr_exec_fat_teddy_msks2_pck),
+    ONLY_AVX2(fdr_exec_fat_teddy_msks3),
+    ONLY_AVX2(fdr_exec_fat_teddy_msks3_pck),
+    ONLY_AVX2(fdr_exec_fat_teddy_msks4),
+    ONLY_AVX2(fdr_exec_fat_teddy_msks4_pck),
     fdr_exec_teddy_msks1,
     fdr_exec_teddy_msks1_pck,
     fdr_exec_teddy_msks2,
index 35756c5307f71b8dc764391dc642ff483785f9e7..40ae075626e0e34b8dea91e3c8ab86cb1270d6e5 100644 (file)
@@ -73,37 +73,37 @@ hwlm_error_t fdr_exec_teddy_msks4_pck(const struct FDR *fdr,
 
 #if defined(HAVE_AVX2)
 
-hwlm_error_t fdr_exec_teddy_avx2_msks1_fat(const struct FDR *fdr,
-                                           const struct FDR_Runtime_Args *a,
-                                           hwlm_group_t control);
+hwlm_error_t fdr_exec_fat_teddy_msks1(const struct FDR *fdr,
+                                      const struct FDR_Runtime_Args *a,
+                                      hwlm_group_t control);
 
-hwlm_error_t fdr_exec_teddy_avx2_msks1_pck_fat(const struct FDR *fdr,
-                                               const struct FDR_Runtime_Args *a,
-                                               hwlm_group_t control);
+hwlm_error_t fdr_exec_fat_teddy_msks1_pck(const struct FDR *fdr,
+                                          const struct FDR_Runtime_Args *a,
+                                          hwlm_group_t control);
 
-hwlm_error_t fdr_exec_teddy_avx2_msks2_fat(const struct FDR *fdr,
-                                           const struct FDR_Runtime_Args *a,
-                                           hwlm_group_t control);
+hwlm_error_t fdr_exec_fat_teddy_msks2(const struct FDR *fdr,
+                                      const struct FDR_Runtime_Args *a,
+                                      hwlm_group_t control);
 
-hwlm_error_t fdr_exec_teddy_avx2_msks2_pck_fat(const struct FDR *fdr,
-                                               const struct FDR_Runtime_Args *a,
-                                               hwlm_group_t control);
+hwlm_error_t fdr_exec_fat_teddy_msks2_pck(const struct FDR *fdr,
+                                          const struct FDR_Runtime_Args *a,
+                                          hwlm_group_t control);
 
-hwlm_error_t fdr_exec_teddy_avx2_msks3_fat(const struct FDR *fdr,
-                                           const struct FDR_Runtime_Args *a,
-                                           hwlm_group_t control);
+hwlm_error_t fdr_exec_fat_teddy_msks3(const struct FDR *fdr,
+                                      const struct FDR_Runtime_Args *a,
+                                      hwlm_group_t control);
 
-hwlm_error_t fdr_exec_teddy_avx2_msks3_pck_fat(const struct FDR *fdr,
-                                               const struct FDR_Runtime_Args *a,
-                                               hwlm_group_t control);
+hwlm_error_t fdr_exec_fat_teddy_msks3_pck(const struct FDR *fdr,
+                                          const struct FDR_Runtime_Args *a,
+                                          hwlm_group_t control);
 
-hwlm_error_t fdr_exec_teddy_avx2_msks4_fat(const struct FDR *fdr,
-                                           const struct FDR_Runtime_Args *a,
-                                           hwlm_group_t control);
+hwlm_error_t fdr_exec_fat_teddy_msks4(const struct FDR *fdr,
+                                      const struct FDR_Runtime_Args *a,
+                                      hwlm_group_t control);
 
-hwlm_error_t fdr_exec_teddy_avx2_msks4_pck_fat(const struct FDR *fdr,
-                                               const struct FDR_Runtime_Args *a,
-                                               hwlm_group_t control);
+hwlm_error_t fdr_exec_fat_teddy_msks4_pck(const struct FDR *fdr,
+                                          const struct FDR_Runtime_Args *a,
+                                          hwlm_group_t control);
 
 #endif /* HAVE_AVX2 */
 
index 8f98344c930982c3eed5753eb8fa456b38dc3cff..e1743a9cf3f50a25faf8eaf362b0719af9323d84 100644 (file)
@@ -130,15 +130,15 @@ do {                                                                        \
 } while(0)
 
 static really_inline
-const m256 *getMaskBase_avx2(const struct Teddy *teddy) {
+const m256 *getMaskBase_fat(const struct Teddy *teddy) {
     return (const m256 *)((const u8 *)teddy + ROUNDUP_CL(sizeof(struct Teddy)));
 }
 
 #if defined(HAVE_AVX512)
 
 static really_inline
-const u64a *getReinforcedMaskBase_avx2(const struct Teddy *teddy, u8 numMask) {
-    return (const u64a *)((const u8 *)getMaskBase_avx2(teddy)
+const u64a *getReinforcedMaskBase_fat(const struct Teddy *teddy, u8 numMask) {
+    return (const u64a *)((const u8 *)getMaskBase_fat(teddy)
                           + ROUNDUP_CL(2 * numMask * sizeof(m256)));
 }
 
@@ -370,11 +370,11 @@ do {                                                                          \
     DEBUG_PRINTF("params: buf %p len %zu start_offset %zu\n",                 \
                  a->buf, a->len, a->start_offset);                            \
                                                                               \
-    const m256 *maskBase = getMaskBase_avx2(teddy);                           \
+    const m256 *maskBase = getMaskBase_fat(teddy);                            \
     PREPARE_FAT_MASKS(n_msk);                                                 \
     const u32 *confBase = getConfBase(teddy);                                 \
                                                                               \
-    const u64a *r_msk_base_lo = getReinforcedMaskBase_avx2(teddy, n_msk);     \
+    const u64a *r_msk_base_lo = getReinforcedMaskBase_fat(teddy, n_msk);      \
     const u64a *r_msk_base_hi = r_msk_base_lo + (N_CHARS + 1);                \
     u32 c_0 = 0x100;                                                          \
     u32 c_16 = 0x100;                                                         \
@@ -582,7 +582,7 @@ do {                                                                        \
     DEBUG_PRINTF("params: buf %p len %zu start_offset %zu\n",               \
                  a->buf, a->len, a->start_offset);                          \
                                                                             \
-    const m256 *maskBase = getMaskBase_avx2(teddy);                         \
+    const m256 *maskBase = getMaskBase_fat(teddy);                          \
     const u32 *confBase = getConfBase(teddy);                               \
                                                                             \
     FDR_EXEC_FAT_TEDDY_RES_OLD(n_msk);                                      \
@@ -638,51 +638,51 @@ do {                                                                        \
 
 #endif // HAVE_AVX512
 
-hwlm_error_t fdr_exec_teddy_avx2_msks1_fat(const struct FDR *fdr,
-                                           const struct FDR_Runtime_Args *a,
-                                           hwlm_group_t control) {
+hwlm_error_t fdr_exec_fat_teddy_msks1(const struct FDR *fdr,
+                                      const struct FDR_Runtime_Args *a,
+                                      hwlm_group_t control) {
     FDR_EXEC_FAT_TEDDY(fdr, a, control, 1, do_confWithBit_teddy);
 }
 
-hwlm_error_t fdr_exec_teddy_avx2_msks1_pck_fat(const struct FDR *fdr,
-                                               const struct FDR_Runtime_Args *a,
-                                               hwlm_group_t control) {
+hwlm_error_t fdr_exec_fat_teddy_msks1_pck(const struct FDR *fdr,
+                                          const struct FDR_Runtime_Args *a,
+                                          hwlm_group_t control) {
     FDR_EXEC_FAT_TEDDY(fdr, a, control, 1, do_confWithBit_teddy);
 }
 
-hwlm_error_t fdr_exec_teddy_avx2_msks2_fat(const struct FDR *fdr,
-                                           const struct FDR_Runtime_Args *a,
-                                           hwlm_group_t control) {
+hwlm_error_t fdr_exec_fat_teddy_msks2(const struct FDR *fdr,
+                                      const struct FDR_Runtime_Args *a,
+                                      hwlm_group_t control) {
     FDR_EXEC_FAT_TEDDY(fdr, a, control, 2, do_confWithBit_teddy);
 }
 
-hwlm_error_t fdr_exec_teddy_avx2_msks2_pck_fat(const struct FDR *fdr,
-                                               const struct FDR_Runtime_Args *a,
-                                               hwlm_group_t control) {
+hwlm_error_t fdr_exec_fat_teddy_msks2_pck(const struct FDR *fdr,
+                                          const struct FDR_Runtime_Args *a,
+                                          hwlm_group_t control) {
     FDR_EXEC_FAT_TEDDY(fdr, a, control, 2, do_confWithBit_teddy);
 }
 
-hwlm_error_t fdr_exec_teddy_avx2_msks3_fat(const struct FDR *fdr,
-                                           const struct FDR_Runtime_Args *a,
-                                           hwlm_group_t control) {
+hwlm_error_t fdr_exec_fat_teddy_msks3(const struct FDR *fdr,
+                                      const struct FDR_Runtime_Args *a,
+                                      hwlm_group_t control) {
     FDR_EXEC_FAT_TEDDY(fdr, a, control, 3, do_confWithBit_teddy);
 }
 
-hwlm_error_t fdr_exec_teddy_avx2_msks3_pck_fat(const struct FDR *fdr,
-                                               const struct FDR_Runtime_Args *a,
-                                               hwlm_group_t control) {
+hwlm_error_t fdr_exec_fat_teddy_msks3_pck(const struct FDR *fdr,
+                                          const struct FDR_Runtime_Args *a,
+                                          hwlm_group_t control) {
     FDR_EXEC_FAT_TEDDY(fdr, a, control, 3, do_confWithBit_teddy);
 }
 
-hwlm_error_t fdr_exec_teddy_avx2_msks4_fat(const struct FDR *fdr,
-                                           const struct FDR_Runtime_Args *a,
-                                           hwlm_group_t control) {
+hwlm_error_t fdr_exec_fat_teddy_msks4(const struct FDR *fdr,
+                                      const struct FDR_Runtime_Args *a,
+                                      hwlm_group_t control) {
     FDR_EXEC_FAT_TEDDY(fdr, a, control, 4, do_confWithBit_teddy);
 }
 
-hwlm_error_t fdr_exec_teddy_avx2_msks4_pck_fat(const struct FDR *fdr,
-                                               const struct FDR_Runtime_Args *a,
-                                               hwlm_group_t control) {
+hwlm_error_t fdr_exec_fat_teddy_msks4_pck(const struct FDR *fdr,
+                                          const struct FDR_Runtime_Args *a,
+                                          hwlm_group_t control) {
     FDR_EXEC_FAT_TEDDY(fdr, a, control, 4, do_confWithBit_teddy);
 }