/*
- * Copyright (c) 2015-2016, Intel Corporation
+ * Copyright (c) 2015-2017, Intel Corporation
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* At a minimum, Hyperscan requires Supplemental Streaming SIMD Extensions 3
* (SSSE3).
*/
-#define HS_ARCH_ERROR (-11)
+#define HS_ARCH_ERROR (-11)
/** @} */
struct SomRevNfa {
SomRevNfa(NFAVertex s, ReportID r, bytecode_ptr<NFA> n)
: sink(s), report(r), nfa(move(n)) {}
- SomRevNfa(SomRevNfa&& s) // MSVC2013 needs this for emplace
- : sink(s.sink), report(s.report), nfa(move(s.nfa)) {}
+ SomRevNfa(SomRevNfa &&s) // MSVC2013 needs this for emplace
+ : sink(s.sink), report(s.report), nfa(move(s.nfa)) {}
NFAVertex sink;
ReportID report;
bytecode_ptr<NFA> nfa;
/*
- * Copyright (c) 2015-2016, Intel Corporation
+ * Copyright (c) 2015-2017, Intel Corporation
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
#define unlikely(x) __builtin_expect(!!(x), 0)
#endif
#else
-#define likely(x) (x)
-#define unlikely(x) (x)
+#define likely(x) (x)
+#define unlikely(x) (x)
#endif
#if !defined(RELEASE_BUILD) || defined(DEBUG)
/*
- * Copyright (c) 2015, Intel Corporation
+ * Copyright (c) 2015-2017, Intel Corporation
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
namespace ue2 {
#if defined(USE_STD)
- using std::make_unique;
+using std::make_unique;
#else
- using boost::make_unique;
+using boost::make_unique;
#endif
}
// open coded implementations to test against
static
u32 our_clz(u32 x) {
- u32 n;
-
- if (x == 0) return(32);
- n = 0;
- if (x <= 0x0000FFFF) { n = n + 16; x = x << 16; }
- if (x <= 0x00FFFFFF) { n = n + 8; x = x << 8; }
- if (x <= 0x0FFFFFFF) { n = n + 4; x = x << 4; }
- if (x <= 0x3FFFFFFF) { n = n + 2; x = x << 2; }
- if (x <= 0x7FFFFFFF) { n = n + 1; }
- return n;
+ u32 n;
+
+ if (x == 0) return(32);
+ n = 0;
+ if (x <= 0x0000FFFF) { n = n + 16; x = x << 16; }
+ if (x <= 0x00FFFFFF) { n = n + 8; x = x << 8; }
+ if (x <= 0x0FFFFFFF) { n = n + 4; x = x << 4; }
+ if (x <= 0x3FFFFFFF) { n = n + 2; x = x << 2; }
+ if (x <= 0x7FFFFFFF) { n = n + 1; }
+ return n;
}
static
u32 our_clzll(u64a x) {
- // Synthesise from 32-bit variant.
- u32 high = x >> 32;
- if (high) {
- return our_clz(high);
- }
- return 32 + our_clz(x);
+ // Synthesise from 32-bit variant.
+ u32 high = x >> 32;
+ if (high) {
+ return our_clz(high);
+ }
+ return 32 + our_clz(x);
}