Skip to content

Commit 34a052a

Browse files
1a1a11aCopilot
andcommitted
Update libCacheSim/dataStructure/minimalIncrementCBF.h
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent 273a576 commit 34a052a

8 files changed

Lines changed: 37 additions & 41 deletions

File tree

libCacheSim/bin/traceUtils/utils.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
namespace utils {
1414
void *setup_mmap(const std::string &file_path, size_t *size) {
1515
int fd;
16-
struct stat st{};
16+
struct stat st {};
1717
void *mapped_file;
1818

1919
// set up mmap region

libCacheSim/dataStructure/hash/xxh3.h

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1742,9 +1742,11 @@ static XXH64_hash_t XXH3_mergeAccs(const xxh_u64* XXH_RESTRICT acc,
17421742
return XXH3_avalanche(result64);
17431743
}
17441744

1745-
#define XXH3_INIT_ACC \
1746-
{XXH_PRIME32_3, XXH_PRIME64_1, XXH_PRIME64_2, XXH_PRIME64_3, \
1747-
XXH_PRIME64_4, XXH_PRIME32_2, XXH_PRIME64_5, XXH_PRIME32_1}
1745+
#define XXH3_INIT_ACC \
1746+
{ \
1747+
XXH_PRIME32_3, XXH_PRIME64_1, XXH_PRIME64_2, XXH_PRIME64_3, XXH_PRIME64_4, \
1748+
XXH_PRIME32_2, XXH_PRIME64_5, XXH_PRIME32_1 \
1749+
}
17481750

17491751
XXH_FORCE_INLINE XXH64_hash_t XXH3_hashLong_64b_internal(
17501752
const xxh_u8* XXH_RESTRICT input, size_t len,

libCacheSim/dataStructure/hash/xxhash.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -434,7 +434,7 @@ struct XXH32_state_s {
434434
XXH32_hash_t memsize;
435435
XXH32_hash_t
436436
reserved; /* never read nor write, might be removed in a future version */
437-
}; /* typedef'd to XXH32_state_t */
437+
}; /* typedef'd to XXH32_state_t */
438438

439439
#ifndef XXH_NO_LONG_LONG /* defined when there is no 64-bit support */
440440

@@ -449,7 +449,7 @@ struct XXH64_state_s {
449449
XXH32_hash_t reserved32; /* required for padding anyway */
450450
XXH64_hash_t reserved64; /* never read nor write, might be removed in a future
451451
version */
452-
}; /* typedef'd to XXH64_state_t */
452+
}; /* typedef'd to XXH64_state_t */
453453

454454
/*-**********************************************************************
455455
* XXH3
@@ -954,9 +954,9 @@ static void* XXH_memcpy(void* dest, const void* src, size_t size) {
954954
/* *************************************
955955
* Compiler Specific Options
956956
***************************************/
957-
#ifdef _MSC_VER /* Visual Studio warning fix */
958-
#pragma warning( \
959-
disable : 4127) /* disable: C4127: conditional expression is constant */
957+
#ifdef _MSC_VER /* Visual Studio warning fix */
958+
#pragma warning(disable : 4127) /* disable: C4127: conditional expression is \
959+
constant */
960960
#endif
961961

962962
#if XXH_NO_INLINE_HINTS /* disable inlining hints */

libCacheSim/dataStructure/minimalIncrementCBF.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
#ifndef _MINIMAL_INCREMENR_CBF_H
2-
#define _MINIMAL_INCREMENR_CBF_H
1+
#ifndef _MINIMAL_INCREMENT_CBF_H
2+
#define _MINIMAL_INCREMENT_CBF_H
33

44
#ifdef __cplusplus
55
extern "C" {

libCacheSim/dataStructure/robin_hood.h

Lines changed: 20 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -615,27 +615,24 @@ struct pair {
615615

616616
// pair constructors are explicit so we don't accidentally call this ctor when
617617
// we don't have to.
618-
explicit constexpr pair(std::pair<T1, T2> const& o) noexcept(
619-
noexcept(T1(std::declval<T1 const&>())) &&
620-
noexcept(T2(std::declval<T2 const&>())))
618+
explicit constexpr pair(std::pair<T1, T2> const& o) noexcept(noexcept(
619+
T1(std::declval<T1 const&>())) && noexcept(T2(std::declval<T2 const&>())))
621620
: first(o.first), second(o.second) {}
622621

623622
// pair constructors are explicit so we don't accidentally call this ctor when
624623
// we don't have to.
625-
explicit constexpr pair(std::pair<T1, T2>&& o) noexcept(
626-
noexcept(T1(std::move(std::declval<T1&&>()))) &&
627-
noexcept(T2(std::move(std::declval<T2&&>()))))
624+
explicit constexpr pair(std::pair<T1, T2>&& o) noexcept(noexcept(T1(std::move(
625+
std::declval<T1&&>()))) && noexcept(T2(std::move(std::declval<T2&&>()))))
628626
: first(std::move(o.first)), second(std::move(o.second)) {}
629627

630-
constexpr pair(T1&& a, T2&& b) noexcept(
631-
noexcept(T1(std::move(std::declval<T1&&>()))) &&
632-
noexcept(T2(std::move(std::declval<T2&&>()))))
628+
constexpr pair(T1&& a, T2&& b) noexcept(noexcept(T1(std::move(
629+
std::declval<T1&&>()))) && noexcept(T2(std::move(std::declval<T2&&>()))))
633630
: first(std::move(a)), second(std::move(b)) {}
634631

635632
template <typename U1, typename U2>
636633
constexpr pair(U1&& a, U2&& b) noexcept(
637-
noexcept(T1(std::forward<U1>(std::declval<U1&&>()))) &&
638-
noexcept(T2(std::forward<U2>(std::declval<U2&&>()))))
634+
noexcept(T1(std::forward<U1>(std::declval<U1&&>()))) && noexcept(
635+
T2(std::forward<U2>(std::declval<U2&&>()))))
639636
: first(std::forward<U1>(a)), second(std::forward<U2>(b)) {}
640637

641638
template <typename... U1, typename... U2>
@@ -658,17 +655,13 @@ struct pair {
658655

659656
// constructor called from the std::piecewise_construct_t ctor
660657
template <typename... U1, size_t... I1, typename... U2, size_t... I2>
661-
pair(
662-
std::tuple<U1...>& a, std::tuple<U2...>& b,
663-
ROBIN_HOOD_STD::index_sequence<I1...> /*unused*/,
664-
ROBIN_HOOD_STD::index_sequence<
665-
I2...> /*unused*/) noexcept(noexcept(T1(std::
666-
forward<U1>(std::get<I1>(
667-
std::declval<std::tuple<
668-
U1...>&>()))...)) &&
669-
noexcept(T2(std::forward<U2>(std::get<I2>(
670-
std::declval<
671-
std::tuple<U2...>&>()))...)))
658+
pair(std::tuple<U1...>& a, std::tuple<U2...>& b, ROBIN_HOOD_STD::index_sequence<I1...> /*unused*/, ROBIN_HOOD_STD::index_sequence<I2...> /*unused*/) noexcept(
659+
noexcept(T1(std::forward<U1>(std::get<I1>(
660+
std::declval<std::tuple<
661+
U1...>&>()))...)) && noexcept(T2(std::
662+
forward<U2>(std::get<I2>(
663+
std::declval<std::tuple<
664+
U2...>&>()))...)))
672665
: first(std::forward<U1>(std::get<I1>(a))...),
673666
second(std::forward<U2>(std::get<I2>(b))...) {
674667
// make visual studio compiler happy about warning about unused a & b.
@@ -705,8 +698,9 @@ inline constexpr bool operator!=(pair<A, B> const& x, pair<A, B> const& y) {
705698
template <typename A, typename B>
706699
inline constexpr bool
707700
operator<(pair<A, B> const& x, pair<A, B> const& y) noexcept(
708-
noexcept(std::declval<A const&>() < std::declval<A const&>()) &&
709-
noexcept(std::declval<B const&>() < std::declval<B const&>())) {
701+
noexcept(std::declval<A const&>() <
702+
std::declval<A const&>()) && noexcept(std::declval<B const&>() <
703+
std::declval<B const&>())) {
710704
return x.first < y.first || (!(y.first < x.first) && x.second < y.second);
711705
}
712706
template <typename A, typename B>
@@ -1552,8 +1546,8 @@ class Table
15521546
// we can ignore it.
15531547
explicit Table(
15541548
size_t ROBIN_HOOD_UNUSED(bucket_count) /*unused*/, const Hash& h = Hash{},
1555-
const KeyEqual& equal = KeyEqual{}) noexcept(noexcept(Hash(h)) &&
1556-
noexcept(KeyEqual(equal)))
1549+
const KeyEqual& equal =
1550+
KeyEqual{}) noexcept(noexcept(Hash(h)) && noexcept(KeyEqual(equal)))
15571551
: WHash(h), WKeyEqual(equal) {
15581552
ROBIN_HOOD_TRACE(this)
15591553
}

libCacheSim/traceAnalyzer/reqRate.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ namespace traceAnalyzer {
1414
class ReqRate {
1515
public:
1616
ReqRate() = default;
17-
explicit ReqRate(int time_window) : time_window_(time_window) {};
17+
explicit ReqRate(int time_window) : time_window_(time_window){};
1818
~ReqRate() = default;
1919

2020
void add_req(request_t *req);

scripts/install_dev_dependency.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ main() {
4646
sudo apt install -yqq nodejs npm
4747
# trunk-ignore(shellcheck/SC2312)
4848
elif [[ $(uname -a) == *"Darwin"* ]]; then
49-
brew install gdb clang-format nodejs npm
49+
brew install gdb clang-format flock nodejs npm
5050
elif grep -qi 'microsoft' /proc/version 2>/dev/null; then
5151
# WSL detection
5252
sudo apt install -yqq gdb valgrind clang-tidy clang-format

scripts/setup_hooks.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ HOOKS_DIR="${REPO_ROOT}/.git/hooks"
88
echo "Installing git hooks..."
99

1010
# Create pre-commit hook
11-
cat > "${HOOKS_DIR}/pre-commit" << 'EOL'
11+
cat >"${HOOKS_DIR}/pre-commit" <<'EOL'
1212
#!/bin/bash
1313
set -e
1414
@@ -301,4 +301,4 @@ echo "Git hooks installed successfully!"
301301
echo "The pre-commit hook will now run automatically on each commit to check for linting issues."
302302
echo "You can bypass the checks with: SKIP_LINT=1 git commit"
303303
echo "Linting logs are stored in .lint-logs/ for future reference."
304-
echo "Note: clang-tidy and clang-format will be used if they're installed on your system."
304+
echo "Note: clang-tidy and clang-format will be used if they're installed on your system."

0 commit comments

Comments
 (0)