Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into dev/lhecker/3498-line…
Browse files Browse the repository at this point in the history
…-heights
  • Loading branch information
lhecker committed Oct 21, 2022
2 parents f6e730e + b674ac5 commit 6bbc1cd
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 10 deletions.
3 changes: 0 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
[submodule "dep/gsl"]
path = dep/gsl
url = https://github.com/microsoft/gsl
[submodule "dep/wil"]
path = dep/wil
url = https://github.com/microsoft/wil
10 changes: 5 additions & 5 deletions src/inc/til/hash.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
#define TIL_HASH_X64
#elif defined(_M_ARM64) || defined(_M_ARM64EC)
#define TIL_HASH_ARM64
#elif defined(_M_IX86)
#define TIL_HASH_X86
#elif defined(_M_IX86) || defined(_M_ARM)
#define TIL_HASH_32BIT
#else
#error "Unsupported architecture for til::hash"
#endif
Expand Down Expand Up @@ -59,7 +59,7 @@ namespace til
}

private:
#if defined(TIL_HASH_X86)
#if defined(TIL_HASH_32BIT)

static uint32_t _wyr24(const uint8_t* p, uint32_t k) noexcept
{
Expand Down Expand Up @@ -109,7 +109,7 @@ namespace til
return seed ^ see1;
}

#else // defined(TIL_HASH_X86)
#else // defined(TIL_HASH_32BIT)

static uint64_t _wyr3(const uint8_t* p, size_t k) noexcept
{
Expand Down Expand Up @@ -201,7 +201,7 @@ namespace til
return _wymix(s1 ^ len, _wymix(a ^ s1, b ^ seed));
}

#endif // defined(TIL_HASH_X86)
#endif // defined(TIL_HASH_32BIT)

size_t _hash = 0;
};
Expand Down
2 changes: 1 addition & 1 deletion src/til/ut_til/HashTests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ class HashTests
for (const auto& t : tests)
{
const auto actual = til::hasher{ t.seed }.write(t.input).finalize();
#if defined(TIL_HASH_X86)
#if defined(TIL_HASH_32BIT)
VERIFY_ARE_EQUAL(t.expected32, actual);
#else
VERIFY_ARE_EQUAL(t.expected64, actual);
Expand Down
14 changes: 13 additions & 1 deletion src/til/ut_til/sources
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,29 @@ SOURCES = \
$(SOURCES) \
BaseTests.cpp \
BitmapTests.cpp \
CoalesceTests.cpp \
ColorTests.cpp \
EnumSetTests.cpp \
HashTests.cpp \
MathTests.cpp \
mutex.cpp \
OperatorTests.cpp \
PointTests.cpp \
MathTests.cpp \
RectangleTests.cpp \
ReplaceTests.cpp \
RunLengthEncodingTests.cpp \
SizeTests.cpp \
SmallVectorTests.cpp \
SomeTests.cpp \
StaticMapTests.cpp \
string.cpp \
u8u16convertTests.cpp \
DefaultResource.rc \

# These tests are disabled because of a missing symbol.
# SPSCTests.cpp \
# throttled_func.cpp \

INCLUDES = \
.. \
$(INCLUDES) \
Expand Down

0 comments on commit 6bbc1cd

Please sign in to comment.