mirror of
https://chromium.googlesource.com/libyuv/libyuv
synced 2026-01-01 03:12:16 +08:00
expect avx2 compiler support means one of the avx2 functions exists.
BUG=none TESTED=try bots R=bcornell@google.com Review URL: https://webrtc-codereview.appspot.com/22299004 git-svn-id: http://libyuv.googlecode.com/svn/trunk@1076 16f28f9a-4ce2-e073-06de-1de4eb20be90
This commit is contained in:
parent
accefc4191
commit
d4fbd60169
@ -13,6 +13,7 @@
|
||||
|
||||
#include "libyuv/basic_types.h"
|
||||
#include "libyuv/cpu_id.h"
|
||||
#include "libyuv/row.h" // For HAS_ARGBSHUFFLEROW_AVX2.
|
||||
#include "libyuv/version.h"
|
||||
#include "../unit_test/unit_test.h"
|
||||
|
||||
@ -52,11 +53,22 @@ TEST_F(libyuvTest, TestCpuHas) {
|
||||
}
|
||||
|
||||
TEST_F(libyuvTest, TestCompilerHasAVX2) {
|
||||
#if defined(GCC_HAS_AVX2) || defined(CLANG_HAS_AVX2) || \
|
||||
defined(VISUALC_HAS_AVX2)
|
||||
#ifdef _MSC_VER
|
||||
printf("_MSC_VER %d\n", _MSC_VER);
|
||||
#endif
|
||||
#if !defined(LIBYUV_DISABLE_X86) && (defined(GCC_HAS_AVX2) || \
|
||||
defined(CLANG_HAS_AVX2) || defined(VISUALC_HAS_AVX2))
|
||||
printf("Has AVX2 1\n");
|
||||
// If compiler supports AVX2, the following function is expected to exist:
|
||||
#if !defined(HAS_ARGBSHUFFLEROW_AVX2)
|
||||
EXPECT_TRUE(0); // HAS_ARGBSHUFFLEROW_AVX2 was expected.
|
||||
#endif
|
||||
#else
|
||||
printf("Has AVX2 0\n");
|
||||
// If compiler does not support AVX2, the following function not expected:
|
||||
#if defined(HAS_ARGBSHUFFLEROW_AVX2)
|
||||
EXPECT_TRUE(0); // HAS_ARGBSHUFFLEROW_AVX2 was not expected.
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user