mirror of
https://github.com/VectorCamp/vectorscan.git
synced 2025-06-28 16:41:01 +03:00
whitespace changes
This commit is contained in:
parent
923e602601
commit
c510b85bf1
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2015-2016, Intel Corporation
|
* Copyright (c) 2015-2017, Intel Corporation
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
* modification, are permitted provided that the following conditions are met:
|
* modification, are permitted provided that the following conditions are met:
|
||||||
@ -545,7 +545,7 @@ hs_error_t hs_valid_platform(void);
|
|||||||
* At a minimum, Hyperscan requires Supplemental Streaming SIMD Extensions 3
|
* At a minimum, Hyperscan requires Supplemental Streaming SIMD Extensions 3
|
||||||
* (SSSE3).
|
* (SSSE3).
|
||||||
*/
|
*/
|
||||||
#define HS_ARCH_ERROR (-11)
|
#define HS_ARCH_ERROR (-11)
|
||||||
|
|
||||||
/** @} */
|
/** @} */
|
||||||
|
|
||||||
|
@ -1734,8 +1734,8 @@ namespace {
|
|||||||
struct SomRevNfa {
|
struct SomRevNfa {
|
||||||
SomRevNfa(NFAVertex s, ReportID r, bytecode_ptr<NFA> n)
|
SomRevNfa(NFAVertex s, ReportID r, bytecode_ptr<NFA> n)
|
||||||
: sink(s), report(r), nfa(move(n)) {}
|
: sink(s), report(r), nfa(move(n)) {}
|
||||||
SomRevNfa(SomRevNfa&& s) // MSVC2013 needs this for emplace
|
SomRevNfa(SomRevNfa &&s) // MSVC2013 needs this for emplace
|
||||||
: sink(s.sink), report(s.report), nfa(move(s.nfa)) {}
|
: sink(s.sink), report(s.report), nfa(move(s.nfa)) {}
|
||||||
NFAVertex sink;
|
NFAVertex sink;
|
||||||
ReportID report;
|
ReportID report;
|
||||||
bytecode_ptr<NFA> nfa;
|
bytecode_ptr<NFA> nfa;
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2015-2016, Intel Corporation
|
* Copyright (c) 2015-2017, Intel Corporation
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
* modification, are permitted provided that the following conditions are met:
|
* modification, are permitted provided that the following conditions are met:
|
||||||
@ -189,8 +189,8 @@ typedef u32 ReportID;
|
|||||||
#define unlikely(x) __builtin_expect(!!(x), 0)
|
#define unlikely(x) __builtin_expect(!!(x), 0)
|
||||||
#endif
|
#endif
|
||||||
#else
|
#else
|
||||||
#define likely(x) (x)
|
#define likely(x) (x)
|
||||||
#define unlikely(x) (x)
|
#define unlikely(x) (x)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if !defined(RELEASE_BUILD) || defined(DEBUG)
|
#if !defined(RELEASE_BUILD) || defined(DEBUG)
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2015, Intel Corporation
|
* Copyright (c) 2015-2017, Intel Corporation
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
* modification, are permitted provided that the following conditions are met:
|
* modification, are permitted provided that the following conditions are met:
|
||||||
@ -39,9 +39,9 @@
|
|||||||
|
|
||||||
namespace ue2 {
|
namespace ue2 {
|
||||||
#if defined(USE_STD)
|
#if defined(USE_STD)
|
||||||
using std::make_unique;
|
using std::make_unique;
|
||||||
#else
|
#else
|
||||||
using boost::make_unique;
|
using boost::make_unique;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -36,26 +36,26 @@
|
|||||||
// open coded implementations to test against
|
// open coded implementations to test against
|
||||||
static
|
static
|
||||||
u32 our_clz(u32 x) {
|
u32 our_clz(u32 x) {
|
||||||
u32 n;
|
u32 n;
|
||||||
|
|
||||||
if (x == 0) return(32);
|
if (x == 0) return(32);
|
||||||
n = 0;
|
n = 0;
|
||||||
if (x <= 0x0000FFFF) { n = n + 16; x = x << 16; }
|
if (x <= 0x0000FFFF) { n = n + 16; x = x << 16; }
|
||||||
if (x <= 0x00FFFFFF) { n = n + 8; x = x << 8; }
|
if (x <= 0x00FFFFFF) { n = n + 8; x = x << 8; }
|
||||||
if (x <= 0x0FFFFFFF) { n = n + 4; x = x << 4; }
|
if (x <= 0x0FFFFFFF) { n = n + 4; x = x << 4; }
|
||||||
if (x <= 0x3FFFFFFF) { n = n + 2; x = x << 2; }
|
if (x <= 0x3FFFFFFF) { n = n + 2; x = x << 2; }
|
||||||
if (x <= 0x7FFFFFFF) { n = n + 1; }
|
if (x <= 0x7FFFFFFF) { n = n + 1; }
|
||||||
return n;
|
return n;
|
||||||
}
|
}
|
||||||
|
|
||||||
static
|
static
|
||||||
u32 our_clzll(u64a x) {
|
u32 our_clzll(u64a x) {
|
||||||
// Synthesise from 32-bit variant.
|
// Synthesise from 32-bit variant.
|
||||||
u32 high = x >> 32;
|
u32 high = x >> 32;
|
||||||
if (high) {
|
if (high) {
|
||||||
return our_clz(high);
|
return our_clz(high);
|
||||||
}
|
}
|
||||||
return 32 + our_clz(x);
|
return 32 + our_clz(x);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user