diff options
author | Ivan Blinkov <ivan@blinkov.ru> | 2022-02-10 16:47:10 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:47:10 +0300 |
commit | 1aeb9a455974457866f78722ad98114bafc84e8a (patch) | |
tree | e4340eaf1668684d83a0a58c36947c5def5350ad /contrib/libs/hyperscan/src/nfa/sheng_defs.h | |
parent | bd5ef432f5cfb1e18851381329d94665a4c22470 (diff) | |
download | ydb-1aeb9a455974457866f78722ad98114bafc84e8a.tar.gz |
Restoring authorship annotation for Ivan Blinkov <ivan@blinkov.ru>. Commit 1 of 2.
Diffstat (limited to 'contrib/libs/hyperscan/src/nfa/sheng_defs.h')
-rw-r--r-- | contrib/libs/hyperscan/src/nfa/sheng_defs.h | 704 |
1 files changed, 352 insertions, 352 deletions
diff --git a/contrib/libs/hyperscan/src/nfa/sheng_defs.h b/contrib/libs/hyperscan/src/nfa/sheng_defs.h index 390af75221..c2ec1d09fa 100644 --- a/contrib/libs/hyperscan/src/nfa/sheng_defs.h +++ b/contrib/libs/hyperscan/src/nfa/sheng_defs.h @@ -1,57 +1,57 @@ -/* +/* * Copyright (c) 2016-2020, Intel Corporation - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * * Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * * Neither the name of Intel Corporation nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef SHENG_DEFS_H -#define SHENG_DEFS_H - -/* - * Utility functions used by various versions of Sheng engine - */ -static really_inline -u8 isDeadState(const u8 a) { - return a & SHENG_STATE_DEAD; -} - -static really_inline -u8 isAcceptState(const u8 a) { - return a & SHENG_STATE_ACCEPT; -} - -static really_inline -u8 isAccelState(const u8 a) { - return a & SHENG_STATE_ACCEL; -} - -static really_inline -u8 hasInterestingStates(const u8 a, const u8 b, const u8 c, const u8 d) { - return (a | b | c | d) & (SHENG_STATE_FLAG_MASK); -} - + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * * Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of Intel Corporation nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef SHENG_DEFS_H +#define SHENG_DEFS_H + +/* + * Utility functions used by various versions of Sheng engine + */ +static really_inline +u8 isDeadState(const u8 a) { + return a & SHENG_STATE_DEAD; +} + +static really_inline +u8 isAcceptState(const u8 a) { + return a & SHENG_STATE_ACCEPT; +} + +static really_inline +u8 isAccelState(const u8 a) { + return a & SHENG_STATE_ACCEL; +} + +static really_inline +u8 hasInterestingStates(const u8 a, const u8 b, const u8 c, const u8 d) { + return (a | b | c | d) & (SHENG_STATE_FLAG_MASK); +} + #if defined(HAVE_AVX512VBMI) static really_inline u8 isDeadState32(const u8 a) { @@ -89,25 +89,25 @@ u8 hasInterestingStates64(const u8 a, const u8 b, const u8 c, const u8 d) { } #endif -/* these functions should be optimized out, used by NO_MATCHES mode */ -static really_inline -u8 dummyFunc4(UNUSED const u8 a, UNUSED const u8 b, UNUSED const u8 c, - UNUSED const u8 d) { - return 0; -} - -static really_inline -u8 dummyFunc(UNUSED const u8 a) { - return 0; -} - -/* - * Sheng function definitions for single byte loops - */ -/* callback output, can die */ -#define SHENG_IMPL sheng_cod -#define DEAD_FUNC isDeadState -#define ACCEPT_FUNC isAcceptState +/* these functions should be optimized out, used by NO_MATCHES mode */ +static really_inline +u8 dummyFunc4(UNUSED const u8 a, UNUSED const u8 b, UNUSED const u8 c, + UNUSED const u8 d) { + return 0; +} + +static really_inline +u8 dummyFunc(UNUSED const u8 a) { + return 0; +} + +/* + * Sheng function definitions for single byte loops + */ +/* callback output, can die */ +#define SHENG_IMPL sheng_cod +#define DEAD_FUNC isDeadState +#define ACCEPT_FUNC isAcceptState #if defined(HAVE_AVX512VBMI) #define SHENG32_IMPL sheng32_cod #define DEAD_FUNC32 isDeadState32 @@ -116,11 +116,11 @@ u8 dummyFunc(UNUSED const u8 a) { #define DEAD_FUNC64 isDeadState64 #define ACCEPT_FUNC64 isAcceptState64 #endif -#define STOP_AT_MATCH 0 -#include "sheng_impl.h" -#undef SHENG_IMPL -#undef DEAD_FUNC -#undef ACCEPT_FUNC +#define STOP_AT_MATCH 0 +#include "sheng_impl.h" +#undef SHENG_IMPL +#undef DEAD_FUNC +#undef ACCEPT_FUNC #if defined(HAVE_AVX512VBMI) #undef SHENG32_IMPL #undef DEAD_FUNC32 @@ -129,12 +129,12 @@ u8 dummyFunc(UNUSED const u8 a) { #undef DEAD_FUNC64 #undef ACCEPT_FUNC64 #endif -#undef STOP_AT_MATCH - -/* callback output, can't die */ -#define SHENG_IMPL sheng_co -#define DEAD_FUNC dummyFunc -#define ACCEPT_FUNC isAcceptState +#undef STOP_AT_MATCH + +/* callback output, can't die */ +#define SHENG_IMPL sheng_co +#define DEAD_FUNC dummyFunc +#define ACCEPT_FUNC isAcceptState #if defined(HAVE_AVX512VBMI) #define SHENG32_IMPL sheng32_co #define DEAD_FUNC32 dummyFunc @@ -143,11 +143,11 @@ u8 dummyFunc(UNUSED const u8 a) { #define DEAD_FUNC64 dummyFunc #define ACCEPT_FUNC64 isAcceptState64 #endif -#define STOP_AT_MATCH 0 -#include "sheng_impl.h" -#undef SHENG_IMPL -#undef DEAD_FUNC -#undef ACCEPT_FUNC +#define STOP_AT_MATCH 0 +#include "sheng_impl.h" +#undef SHENG_IMPL +#undef DEAD_FUNC +#undef ACCEPT_FUNC #if defined(HAVE_AVX512VBMI) #undef SHENG32_IMPL #undef DEAD_FUNC32 @@ -156,12 +156,12 @@ u8 dummyFunc(UNUSED const u8 a) { #undef DEAD_FUNC64 #undef ACCEPT_FUNC64 #endif -#undef STOP_AT_MATCH - -/* stop at match, can die */ -#define SHENG_IMPL sheng_samd -#define DEAD_FUNC isDeadState -#define ACCEPT_FUNC isAcceptState +#undef STOP_AT_MATCH + +/* stop at match, can die */ +#define SHENG_IMPL sheng_samd +#define DEAD_FUNC isDeadState +#define ACCEPT_FUNC isAcceptState #if defined(HAVE_AVX512VBMI) #define SHENG32_IMPL sheng32_samd #define DEAD_FUNC32 isDeadState32 @@ -170,11 +170,11 @@ u8 dummyFunc(UNUSED const u8 a) { #define DEAD_FUNC64 isDeadState64 #define ACCEPT_FUNC64 isAcceptState64 #endif -#define STOP_AT_MATCH 1 -#include "sheng_impl.h" -#undef SHENG_IMPL -#undef DEAD_FUNC -#undef ACCEPT_FUNC +#define STOP_AT_MATCH 1 +#include "sheng_impl.h" +#undef SHENG_IMPL +#undef DEAD_FUNC +#undef ACCEPT_FUNC #if defined(HAVE_AVX512VBMI) #undef SHENG32_IMPL #undef DEAD_FUNC32 @@ -183,12 +183,12 @@ u8 dummyFunc(UNUSED const u8 a) { #undef DEAD_FUNC64 #undef ACCEPT_FUNC64 #endif -#undef STOP_AT_MATCH - -/* stop at match, can't die */ -#define SHENG_IMPL sheng_sam -#define DEAD_FUNC dummyFunc -#define ACCEPT_FUNC isAcceptState +#undef STOP_AT_MATCH + +/* stop at match, can't die */ +#define SHENG_IMPL sheng_sam +#define DEAD_FUNC dummyFunc +#define ACCEPT_FUNC isAcceptState #if defined(HAVE_AVX512VBMI) #define SHENG32_IMPL sheng32_sam #define DEAD_FUNC32 dummyFunc @@ -197,11 +197,11 @@ u8 dummyFunc(UNUSED const u8 a) { #define DEAD_FUNC64 dummyFunc #define ACCEPT_FUNC64 isAcceptState64 #endif -#define STOP_AT_MATCH 1 -#include "sheng_impl.h" -#undef SHENG_IMPL -#undef DEAD_FUNC -#undef ACCEPT_FUNC +#define STOP_AT_MATCH 1 +#include "sheng_impl.h" +#undef SHENG_IMPL +#undef DEAD_FUNC +#undef ACCEPT_FUNC #if defined(HAVE_AVX512VBMI) #undef SHENG32_IMPL #undef DEAD_FUNC32 @@ -210,12 +210,12 @@ u8 dummyFunc(UNUSED const u8 a) { #undef DEAD_FUNC64 #undef ACCEPT_FUNC64 #endif -#undef STOP_AT_MATCH - -/* no match, can die */ -#define SHENG_IMPL sheng_nmd -#define DEAD_FUNC isDeadState -#define ACCEPT_FUNC dummyFunc +#undef STOP_AT_MATCH + +/* no match, can die */ +#define SHENG_IMPL sheng_nmd +#define DEAD_FUNC isDeadState +#define ACCEPT_FUNC dummyFunc #if defined(HAVE_AVX512VBMI) #define SHENG32_IMPL sheng32_nmd #define DEAD_FUNC32 isDeadState32 @@ -224,11 +224,11 @@ u8 dummyFunc(UNUSED const u8 a) { #define DEAD_FUNC64 isDeadState64 #define ACCEPT_FUNC64 dummyFunc #endif -#define STOP_AT_MATCH 0 -#include "sheng_impl.h" -#undef SHENG_IMPL -#undef DEAD_FUNC -#undef ACCEPT_FUNC +#define STOP_AT_MATCH 0 +#include "sheng_impl.h" +#undef SHENG_IMPL +#undef DEAD_FUNC +#undef ACCEPT_FUNC #if defined(HAVE_AVX512VBMI) #undef SHENG32_IMPL #undef DEAD_FUNC32 @@ -237,12 +237,12 @@ u8 dummyFunc(UNUSED const u8 a) { #undef DEAD_FUNC64 #undef ACCEPT_FUNC64 #endif -#undef STOP_AT_MATCH - -/* no match, can't die */ -#define SHENG_IMPL sheng_nm -#define DEAD_FUNC dummyFunc -#define ACCEPT_FUNC dummyFunc +#undef STOP_AT_MATCH + +/* no match, can't die */ +#define SHENG_IMPL sheng_nm +#define DEAD_FUNC dummyFunc +#define ACCEPT_FUNC dummyFunc #if defined(HAVE_AVX512VBMI) #define SHENG32_IMPL sheng32_nm #define DEAD_FUNC32 dummyFunc @@ -251,11 +251,11 @@ u8 dummyFunc(UNUSED const u8 a) { #define DEAD_FUNC64 dummyFunc #define ACCEPT_FUNC64 dummyFunc #endif -#define STOP_AT_MATCH 0 -#include "sheng_impl.h" -#undef SHENG_IMPL -#undef DEAD_FUNC -#undef ACCEPT_FUNC +#define STOP_AT_MATCH 0 +#include "sheng_impl.h" +#undef SHENG_IMPL +#undef DEAD_FUNC +#undef ACCEPT_FUNC #if defined(HAVE_AVX512VBMI) #undef SHENG32_IMPL #undef DEAD_FUNC32 @@ -264,19 +264,19 @@ u8 dummyFunc(UNUSED const u8 a) { #undef DEAD_FUNC64 #undef ACCEPT_FUNC64 #endif -#undef STOP_AT_MATCH - -/* - * Sheng function definitions for 4-byte loops - */ -/* callback output, can die, accelerated */ -#define SHENG_IMPL sheng4_coda -#define INTERESTING_FUNC hasInterestingStates -#define INNER_DEAD_FUNC isDeadState -#define OUTER_DEAD_FUNC dummyFunc -#define INNER_ACCEL_FUNC isAccelState -#define OUTER_ACCEL_FUNC dummyFunc -#define ACCEPT_FUNC isAcceptState +#undef STOP_AT_MATCH + +/* + * Sheng function definitions for 4-byte loops + */ +/* callback output, can die, accelerated */ +#define SHENG_IMPL sheng4_coda +#define INTERESTING_FUNC hasInterestingStates +#define INNER_DEAD_FUNC isDeadState +#define OUTER_DEAD_FUNC dummyFunc +#define INNER_ACCEL_FUNC isAccelState +#define OUTER_ACCEL_FUNC dummyFunc +#define ACCEPT_FUNC isAcceptState #if defined(HAVE_AVX512VBMI) #define SHENG32_IMPL sheng32_4_coda #define INTERESTING_FUNC32 hasInterestingStates32 @@ -287,15 +287,15 @@ u8 dummyFunc(UNUSED const u8 a) { #define ACCEPT_FUNC32 isAcceptState32 #define NO_SHENG64_IMPL #endif -#define STOP_AT_MATCH 0 -#include "sheng_impl4.h" -#undef SHENG_IMPL -#undef INTERESTING_FUNC -#undef INNER_DEAD_FUNC -#undef OUTER_DEAD_FUNC -#undef INNER_ACCEL_FUNC -#undef OUTER_ACCEL_FUNC -#undef ACCEPT_FUNC +#define STOP_AT_MATCH 0 +#include "sheng_impl4.h" +#undef SHENG_IMPL +#undef INTERESTING_FUNC +#undef INNER_DEAD_FUNC +#undef OUTER_DEAD_FUNC +#undef INNER_ACCEL_FUNC +#undef OUTER_ACCEL_FUNC +#undef ACCEPT_FUNC #if defined(HAVE_AVX512VBMI) #undef SHENG32_IMPL #undef INTERESTING_FUNC32 @@ -306,16 +306,16 @@ u8 dummyFunc(UNUSED const u8 a) { #undef ACCEPT_FUNC32 #undef NO_SHENG64_IMPL #endif -#undef STOP_AT_MATCH - -/* callback output, can die, not accelerated */ -#define SHENG_IMPL sheng4_cod -#define INTERESTING_FUNC hasInterestingStates -#define INNER_DEAD_FUNC isDeadState -#define OUTER_DEAD_FUNC dummyFunc -#define INNER_ACCEL_FUNC dummyFunc -#define OUTER_ACCEL_FUNC dummyFunc -#define ACCEPT_FUNC isAcceptState +#undef STOP_AT_MATCH + +/* callback output, can die, not accelerated */ +#define SHENG_IMPL sheng4_cod +#define INTERESTING_FUNC hasInterestingStates +#define INNER_DEAD_FUNC isDeadState +#define OUTER_DEAD_FUNC dummyFunc +#define INNER_ACCEL_FUNC dummyFunc +#define OUTER_ACCEL_FUNC dummyFunc +#define ACCEPT_FUNC isAcceptState #if defined(HAVE_AVX512VBMI) #define SHENG32_IMPL sheng32_4_cod #define INTERESTING_FUNC32 hasInterestingStates32 @@ -330,15 +330,15 @@ u8 dummyFunc(UNUSED const u8 a) { #define OUTER_DEAD_FUNC64 dummyFunc #define ACCEPT_FUNC64 isAcceptState64 #endif -#define STOP_AT_MATCH 0 -#include "sheng_impl4.h" -#undef SHENG_IMPL -#undef INTERESTING_FUNC -#undef INNER_DEAD_FUNC -#undef OUTER_DEAD_FUNC -#undef INNER_ACCEL_FUNC -#undef OUTER_ACCEL_FUNC -#undef ACCEPT_FUNC +#define STOP_AT_MATCH 0 +#include "sheng_impl4.h" +#undef SHENG_IMPL +#undef INTERESTING_FUNC +#undef INNER_DEAD_FUNC +#undef OUTER_DEAD_FUNC +#undef INNER_ACCEL_FUNC +#undef OUTER_ACCEL_FUNC +#undef ACCEPT_FUNC #if defined(HAVE_AVX512VBMI) #undef SHENG32_IMPL #undef INTERESTING_FUNC32 @@ -353,16 +353,16 @@ u8 dummyFunc(UNUSED const u8 a) { #undef OUTER_DEAD_FUNC64 #undef ACCEPT_FUNC64 #endif -#undef STOP_AT_MATCH - -/* callback output, can't die, accelerated */ -#define SHENG_IMPL sheng4_coa -#define INTERESTING_FUNC hasInterestingStates -#define INNER_DEAD_FUNC dummyFunc -#define OUTER_DEAD_FUNC dummyFunc -#define INNER_ACCEL_FUNC isAccelState -#define OUTER_ACCEL_FUNC dummyFunc -#define ACCEPT_FUNC isAcceptState +#undef STOP_AT_MATCH + +/* callback output, can't die, accelerated */ +#define SHENG_IMPL sheng4_coa +#define INTERESTING_FUNC hasInterestingStates +#define INNER_DEAD_FUNC dummyFunc +#define OUTER_DEAD_FUNC dummyFunc +#define INNER_ACCEL_FUNC isAccelState +#define OUTER_ACCEL_FUNC dummyFunc +#define ACCEPT_FUNC isAcceptState #if defined(HAVE_AVX512VBMI) #define SHENG32_IMPL sheng32_4_coa #define INTERESTING_FUNC32 hasInterestingStates32 @@ -373,15 +373,15 @@ u8 dummyFunc(UNUSED const u8 a) { #define ACCEPT_FUNC32 isAcceptState32 #define NO_SHENG64_IMPL #endif -#define STOP_AT_MATCH 0 -#include "sheng_impl4.h" -#undef SHENG_IMPL -#undef INTERESTING_FUNC -#undef INNER_DEAD_FUNC -#undef OUTER_DEAD_FUNC -#undef INNER_ACCEL_FUNC -#undef OUTER_ACCEL_FUNC -#undef ACCEPT_FUNC +#define STOP_AT_MATCH 0 +#include "sheng_impl4.h" +#undef SHENG_IMPL +#undef INTERESTING_FUNC +#undef INNER_DEAD_FUNC +#undef OUTER_DEAD_FUNC +#undef INNER_ACCEL_FUNC +#undef OUTER_ACCEL_FUNC +#undef ACCEPT_FUNC #if defined(HAVE_AVX512VBMI) #undef SHENG32_IMPL #undef INTERESTING_FUNC32 @@ -392,16 +392,16 @@ u8 dummyFunc(UNUSED const u8 a) { #undef ACCEPT_FUNC32 #undef NO_SHENG64_IMPL #endif -#undef STOP_AT_MATCH - -/* callback output, can't die, not accelerated */ -#define SHENG_IMPL sheng4_co -#define INTERESTING_FUNC hasInterestingStates -#define INNER_DEAD_FUNC dummyFunc -#define OUTER_DEAD_FUNC dummyFunc -#define INNER_ACCEL_FUNC dummyFunc -#define OUTER_ACCEL_FUNC dummyFunc -#define ACCEPT_FUNC isAcceptState +#undef STOP_AT_MATCH + +/* callback output, can't die, not accelerated */ +#define SHENG_IMPL sheng4_co +#define INTERESTING_FUNC hasInterestingStates +#define INNER_DEAD_FUNC dummyFunc +#define OUTER_DEAD_FUNC dummyFunc +#define INNER_ACCEL_FUNC dummyFunc +#define OUTER_ACCEL_FUNC dummyFunc +#define ACCEPT_FUNC isAcceptState #if defined(HAVE_AVX512VBMI) #define SHENG32_IMPL sheng32_4_co #define INTERESTING_FUNC32 hasInterestingStates32 @@ -416,15 +416,15 @@ u8 dummyFunc(UNUSED const u8 a) { #define OUTER_DEAD_FUNC64 dummyFunc #define ACCEPT_FUNC64 isAcceptState64 #endif -#define STOP_AT_MATCH 0 -#include "sheng_impl4.h" -#undef SHENG_IMPL -#undef INTERESTING_FUNC -#undef INNER_DEAD_FUNC -#undef OUTER_DEAD_FUNC -#undef INNER_ACCEL_FUNC -#undef OUTER_ACCEL_FUNC -#undef ACCEPT_FUNC +#define STOP_AT_MATCH 0 +#include "sheng_impl4.h" +#undef SHENG_IMPL +#undef INTERESTING_FUNC +#undef INNER_DEAD_FUNC +#undef OUTER_DEAD_FUNC +#undef INNER_ACCEL_FUNC +#undef OUTER_ACCEL_FUNC +#undef ACCEPT_FUNC #if defined(HAVE_AVX512VBMI) #undef SHENG32_IMPL #undef INTERESTING_FUNC32 @@ -439,16 +439,16 @@ u8 dummyFunc(UNUSED const u8 a) { #undef OUTER_DEAD_FUNC64 #undef ACCEPT_FUNC64 #endif -#undef STOP_AT_MATCH - -/* stop at match, can die, accelerated */ -#define SHENG_IMPL sheng4_samda -#define INTERESTING_FUNC hasInterestingStates -#define INNER_DEAD_FUNC isDeadState -#define OUTER_DEAD_FUNC dummyFunc -#define INNER_ACCEL_FUNC isAccelState -#define OUTER_ACCEL_FUNC dummyFunc -#define ACCEPT_FUNC isAcceptState +#undef STOP_AT_MATCH + +/* stop at match, can die, accelerated */ +#define SHENG_IMPL sheng4_samda +#define INTERESTING_FUNC hasInterestingStates +#define INNER_DEAD_FUNC isDeadState +#define OUTER_DEAD_FUNC dummyFunc +#define INNER_ACCEL_FUNC isAccelState +#define OUTER_ACCEL_FUNC dummyFunc +#define ACCEPT_FUNC isAcceptState #if defined(HAVE_AVX512VBMI) #define SHENG32_IMPL sheng32_4_samda #define INTERESTING_FUNC32 hasInterestingStates32 @@ -459,15 +459,15 @@ u8 dummyFunc(UNUSED const u8 a) { #define ACCEPT_FUNC32 isAcceptState32 #define NO_SHENG64_IMPL #endif -#define STOP_AT_MATCH 1 -#include "sheng_impl4.h" -#undef SHENG_IMPL -#undef INTERESTING_FUNC -#undef INNER_DEAD_FUNC -#undef OUTER_DEAD_FUNC -#undef INNER_ACCEL_FUNC -#undef OUTER_ACCEL_FUNC -#undef ACCEPT_FUNC +#define STOP_AT_MATCH 1 +#include "sheng_impl4.h" +#undef SHENG_IMPL +#undef INTERESTING_FUNC +#undef INNER_DEAD_FUNC +#undef OUTER_DEAD_FUNC +#undef INNER_ACCEL_FUNC +#undef OUTER_ACCEL_FUNC +#undef ACCEPT_FUNC #if defined(HAVE_AVX512VBMI) #undef SHENG32_IMPL #undef INTERESTING_FUNC32 @@ -478,16 +478,16 @@ u8 dummyFunc(UNUSED const u8 a) { #undef ACCEPT_FUNC32 #undef NO_SHENG64_IMPL #endif -#undef STOP_AT_MATCH - -/* stop at match, can die, not accelerated */ -#define SHENG_IMPL sheng4_samd -#define INTERESTING_FUNC hasInterestingStates -#define INNER_DEAD_FUNC isDeadState -#define OUTER_DEAD_FUNC dummyFunc -#define INNER_ACCEL_FUNC dummyFunc -#define OUTER_ACCEL_FUNC dummyFunc -#define ACCEPT_FUNC isAcceptState +#undef STOP_AT_MATCH + +/* stop at match, can die, not accelerated */ +#define SHENG_IMPL sheng4_samd +#define INTERESTING_FUNC hasInterestingStates +#define INNER_DEAD_FUNC isDeadState +#define OUTER_DEAD_FUNC dummyFunc +#define INNER_ACCEL_FUNC dummyFunc +#define OUTER_ACCEL_FUNC dummyFunc +#define ACCEPT_FUNC isAcceptState #if defined(HAVE_AVX512VBMI) #define SHENG32_IMPL sheng32_4_samd #define INTERESTING_FUNC32 hasInterestingStates32 @@ -502,15 +502,15 @@ u8 dummyFunc(UNUSED const u8 a) { #define OUTER_DEAD_FUNC64 dummyFunc #define ACCEPT_FUNC64 isAcceptState64 #endif -#define STOP_AT_MATCH 1 -#include "sheng_impl4.h" -#undef SHENG_IMPL -#undef INTERESTING_FUNC -#undef INNER_DEAD_FUNC -#undef OUTER_DEAD_FUNC -#undef INNER_ACCEL_FUNC -#undef OUTER_ACCEL_FUNC -#undef ACCEPT_FUNC +#define STOP_AT_MATCH 1 +#include "sheng_impl4.h" +#undef SHENG_IMPL +#undef INTERESTING_FUNC +#undef INNER_DEAD_FUNC +#undef OUTER_DEAD_FUNC +#undef INNER_ACCEL_FUNC +#undef OUTER_ACCEL_FUNC +#undef ACCEPT_FUNC #if defined(HAVE_AVX512VBMI) #undef SHENG32_IMPL #undef INTERESTING_FUNC32 @@ -525,16 +525,16 @@ u8 dummyFunc(UNUSED const u8 a) { #undef OUTER_DEAD_FUNC64 #undef ACCEPT_FUNC64 #endif -#undef STOP_AT_MATCH - -/* stop at match, can't die, accelerated */ -#define SHENG_IMPL sheng4_sama -#define INTERESTING_FUNC hasInterestingStates -#define INNER_DEAD_FUNC dummyFunc -#define OUTER_DEAD_FUNC dummyFunc -#define INNER_ACCEL_FUNC isAccelState -#define OUTER_ACCEL_FUNC dummyFunc -#define ACCEPT_FUNC isAcceptState +#undef STOP_AT_MATCH + +/* stop at match, can't die, accelerated */ +#define SHENG_IMPL sheng4_sama +#define INTERESTING_FUNC hasInterestingStates +#define INNER_DEAD_FUNC dummyFunc +#define OUTER_DEAD_FUNC dummyFunc +#define INNER_ACCEL_FUNC isAccelState +#define OUTER_ACCEL_FUNC dummyFunc +#define ACCEPT_FUNC isAcceptState #if defined(HAVE_AVX512VBMI) #define SHENG32_IMPL sheng32_4_sama #define INTERESTING_FUNC32 hasInterestingStates32 @@ -545,15 +545,15 @@ u8 dummyFunc(UNUSED const u8 a) { #define ACCEPT_FUNC32 isAcceptState32 #define NO_SHENG64_IMPL #endif -#define STOP_AT_MATCH 1 -#include "sheng_impl4.h" -#undef SHENG_IMPL -#undef INTERESTING_FUNC -#undef INNER_DEAD_FUNC -#undef OUTER_DEAD_FUNC -#undef INNER_ACCEL_FUNC -#undef OUTER_ACCEL_FUNC -#undef ACCEPT_FUNC +#define STOP_AT_MATCH 1 +#include "sheng_impl4.h" +#undef SHENG_IMPL +#undef INTERESTING_FUNC +#undef INNER_DEAD_FUNC +#undef OUTER_DEAD_FUNC +#undef INNER_ACCEL_FUNC +#undef OUTER_ACCEL_FUNC +#undef ACCEPT_FUNC #if defined(HAVE_AVX512VBMI) #undef SHENG32_IMPL #undef INTERESTING_FUNC32 @@ -564,16 +564,16 @@ u8 dummyFunc(UNUSED const u8 a) { #undef ACCEPT_FUNC32 #undef NO_SHENG64_IMPL #endif -#undef STOP_AT_MATCH - -/* stop at match, can't die, not accelerated */ -#define SHENG_IMPL sheng4_sam -#define INTERESTING_FUNC hasInterestingStates -#define INNER_DEAD_FUNC dummyFunc -#define OUTER_DEAD_FUNC dummyFunc -#define INNER_ACCEL_FUNC dummyFunc -#define OUTER_ACCEL_FUNC dummyFunc -#define ACCEPT_FUNC isAcceptState +#undef STOP_AT_MATCH + +/* stop at match, can't die, not accelerated */ +#define SHENG_IMPL sheng4_sam +#define INTERESTING_FUNC hasInterestingStates +#define INNER_DEAD_FUNC dummyFunc +#define OUTER_DEAD_FUNC dummyFunc +#define INNER_ACCEL_FUNC dummyFunc +#define OUTER_ACCEL_FUNC dummyFunc +#define ACCEPT_FUNC isAcceptState #if defined(HAVE_AVX512VBMI) #define SHENG32_IMPL sheng32_4_sam #define INTERESTING_FUNC32 hasInterestingStates32 @@ -588,15 +588,15 @@ u8 dummyFunc(UNUSED const u8 a) { #define OUTER_DEAD_FUNC64 dummyFunc #define ACCEPT_FUNC64 isAcceptState64 #endif -#define STOP_AT_MATCH 1 -#include "sheng_impl4.h" -#undef SHENG_IMPL -#undef INTERESTING_FUNC -#undef INNER_DEAD_FUNC -#undef OUTER_DEAD_FUNC -#undef INNER_ACCEL_FUNC -#undef OUTER_ACCEL_FUNC -#undef ACCEPT_FUNC +#define STOP_AT_MATCH 1 +#include "sheng_impl4.h" +#undef SHENG_IMPL +#undef INTERESTING_FUNC +#undef INNER_DEAD_FUNC +#undef OUTER_DEAD_FUNC +#undef INNER_ACCEL_FUNC +#undef OUTER_ACCEL_FUNC +#undef ACCEPT_FUNC #if defined(HAVE_AVX512VBMI) #undef SHENG32_IMPL #undef INTERESTING_FUNC32 @@ -611,18 +611,18 @@ u8 dummyFunc(UNUSED const u8 a) { #undef OUTER_DEAD_FUNC64 #undef ACCEPT_FUNC64 #endif -#undef STOP_AT_MATCH - -/* no-match have interesting func as dummy, and die/accel checks are outer */ - -/* no match, can die, accelerated */ -#define SHENG_IMPL sheng4_nmda -#define INTERESTING_FUNC dummyFunc4 -#define INNER_DEAD_FUNC dummyFunc -#define OUTER_DEAD_FUNC isDeadState -#define INNER_ACCEL_FUNC dummyFunc -#define OUTER_ACCEL_FUNC isAccelState -#define ACCEPT_FUNC dummyFunc +#undef STOP_AT_MATCH + +/* no-match have interesting func as dummy, and die/accel checks are outer */ + +/* no match, can die, accelerated */ +#define SHENG_IMPL sheng4_nmda +#define INTERESTING_FUNC dummyFunc4 +#define INNER_DEAD_FUNC dummyFunc +#define OUTER_DEAD_FUNC isDeadState +#define INNER_ACCEL_FUNC dummyFunc +#define OUTER_ACCEL_FUNC isAccelState +#define ACCEPT_FUNC dummyFunc #if defined(HAVE_AVX512VBMI) #define SHENG32_IMPL sheng32_4_nmda #define INTERESTING_FUNC32 dummyFunc4 @@ -633,15 +633,15 @@ u8 dummyFunc(UNUSED const u8 a) { #define ACCEPT_FUNC32 dummyFunc #define NO_SHENG64_IMPL #endif -#define STOP_AT_MATCH 0 -#include "sheng_impl4.h" -#undef SHENG_IMPL -#undef INTERESTING_FUNC -#undef INNER_DEAD_FUNC -#undef OUTER_DEAD_FUNC -#undef INNER_ACCEL_FUNC -#undef OUTER_ACCEL_FUNC -#undef ACCEPT_FUNC +#define STOP_AT_MATCH 0 +#include "sheng_impl4.h" +#undef SHENG_IMPL +#undef INTERESTING_FUNC +#undef INNER_DEAD_FUNC +#undef OUTER_DEAD_FUNC +#undef INNER_ACCEL_FUNC +#undef OUTER_ACCEL_FUNC +#undef ACCEPT_FUNC #if defined(HAVE_AVX512VBMI) #undef SHENG32_IMPL #undef INTERESTING_FUNC32 @@ -652,16 +652,16 @@ u8 dummyFunc(UNUSED const u8 a) { #undef ACCEPT_FUNC32 #undef NO_SHENG64_IMPL #endif -#undef STOP_AT_MATCH - -/* no match, can die, not accelerated */ -#define SHENG_IMPL sheng4_nmd -#define INTERESTING_FUNC dummyFunc4 -#define INNER_DEAD_FUNC dummyFunc -#define OUTER_DEAD_FUNC isDeadState -#define INNER_ACCEL_FUNC dummyFunc -#define OUTER_ACCEL_FUNC dummyFunc -#define ACCEPT_FUNC dummyFunc +#undef STOP_AT_MATCH + +/* no match, can die, not accelerated */ +#define SHENG_IMPL sheng4_nmd +#define INTERESTING_FUNC dummyFunc4 +#define INNER_DEAD_FUNC dummyFunc +#define OUTER_DEAD_FUNC isDeadState +#define INNER_ACCEL_FUNC dummyFunc +#define OUTER_ACCEL_FUNC dummyFunc +#define ACCEPT_FUNC dummyFunc #if defined(HAVE_AVX512VBMI) #define SHENG32_IMPL sheng32_4_nmd #define INTERESTING_FUNC32 dummyFunc4 @@ -676,15 +676,15 @@ u8 dummyFunc(UNUSED const u8 a) { #define OUTER_DEAD_FUNC64 isDeadState64 #define ACCEPT_FUNC64 dummyFunc #endif -#define STOP_AT_MATCH 0 -#include "sheng_impl4.h" -#undef SHENG_IMPL -#undef INTERESTING_FUNC -#undef INNER_DEAD_FUNC -#undef OUTER_DEAD_FUNC -#undef INNER_ACCEL_FUNC -#undef OUTER_ACCEL_FUNC -#undef ACCEPT_FUNC +#define STOP_AT_MATCH 0 +#include "sheng_impl4.h" +#undef SHENG_IMPL +#undef INTERESTING_FUNC +#undef INNER_DEAD_FUNC +#undef OUTER_DEAD_FUNC +#undef INNER_ACCEL_FUNC +#undef OUTER_ACCEL_FUNC +#undef ACCEPT_FUNC #if defined(HAVE_AVX512VBMI) #undef SHENG32_IMPL #undef INTERESTING_FUNC32 @@ -699,19 +699,19 @@ u8 dummyFunc(UNUSED const u8 a) { #undef OUTER_DEAD_FUNC64 #undef ACCEPT_FUNC64 #endif -#undef STOP_AT_MATCH - -/* there is no performance benefit in accelerating a no-match case that can't - * die */ - -/* no match, can't die */ -#define SHENG_IMPL sheng4_nm -#define INTERESTING_FUNC dummyFunc4 -#define INNER_DEAD_FUNC dummyFunc -#define OUTER_DEAD_FUNC dummyFunc -#define INNER_ACCEL_FUNC dummyFunc -#define OUTER_ACCEL_FUNC dummyFunc -#define ACCEPT_FUNC dummyFunc +#undef STOP_AT_MATCH + +/* there is no performance benefit in accelerating a no-match case that can't + * die */ + +/* no match, can't die */ +#define SHENG_IMPL sheng4_nm +#define INTERESTING_FUNC dummyFunc4 +#define INNER_DEAD_FUNC dummyFunc +#define OUTER_DEAD_FUNC dummyFunc +#define INNER_ACCEL_FUNC dummyFunc +#define OUTER_ACCEL_FUNC dummyFunc +#define ACCEPT_FUNC dummyFunc #if defined(HAVE_AVX512VBMI) #define SHENG32_IMPL sheng32_4_nm #define INTERESTING_FUNC32 dummyFunc4 @@ -726,15 +726,15 @@ u8 dummyFunc(UNUSED const u8 a) { #define OUTER_DEAD_FUNC64 dummyFunc #define ACCEPT_FUNC64 dummyFunc #endif -#define STOP_AT_MATCH 0 -#include "sheng_impl4.h" -#undef SHENG_IMPL -#undef INTERESTING_FUNC -#undef INNER_DEAD_FUNC -#undef OUTER_DEAD_FUNC -#undef INNER_ACCEL_FUNC -#undef OUTER_ACCEL_FUNC -#undef ACCEPT_FUNC +#define STOP_AT_MATCH 0 +#include "sheng_impl4.h" +#undef SHENG_IMPL +#undef INTERESTING_FUNC +#undef INNER_DEAD_FUNC +#undef OUTER_DEAD_FUNC +#undef INNER_ACCEL_FUNC +#undef OUTER_ACCEL_FUNC +#undef ACCEPT_FUNC #if defined(HAVE_AVX512VBMI) #undef SHENG32_IMPL #undef INTERESTING_FUNC32 @@ -749,6 +749,6 @@ u8 dummyFunc(UNUSED const u8 a) { #undef OUTER_DEAD_FUNC64 #undef ACCEPT_FUNC64 #endif -#undef STOP_AT_MATCH - -#endif // SHENG_DEFS_H +#undef STOP_AT_MATCH + +#endif // SHENG_DEFS_H |