Skip to content

Commit

Permalink
Merge pull request #615 from mdaus/coda-oss_20240920
Browse files Browse the repository at this point in the history
Coda oss 20240920
  • Loading branch information
adam-beauchamp authored Sep 20, 2024
2 parents 00c3034 + 3f1516d commit b9513b4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion externals/coda-oss/modules/c++/include/TestCase.h
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ inline int main(TFunc f)
#define CODA_OSS_test_ne_(X1, X2) (((X1) != (X2)) && ((X2) != (X1))) // X1 != X2 means X2 != X1
#define CODA_OSS_test_ne(X1, X2) (CODA_OSS_test_ne_(X1, X2) && !CODA_OSS_test_eq_(X1, X2))
#define CODA_OSS_test_eq(X1, X2) (CODA_OSS_test_eq_(X1, X2) && !CODA_OSS_test_ne_(X1, X2))
#define TEST_ASSERT_EQ(X1, X2) if (!CODA_OSS_test_eq((X1), (X2))) { CODA_OSS_test_diePrintf_eq_(X1, X2); }
#define TEST_ASSERT_EQ(X1, X2) do { bool expr(CODA_OSS_test_eq((X1), (X2))); if (!expr) { CODA_OSS_test_diePrintf_eq_(X1, X2); } } while (0);
#define TEST_ASSERT_EQ_MSG(msg, X1, X2) if (!CODA_OSS_test_eq((X1), (X2))) { CODA_OSS_test_diePrintf_eq_msg_(msg, X1, X2); }
#define TEST_ASSERT_EQ_STR(X1, X2) TEST_ASSERT_EQ(std::string(X1), std::string(X2))
#define TEST_ASSERT_NOT_EQ(X1, X2) if (!CODA_OSS_test_ne((X1), (X2))) { CODA_OSS_test_diePrintf_not_eq_(X1, X2); }
Expand Down
5 changes: 5 additions & 0 deletions externals/coda-oss/modules/c++/sys/source/OSWin32.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -357,14 +357,19 @@ void sys::OSWin32::getAvailableCPUs(std::vector<int>& /*physicalCPUs*/,
sys::SIMDInstructionSet sys::OSWin32::getSIMDInstructionSet() const
{
// https://learn.microsoft.com/en-us/windows/win32/api/processthreadsapi/nf-processthreadsapi-isprocessorfeaturepresent
// (these require Windows SDK (19041) or later)
#ifdef PF_AVX512F_INSTRUCTIONS_AVAILABLE
if (IsProcessorFeaturePresent(PF_AVX512F_INSTRUCTIONS_AVAILABLE))
{
return SIMDInstructionSet::AVX512F;
}
#endif
#ifdef PF_AVX2_INSTRUCTIONS_AVAILABLE
if (IsProcessorFeaturePresent(PF_AVX2_INSTRUCTIONS_AVAILABLE))
{
return SIMDInstructionSet::AVX2;
}
#endif
if (IsProcessorFeaturePresent(PF_XMMI64_INSTRUCTIONS_AVAILABLE))
{
return SIMDInstructionSet::SSE2;
Expand Down

0 comments on commit b9513b4

Please sign in to comment.