提交 9621f7ad 编写于 作者: M Megvii Engine Team

fix(build): fix host build at ubuntu2204

GitOrigin-RevId: ad5ba1c60264e896ca0db72ba606b850a707a83e
上级 2e41b672
...@@ -1089,6 +1089,11 @@ if(MGE_WITH_JIT AND MGE_WITH_HALIDE) ...@@ -1089,6 +1089,11 @@ if(MGE_WITH_JIT AND MGE_WITH_HALIDE)
include(cmake/Halide.cmake) include(cmake/Halide.cmake)
endif() endif()
if(MGE_ENABLE_EXCEPTIONS)
add_compile_definitions(CPP_REDIS_ENABLE_EXCEPTION=1)
else()
add_compile_definitions(CPP_REDIS_ENABLE_EXCEPTION=0)
endif()
include(cmake/cpp_redis.cmake) include(cmake/cpp_redis.cmake)
# Thread # Thread
...@@ -1133,6 +1138,7 @@ if(MSVC OR WIN32) ...@@ -1133,6 +1138,7 @@ if(MSVC OR WIN32)
endif() endif()
if(CMAKE_THREAD_LIBS_INIT if(CMAKE_THREAD_LIBS_INIT
OR CMAKE_HAVE_LIBC_PTHREAD
OR CMAKE_USE_WIN32_THREADS_INIT OR CMAKE_USE_WIN32_THREADS_INIT
OR ANDROID) OR ANDROID)
set(MGB_HAVE_THREAD 1) set(MGB_HAVE_THREAD 1)
......
...@@ -12,7 +12,7 @@ namespace test { ...@@ -12,7 +12,7 @@ namespace test {
namespace { namespace {
template <typename tag> template <typename tag>
class AARCH64_RELAYOUT : public AARCH64 {}; class AARCH64_RELAYOUT : public AARCH64 {};
TYPED_TEST_CASE(AARCH64_RELAYOUT, relayout::test_types); TYPED_TEST_SUITE(AARCH64_RELAYOUT, relayout::test_types);
TYPED_TEST(AARCH64_RELAYOUT, run) { TYPED_TEST(AARCH64_RELAYOUT, run) {
relayout::run_test<TypeParam>(this->handle()); relayout::run_test<TypeParam>(this->handle());
} }
......
...@@ -12,14 +12,14 @@ using namespace test; ...@@ -12,14 +12,14 @@ using namespace test;
template <typename tag> template <typename tag>
class ARM_ELEMWISE : public ARM_COMMON {}; class ARM_ELEMWISE : public ARM_COMMON {};
TYPED_TEST_CASE(ARM_ELEMWISE, elemwise::test_types); TYPED_TEST_SUITE(ARM_ELEMWISE, elemwise::test_types);
TYPED_TEST(ARM_ELEMWISE, run) { TYPED_TEST(ARM_ELEMWISE, run) {
elemwise::run_test<TypeParam>(this->handle()); elemwise::run_test<TypeParam>(this->handle());
} }
template <typename tag> template <typename tag>
class ARM_ELEMWISE_MULTI_THREADS : public ARM_COMMON_MULTI_THREADS {}; class ARM_ELEMWISE_MULTI_THREADS : public ARM_COMMON_MULTI_THREADS {};
TYPED_TEST_CASE(ARM_ELEMWISE_MULTI_THREADS, elemwise::test_types); TYPED_TEST_SUITE(ARM_ELEMWISE_MULTI_THREADS, elemwise::test_types);
TYPED_TEST(ARM_ELEMWISE_MULTI_THREADS, run) { TYPED_TEST(ARM_ELEMWISE_MULTI_THREADS, run) {
elemwise::run_test<TypeParam>(this->handle()); elemwise::run_test<TypeParam>(this->handle());
} }
......
...@@ -14,7 +14,7 @@ using namespace test; ...@@ -14,7 +14,7 @@ using namespace test;
namespace { namespace {
template <typename tag> template <typename tag>
class ARM_COMMON_ELEMWISE_MULTI_TYPE : public ARM_COMMON {}; class ARM_COMMON_ELEMWISE_MULTI_TYPE : public ARM_COMMON {};
TYPED_TEST_CASE(ARM_COMMON_ELEMWISE_MULTI_TYPE, elemwise_multi_type::test_types); TYPED_TEST_SUITE(ARM_COMMON_ELEMWISE_MULTI_TYPE, elemwise_multi_type::test_types);
} // anonymous namespace } // anonymous namespace
TYPED_TEST(ARM_COMMON_ELEMWISE_MULTI_TYPE, run) { TYPED_TEST(ARM_COMMON_ELEMWISE_MULTI_TYPE, run) {
......
...@@ -231,7 +231,7 @@ typedef ::testing::Types< ...@@ -231,7 +231,7 @@ typedef ::testing::Types<
SmallVector<Constructable, 2>, SmallVector<Constructable, 4>, SmallVector<Constructable, 2>, SmallVector<Constructable, 4>,
SmallVector<Constructable, 5>> SmallVector<Constructable, 5>>
SmallVectorTestTypes; SmallVectorTestTypes;
TYPED_TEST_CASE(SmallVectorTest, SmallVectorTestTypes); TYPED_TEST_SUITE(SmallVectorTest, SmallVectorTestTypes);
// Constructor test. // Constructor test.
TYPED_TEST(SmallVectorTest, ConstructorNonIterTest) { TYPED_TEST(SmallVectorTest, ConstructorNonIterTest) {
SCOPED_TRACE("ConstructorTest"); SCOPED_TRACE("ConstructorTest");
...@@ -836,7 +836,7 @@ typedef ::testing::Types< ...@@ -836,7 +836,7 @@ typedef ::testing::Types<
std::pair<SmallVector<Constructable, 2>, SmallVector<Constructable, 2>>> std::pair<SmallVector<Constructable, 2>, SmallVector<Constructable, 2>>>
DualSmallVectorTestTypes; DualSmallVectorTestTypes;
TYPED_TEST_CASE(DualSmallVectorsTest, DualSmallVectorTestTypes); TYPED_TEST_SUITE(DualSmallVectorsTest, DualSmallVectorTestTypes);
TYPED_TEST(DualSmallVectorsTest, MoveAssignment) { TYPED_TEST(DualSmallVectorsTest, MoveAssignment) {
SCOPED_TRACE("MoveAssignTest-DualVectorTypes"); SCOPED_TRACE("MoveAssignTest-DualVectorTypes");
......
...@@ -12,7 +12,7 @@ using namespace test; ...@@ -12,7 +12,7 @@ using namespace test;
namespace { namespace {
template <typename tag> template <typename tag>
class CPU_RELAYOUT : public CPU {}; class CPU_RELAYOUT : public CPU {};
TYPED_TEST_CASE(CPU_RELAYOUT, relayout::test_types); TYPED_TEST_SUITE(CPU_RELAYOUT, relayout::test_types);
TYPED_TEST(CPU_RELAYOUT, run) { TYPED_TEST(CPU_RELAYOUT, run) {
relayout::run_test<TypeParam>(this->handle()); relayout::run_test<TypeParam>(this->handle());
} }
......
...@@ -71,7 +71,7 @@ void run_tensor_add( ...@@ -71,7 +71,7 @@ void run_tensor_add(
template <typename tag> template <typename tag>
class CUDA_ELEMWISE : public CUDA {}; class CUDA_ELEMWISE : public CUDA {};
TYPED_TEST_CASE(CUDA_ELEMWISE, elemwise::test_types); TYPED_TEST_SUITE(CUDA_ELEMWISE, elemwise::test_types);
TYPED_TEST(CUDA_ELEMWISE, run) { TYPED_TEST(CUDA_ELEMWISE, run) {
elemwise::run_test<TypeParam>(this->handle_cuda()); elemwise::run_test<TypeParam>(this->handle_cuda());
} }
......
...@@ -13,7 +13,7 @@ using namespace test; ...@@ -13,7 +13,7 @@ using namespace test;
namespace { namespace {
template <typename tag> template <typename tag>
class CUDA_ELEMWISE_MULTI_TYPE : public CUDA {}; class CUDA_ELEMWISE_MULTI_TYPE : public CUDA {};
TYPED_TEST_CASE(CUDA_ELEMWISE_MULTI_TYPE, elemwise_multi_type::test_types); TYPED_TEST_SUITE(CUDA_ELEMWISE_MULTI_TYPE, elemwise_multi_type::test_types);
} // anonymous namespace } // anonymous namespace
TYPED_TEST(CUDA_ELEMWISE_MULTI_TYPE, run) { TYPED_TEST(CUDA_ELEMWISE_MULTI_TYPE, run) {
......
...@@ -11,7 +11,7 @@ using namespace test; ...@@ -11,7 +11,7 @@ using namespace test;
namespace { namespace {
template <typename tag> template <typename tag>
class CUDA_RELAYOUT : public CUDA {}; class CUDA_RELAYOUT : public CUDA {};
TYPED_TEST_CASE(CUDA_RELAYOUT, relayout::test_types); TYPED_TEST_SUITE(CUDA_RELAYOUT, relayout::test_types);
TYPED_TEST(CUDA_RELAYOUT, run) { TYPED_TEST(CUDA_RELAYOUT, run) {
relayout::run_test<TypeParam>(this->handle_cuda()); relayout::run_test<TypeParam>(this->handle_cuda());
} }
......
...@@ -11,7 +11,7 @@ using namespace test; ...@@ -11,7 +11,7 @@ using namespace test;
template <typename tag> template <typename tag>
class FALLBACK_ELEMWISE : public FALLBACK {}; class FALLBACK_ELEMWISE : public FALLBACK {};
TYPED_TEST_CASE(FALLBACK_ELEMWISE, elemwise::test_types); TYPED_TEST_SUITE(FALLBACK_ELEMWISE, elemwise::test_types);
TYPED_TEST(FALLBACK_ELEMWISE, run) { TYPED_TEST(FALLBACK_ELEMWISE, run) {
elemwise::run_test<TypeParam>(this->handle()); elemwise::run_test<TypeParam>(this->handle());
} }
......
...@@ -8,7 +8,7 @@ using namespace test; ...@@ -8,7 +8,7 @@ using namespace test;
namespace { namespace {
template <typename tag> template <typename tag>
class FALLBACK_ELEMWISE_MULTI_TYPE : public FALLBACK {}; class FALLBACK_ELEMWISE_MULTI_TYPE : public FALLBACK {};
TYPED_TEST_CASE(FALLBACK_ELEMWISE_MULTI_TYPE, elemwise_multi_type::test_types); TYPED_TEST_SUITE(FALLBACK_ELEMWISE_MULTI_TYPE, elemwise_multi_type::test_types);
} // anonymous namespace } // anonymous namespace
TYPED_TEST(FALLBACK_ELEMWISE_MULTI_TYPE, run) { TYPED_TEST(FALLBACK_ELEMWISE_MULTI_TYPE, run) {
......
...@@ -14,7 +14,7 @@ using namespace test; ...@@ -14,7 +14,7 @@ using namespace test;
namespace { namespace {
template <typename tag> template <typename tag>
class FALLBACK_RELAYOUT : public FALLBACK {}; class FALLBACK_RELAYOUT : public FALLBACK {};
TYPED_TEST_CASE(FALLBACK_RELAYOUT, relayout::test_types); TYPED_TEST_SUITE(FALLBACK_RELAYOUT, relayout::test_types);
TYPED_TEST(FALLBACK_RELAYOUT, run) { TYPED_TEST(FALLBACK_RELAYOUT, run) {
relayout::run_test<TypeParam>(this->handle()); relayout::run_test<TypeParam>(this->handle());
} }
......
...@@ -52,7 +52,7 @@ void run_elemwise_benchmark( ...@@ -52,7 +52,7 @@ void run_elemwise_benchmark(
template <typename tag> template <typename tag>
class ROCM_ELEMWISE : public ROCM {}; class ROCM_ELEMWISE : public ROCM {};
TYPED_TEST_CASE(ROCM_ELEMWISE, elemwise::test_types); TYPED_TEST_SUITE(ROCM_ELEMWISE, elemwise::test_types);
TYPED_TEST(ROCM_ELEMWISE, run) { TYPED_TEST(ROCM_ELEMWISE, run) {
elemwise::run_test<TypeParam>(this->handle_rocm()); elemwise::run_test<TypeParam>(this->handle_rocm());
} }
......
...@@ -13,7 +13,7 @@ using namespace test; ...@@ -13,7 +13,7 @@ using namespace test;
namespace { namespace {
template <typename tag> template <typename tag>
class ROCM_RELAYOUT : public ROCM {}; class ROCM_RELAYOUT : public ROCM {};
TYPED_TEST_CASE(ROCM_RELAYOUT, relayout::test_types); TYPED_TEST_SUITE(ROCM_RELAYOUT, relayout::test_types);
TYPED_TEST(ROCM_RELAYOUT, run) { TYPED_TEST(ROCM_RELAYOUT, run) {
relayout::run_test<TypeParam>(this->handle_rocm()); relayout::run_test<TypeParam>(this->handle_rocm());
} }
......
...@@ -212,7 +212,7 @@ TEST_F(X86, ELEMWISE_FORWARD_TERNARY) { ...@@ -212,7 +212,7 @@ TEST_F(X86, ELEMWISE_FORWARD_TERNARY) {
template <typename tag> template <typename tag>
class X86_ELEMWISE : public X86 {}; class X86_ELEMWISE : public X86 {};
TYPED_TEST_CASE(X86_ELEMWISE, elemwise::test_types); TYPED_TEST_SUITE(X86_ELEMWISE, elemwise::test_types);
TYPED_TEST(X86_ELEMWISE, run) { TYPED_TEST(X86_ELEMWISE, run) {
elemwise::run_test<TypeParam>(this->handle()); elemwise::run_test<TypeParam>(this->handle());
} }
......
...@@ -11,7 +11,7 @@ using namespace test; ...@@ -11,7 +11,7 @@ using namespace test;
namespace { namespace {
template <typename tag> template <typename tag>
class X86_ELEMWISE_MULTI_TYPE : public X86 {}; class X86_ELEMWISE_MULTI_TYPE : public X86 {};
TYPED_TEST_CASE(X86_ELEMWISE_MULTI_TYPE, elemwise_multi_type::test_types); TYPED_TEST_SUITE(X86_ELEMWISE_MULTI_TYPE, elemwise_multi_type::test_types);
} // anonymous namespace } // anonymous namespace
TYPED_TEST(X86_ELEMWISE_MULTI_TYPE, run) { TYPED_TEST(X86_ELEMWISE_MULTI_TYPE, run) {
......
#pragma once #pragma once
#include <string> #include <string>
#include <typeinfo>
namespace mgb::imperative { namespace mgb::imperative {
std::string demangle(std::string mangled); std::string demangle(std::string mangled);
......
...@@ -789,7 +789,7 @@ TEST(TestCompNode, DepedentObjectList) { ...@@ -789,7 +789,7 @@ TEST(TestCompNode, DepedentObjectList) {
namespace { namespace {
template <typename tag> template <typename tag>
class TestCPUCompSeqRec : public ::testing::Test {}; class TestCPUCompSeqRec : public ::testing::Test {};
TYPED_TEST_CASE(TestCPUCompSeqRec, comp_node_test::seq_rec::test_types); TYPED_TEST_SUITE(TestCPUCompSeqRec, comp_node_test::seq_rec::test_types);
TYPED_TEST(TestCPUCompSeqRec, run) { TYPED_TEST(TestCPUCompSeqRec, run) {
comp_node_test::seq_rec::run<TypeParam>(CompNode::load("cpux")); comp_node_test::seq_rec::run<TypeParam>(CompNode::load("cpux"));
} }
......
...@@ -124,7 +124,7 @@ TEST_P(BasicCorrectness, OverwriteSameEnd) { ...@@ -124,7 +124,7 @@ TEST_P(BasicCorrectness, OverwriteSameEnd) {
ASSERT_EQ(align(1 + padding()), allocator->tot_alloc_lower_bound()); ASSERT_EQ(align(1 + padding()), allocator->tot_alloc_lower_bound());
} }
INSTANTIATE_TEST_CASE_P( INSTANTIATE_TEST_SUITE_P(
TestStaticMemAllocAlgo, BasicCorrectness, TestStaticMemAllocAlgo, BasicCorrectness,
TestParam::make_values({1, 2}, {1, 2}, {1})); TestParam::make_values({1, 2}, {1, 2}, {1}));
...@@ -207,7 +207,7 @@ TEST_P(RandomOpr, Main) { ...@@ -207,7 +207,7 @@ TEST_P(RandomOpr, Main) {
timer.get_secs(), sz_tot, sz_lower, double(sz_tot) / sz_lower - 1); timer.get_secs(), sz_tot, sz_lower, double(sz_tot) / sz_lower - 1);
} }
INSTANTIATE_TEST_CASE_P( INSTANTIATE_TEST_SUITE_P(
TestStaticMemAllocAlgo, RandomOpr, TestStaticMemAllocAlgo, RandomOpr,
TestParam::make_values( TestParam::make_values(
{1, 256}, {1, 32}, {10, INTERVAL_MOVE_MAX_SIZE, 1000, 10000})); {1, 256}, {1, 32}, {10, INTERVAL_MOVE_MAX_SIZE, 1000, 10000}));
......
...@@ -107,11 +107,13 @@ TEST(TestGoptBasicArithInplace, Absorbing) { ...@@ -107,11 +107,13 @@ TEST(TestGoptBasicArithInplace, Absorbing) {
ASSERT_EQ(y.as_immutable_scalar()->get_cast<float>(), 0.f); ASSERT_EQ(y.as_immutable_scalar()->get_cast<float>(), 0.f);
} }
namespace {
auto gen_postive = [](HostTensorND& dest) { auto gen_postive = [](HostTensorND& dest) {
HostTensorGenerator<dtype::Float32, RandomDistribution::UNIFORM> mask_generator{ HostTensorGenerator<dtype::Float32, RandomDistribution::UNIFORM> mask_generator{
2.f, 4.f}; 2.f, 4.f};
dest = *mask_generator(dest.shape(), dest.comp_node()); dest = *mask_generator(dest.shape(), dest.comp_node());
}; };
};
TEST(TestGoptBasicArithInplace, LogExpExpand) { TEST(TestGoptBasicArithInplace, LogExpExpand) {
// test log(exp(a) * (exp(b) / (exp(c) * d**2))) -> a + b - c - log(d**2) // test log(exp(a) * (exp(b) / (exp(c) * d**2))) -> a + b - c - log(d**2)
......
...@@ -290,7 +290,7 @@ void run_mlir_mode(CompNode cn) { ...@@ -290,7 +290,7 @@ void run_mlir_mode(CompNode cn) {
#if MGB_JIT_HALIDE #if MGB_JIT_HALIDE
template <typename tag> template <typename tag>
class TestJITHalideCodeGenCuda : public ::testing::Test {}; class TestJITHalideCodeGenCuda : public ::testing::Test {};
TYPED_TEST_CASE(TestJITHalideCodeGenCuda, test_types); TYPED_TEST_SUITE(TestJITHalideCodeGenCuda, test_types);
TYPED_TEST(TestJITHalideCodeGenCuda, run) { TYPED_TEST(TestJITHalideCodeGenCuda, run) {
REQUIRE_GPU(1); REQUIRE_GPU(1);
run<TypeParam>(Backend::HALIDE, CompNode::load("gpu0")); run<TypeParam>(Backend::HALIDE, CompNode::load("gpu0"));
...@@ -301,7 +301,7 @@ TYPED_TEST(TestJITHalideCodeGenCuda, run) { ...@@ -301,7 +301,7 @@ TYPED_TEST(TestJITHalideCodeGenCuda, run) {
template <typename tag> template <typename tag>
class TestJITNvrtcCodeGen : public ::testing::Test {}; class TestJITNvrtcCodeGen : public ::testing::Test {};
TYPED_TEST_CASE(TestJITNvrtcCodeGen, test_types); TYPED_TEST_SUITE(TestJITNvrtcCodeGen, test_types);
TYPED_TEST(TestJITNvrtcCodeGen, run) { TYPED_TEST(TestJITNvrtcCodeGen, run) {
REQUIRE_GPU(1); REQUIRE_GPU(1);
run<TypeParam>(Backend::NVRTC, CompNode::load("gpu0")); run<TypeParam>(Backend::NVRTC, CompNode::load("gpu0"));
...@@ -344,7 +344,7 @@ FOREACH_UNARY_MODE(def_tag) ...@@ -344,7 +344,7 @@ FOREACH_UNARY_MODE(def_tag)
#define t(n) n, #define t(n) n,
using mlir_elemwise_unary_types = ::testing::Types<FOREACH_UNARY_MODE(t) ABS>; using mlir_elemwise_unary_types = ::testing::Types<FOREACH_UNARY_MODE(t) ABS>;
#undef t #undef t
TYPED_TEST_CASE(TestJITMlirUnaryElemwise, mlir_elemwise_unary_types); TYPED_TEST_SUITE(TestJITMlirUnaryElemwise, mlir_elemwise_unary_types);
#define SKIP_MODE(_mode) \ #define SKIP_MODE(_mode) \
if (TypeParam::mode == opr::Elemwise::Mode::_mode) { \ if (TypeParam::mode == opr::Elemwise::Mode::_mode) { \
...@@ -390,7 +390,7 @@ FOREACH_BINARY_MODE(def_tag) ...@@ -390,7 +390,7 @@ FOREACH_BINARY_MODE(def_tag)
#define t(n) n, #define t(n) n,
using mlir_elemwise_binary_types = ::testing::Types<FOREACH_BINARY_MODE(t) ADD>; using mlir_elemwise_binary_types = ::testing::Types<FOREACH_BINARY_MODE(t) ADD>;
#undef t #undef t
TYPED_TEST_CASE(TestJITMlirBinaryElemwise, mlir_elemwise_binary_types); TYPED_TEST_SUITE(TestJITMlirBinaryElemwise, mlir_elemwise_binary_types);
TYPED_TEST(TestJITMlirBinaryElemwise, run) { TYPED_TEST(TestJITMlirBinaryElemwise, run) {
auto cn = CompNode::load("cpu0"); auto cn = CompNode::load("cpu0");
run_mlir_mode<TypeParam, 2>(cn); run_mlir_mode<TypeParam, 2>(cn);
...@@ -422,7 +422,7 @@ FOREACH_TERNARY_MODE(def_tag) ...@@ -422,7 +422,7 @@ FOREACH_TERNARY_MODE(def_tag)
using mlir_elemwise_ternary_types = using mlir_elemwise_ternary_types =
::testing::Types<FOREACH_TERNARY_MODE(t) COND_LEQ_MOV>; ::testing::Types<FOREACH_TERNARY_MODE(t) COND_LEQ_MOV>;
#undef t #undef t
TYPED_TEST_CASE(TestJITMlirTernaryElemwise, mlir_elemwise_ternary_types); TYPED_TEST_SUITE(TestJITMlirTernaryElemwise, mlir_elemwise_ternary_types);
TYPED_TEST(TestJITMlirTernaryElemwise, run) { TYPED_TEST(TestJITMlirTernaryElemwise, run) {
auto cn = CompNode::load("cpu0"); auto cn = CompNode::load("cpu0");
run_mlir_mode<TypeParam, 3>(cn); run_mlir_mode<TypeParam, 3>(cn);
......
...@@ -1147,7 +1147,7 @@ TEST(TestJITFusionHalide, SameGradOpr) { ...@@ -1147,7 +1147,7 @@ TEST(TestJITFusionHalide, SameGradOpr) {
template <typename tag> template <typename tag>
class TestJITHalideFusionCuda : public ::testing::Test {}; class TestJITHalideFusionCuda : public ::testing::Test {};
TYPED_TEST_CASE(TestJITHalideFusionCuda, test_types); TYPED_TEST_SUITE(TestJITHalideFusionCuda, test_types);
TYPED_TEST(TestJITHalideFusionCuda, run) { TYPED_TEST(TestJITHalideFusionCuda, run) {
set_backend(Backend::NONE); set_backend(Backend::NONE);
...@@ -1160,7 +1160,7 @@ TYPED_TEST(TestJITHalideFusionCuda, run) { ...@@ -1160,7 +1160,7 @@ TYPED_TEST(TestJITHalideFusionCuda, run) {
template <typename tag> template <typename tag>
class TestJITNvrtcFusion : public ::testing::Test {}; class TestJITNvrtcFusion : public ::testing::Test {};
TYPED_TEST_CASE(TestJITNvrtcFusion, test_types); TYPED_TEST_SUITE(TestJITNvrtcFusion, test_types);
TYPED_TEST(TestJITNvrtcFusion, run) { TYPED_TEST(TestJITNvrtcFusion, run) {
set_backend(Backend::NONE); set_backend(Backend::NONE);
......
...@@ -812,7 +812,7 @@ typedef ::testing::Types< ...@@ -812,7 +812,7 @@ typedef ::testing::Types<
void // extra void to consume last comma void // extra void to consume last comma
> >
UnaryTraitTypes; UnaryTraitTypes;
TYPED_TEST_CASE(TestOprBasicArithUnaryElemwise, UnaryTraitTypes); TYPED_TEST_SUITE(TestOprBasicArithUnaryElemwise, UnaryTraitTypes);
typedef ::testing::Types< typedef ::testing::Types<
#define DEF_TRAIT(_mode, _expr) _mode, #define DEF_TRAIT(_mode, _expr) _mode,
...@@ -821,7 +821,7 @@ typedef ::testing::Types< ...@@ -821,7 +821,7 @@ typedef ::testing::Types<
void // extra void to consume last comma void // extra void to consume last comma
> >
BinaryTraitTypes; BinaryTraitTypes;
TYPED_TEST_CASE(TestOprBasicArithBinaryElemwise, BinaryTraitTypes); TYPED_TEST_SUITE(TestOprBasicArithBinaryElemwise, BinaryTraitTypes);
typedef ::testing::Types< typedef ::testing::Types<
#define DEF_TRAIT(_mode, _expr) _mode, #define DEF_TRAIT(_mode, _expr) _mode,
...@@ -830,7 +830,7 @@ typedef ::testing::Types< ...@@ -830,7 +830,7 @@ typedef ::testing::Types<
void // extra void to consume last comma void // extra void to consume last comma
> >
TernaryTraitTypes; TernaryTraitTypes;
TYPED_TEST_CASE(TestOprBasicArithTernaryElemwise, TernaryTraitTypes); TYPED_TEST_SUITE(TestOprBasicArithTernaryElemwise, TernaryTraitTypes);
} // anonymous namespace } // anonymous namespace
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册