Commit 04305c68 authored by Steinar Midtskogen's avatar Steinar Midtskogen
Browse files

Add unit tests for v64 intrinsics

Enable by running: test_libaom --gtest_filter=*TestIntrinsics*

Change-Id: If2553025820db469a0ecfe3aac1aa984324b65d3
parent 822513c8
......@@ -15,6 +15,8 @@
#include "test/acm_random.h"
#include "test/register_state_check.h"
#include "aom_dsp/aom_simd.h"
#undef SIMD_INLINE
#define SIMD_INLINE static // Don't enforce inlining
#include "aom_dsp/simd/v64_intrinsics_c.h"
// Machine tuned code goes into this file. This file is included from
......@@ -315,6 +317,18 @@ const mapping m[] = { MAP(v64_sad_u8),
MAP(v64_hadd_u8),
MAP(v64_hadd_s16),
MAP(v64_dotp_s16),
MAP(v64_dotp_su8),
MAP(v64_u64),
MAP(v64_low_u32),
MAP(v64_high_u32),
MAP(v64_low_s32),
MAP(v64_high_s32),
MAP(v64_dup_8),
MAP(v64_dup_16),
MAP(v64_dup_32),
MAP(v64_from_32),
MAP(v64_zero),
MAP(v64_from_16),
{ NULL, NULL, NULL } };
#undef MAP
......@@ -441,6 +455,8 @@ int CompareSimd2Args(fptr store, fptr load1, fptr load2, fptr simd, void *d,
return memcmp(ref_d, d, sizeof(CRet));
}
} // namespace
template <typename CRet, typename CArg>
void TestSimd1Arg(uint32_t iterations, uint32_t mask, uint32_t maskwidth,
const char *name) {
......@@ -474,21 +490,29 @@ void TestSimd1Arg(uint32_t iterations, uint32_t mask, uint32_t maskwidth,
reinterpret_cast<fptr>(v64_load_aligned), simd, d,
reinterpret_cast<fptr>(c_v64_store_aligned),
reinterpret_cast<fptr>(c_v64_load_aligned), ref_simd, ref_d, s);
} else if (typeid(CRet) == typeid(c_v64) &&
typeid(CArg) == typeid(uint32_t)) {
// V64_U32
error = CompareSimd1Arg<v64, uint32_t, CRet, CArg>(
reinterpret_cast<fptr>(v64_store_aligned),
reinterpret_cast<fptr>(u32_load_aligned), simd, d,
reinterpret_cast<fptr>(c_v64_store_aligned),
reinterpret_cast<fptr>(c_u32_load_aligned), ref_simd, ref_d, s);
} else if (typeid(CRet) == typeid(uint64_t) &&
typeid(CArg) == typeid(c_v64)) {
// U64_V64
error = CompareSimd1Arg<uint64_t, v64, CRet, CArg>(
reinterpret_cast<fptr>(u64_store_aligned),
reinterpret_cast<fptr>(v64_load_aligned), simd, d,
reinterpret_cast<fptr>(c_v64_store_aligned),
reinterpret_cast<fptr>(c_u64_store_aligned),
reinterpret_cast<fptr>(c_v64_load_aligned), ref_simd, ref_d, s);
} else if (typeid(CRet) == typeid(int64_t) &&
} else if (typeid(CRet) == typeid(uint32_t) &&
typeid(CArg) == typeid(c_v64)) {
// S64_V64
error = CompareSimd1Arg<int64_t, v64, CRet, CArg>(
reinterpret_cast<fptr>(u64_store_aligned),
// U32_V64
error = CompareSimd1Arg<uint32_t, v64, CRet, CArg>(
reinterpret_cast<fptr>(u32_store_aligned),
reinterpret_cast<fptr>(v64_load_aligned), simd, d,
reinterpret_cast<fptr>(c_v64_store_aligned),
reinterpret_cast<fptr>(c_u32_store_aligned),
reinterpret_cast<fptr>(c_v64_load_aligned), ref_simd, ref_d, s);
} else {
FAIL() << "Internal error: Unknown intrinsic function "
......@@ -543,6 +567,18 @@ void TestSimd2Args(uint32_t iterations, uint32_t mask, uint32_t maskwidth,
reinterpret_cast<fptr>(c_v64_load_aligned),
reinterpret_cast<fptr>(c_v64_load_aligned),
reinterpret_cast<fptr>(ref_simd), ref_d, s1, s2);
} else if (typeid(CRet) == typeid(c_v64) &&
typeid(CArg1) == typeid(uint32_t) &&
typeid(CArg2) == typeid(uint32_t)) {
// V64_U32U32
error = CompareSimd2Args<v64, uint32_t, uint32_t, CRet, CArg1, CArg2>(
reinterpret_cast<fptr>(v64_store_aligned),
reinterpret_cast<fptr>(u32_load_aligned),
reinterpret_cast<fptr>(u32_load_aligned), simd, d,
reinterpret_cast<fptr>(c_v64_store_aligned),
reinterpret_cast<fptr>(c_u32_load_aligned),
reinterpret_cast<fptr>(c_u32_load_aligned),
reinterpret_cast<fptr>(ref_simd), ref_d, s1, s2);
} else if (typeid(CRet) == typeid(uint32_t) &&
typeid(CArg1) == typeid(c_v64) &&
typeid(CArg2) == typeid(c_v64)) {
......@@ -595,12 +631,16 @@ void TestSimd2Args(uint32_t iterations, uint32_t mask, uint32_t maskwidth,
}
// Instantiations to make the functions callable from another files
template void TestSimd1Arg<c_v64, uint32_t>(uint32_t, uint32_t, uint32_t,
const char *);
template void TestSimd1Arg<c_v64, c_v64>(uint32_t, uint32_t, uint32_t,
const char *);
template void TestSimd1Arg<int64_t, c_v64>(uint32_t, uint32_t, uint32_t,
const char *);
template void TestSimd1Arg<uint32_t, c_v64>(uint32_t, uint32_t, uint32_t,
const char *);
template void TestSimd1Arg<uint64_t, c_v64>(uint32_t, uint32_t, uint32_t,
const char *);
template void TestSimd2Args<c_v64, uint32_t, uint32_t>(uint32_t, uint32_t,
uint32_t, const char *);
template void TestSimd2Args<c_v64, c_v64, c_v64>(uint32_t, uint32_t, uint32_t,
const char *);
template void TestSimd2Args<c_v64, c_v64, uint32_t>(uint32_t, uint32_t,
......@@ -610,5 +650,4 @@ template void TestSimd2Args<int64_t, c_v64, c_v64>(uint32_t, uint32_t, uint32_t,
template void TestSimd2Args<uint32_t, c_v64, c_v64>(uint32_t, uint32_t,
uint32_t, const char *);
} // namespace
} // namespace SIMD_NAMESPACE
/*
* Copyright (c) 2016, Alliance for Open Media. All rights reserved
*
* This source code is subject to the terms of the BSD 2 Clause License and
* the Alliance for Open Media Patent License 1.0. If the BSD 2 Clause License
* was not distributed with this source code in the LICENSE file, you can
* obtain it at www.aomedia.org/license/software. If the Alliance for Open
* Media Patent License 1.0 was not distributed with this source code in the
* PATENTS file, you can obtain it at www.aomedia.org/license/patent.
*/
#define SIMD_CHECK 1
#include "third_party/googletest/src/include/gtest/gtest.h"
#include "test/clear_system_state.h"
#include "test/register_state_check.h"
#include "aom_dsp/aom_simd_inline.h"
#include "aom_dsp/simd/v64_intrinsics_c.h"
namespace SIMD_NAMESPACE {
template <typename param_signature>
class TestIntrinsic : public ::testing::TestWithParam<param_signature> {
public:
virtual ~TestIntrinsic() {}
virtual void SetUp() {
mask = std::tr1::get<0>(this->GetParam());
maskwidth = std::tr1::get<1>(this->GetParam());
name = std::tr1::get<2>(this->GetParam());
}
virtual void TearDown() { libaom_test::ClearSystemState(); }
protected:
uint32_t mask, maskwidth;
const char *name;
};
// Create one typedef for each function signature
#define TYPEDEF_SIMD(name) \
typedef TestIntrinsic<std::tr1::tuple<uint32_t, uint32_t, const char *> > \
ARCH_POSTFIX(name)
TYPEDEF_SIMD(V64_U32);
TYPEDEF_SIMD(V64_V64);
TYPEDEF_SIMD(U32_V64);
TYPEDEF_SIMD(U64_V64);
TYPEDEF_SIMD(V64_U32U32);
TYPEDEF_SIMD(V64_V64V64);
TYPEDEF_SIMD(S64_V64V64);
TYPEDEF_SIMD(V64_V64U32);
TYPEDEF_SIMD(U32_V64V64);
// Google Test allows up to 50 tests per case, so split the largest
typedef ARCH_POSTFIX(V64_V64) ARCH_POSTFIX(V64_V64_Part2);
typedef ARCH_POSTFIX(V64_V64V64) ARCH_POSTFIX(V64_V64V64_Part2);
// These functions are machine tuned located elsewhere
template <typename c_ret, typename c_arg>
void TestSimd1Arg(uint32_t iterations, uint32_t mask, uint32_t maskwidth,
const char *name);
template <typename c_ret, typename c_arg1, typename c_arg2>
void TestSimd2Args(uint32_t iterations, uint32_t mask, uint32_t maskwidth,
const char *name);
const int iterations = 65536;
// Add a macro layer since TEST_P will quote the name so we need to
// expand it first with the prefix.
#define MY_TEST_P(name, test) TEST_P(name, test)
MY_TEST_P(ARCH_POSTFIX(V64_U32), TestIntrinsics) {
TestSimd1Arg<c_v64, uint32_t>(iterations, mask, maskwidth, name);
}
MY_TEST_P(ARCH_POSTFIX(V64_V64), TestIntrinsics) {
TestSimd1Arg<c_v64, c_v64>(iterations, mask, maskwidth, name);
}
MY_TEST_P(ARCH_POSTFIX(U64_V64), TestIntrinsics) {
TestSimd1Arg<uint64_t, c_v64>(iterations, mask, maskwidth, name);
}
MY_TEST_P(ARCH_POSTFIX(U32_V64), TestIntrinsics) {
TestSimd1Arg<uint32_t, c_v64>(iterations, mask, maskwidth, name);
}
MY_TEST_P(ARCH_POSTFIX(V64_U32U32), TestIntrinsics) {
TestSimd2Args<c_v64, uint32_t, uint32_t>(iterations, mask, maskwidth, name);
}
MY_TEST_P(ARCH_POSTFIX(V64_V64V64), TestIntrinsics) {
TestSimd2Args<c_v64, c_v64, c_v64>(iterations, mask, maskwidth, name);
}
MY_TEST_P(ARCH_POSTFIX(S64_V64V64), TestIntrinsics) {
TestSimd2Args<int64_t, c_v64, c_v64>(iterations, mask, maskwidth, name);
}
MY_TEST_P(ARCH_POSTFIX(U32_V64V64), TestIntrinsics) {
TestSimd2Args<uint32_t, c_v64, c_v64>(iterations, mask, maskwidth, name);
}
MY_TEST_P(ARCH_POSTFIX(V64_V64U32), TestIntrinsics) {
TestSimd2Args<c_v64, c_v64, uint32_t>(iterations, mask, maskwidth, name);
}
// Google Test allows up to 50 tests per case, so split the largest
MY_TEST_P(ARCH_POSTFIX(V64_V64_Part2), TestIntrinsics) {
TestSimd1Arg<c_v64, c_v64>(iterations, mask, maskwidth, name);
}
MY_TEST_P(ARCH_POSTFIX(V64_V64V64_Part2), TestIntrinsics) {
TestSimd2Args<c_v64, c_v64, c_v64>(iterations, mask, maskwidth, name);
}
// Add a macro layer since INSTANTIATE_TEST_CASE_P will quote the name
// so we need to expand it first with the prefix
#define INSTANTIATE(name, type, ...) \
INSTANTIATE_TEST_CASE_P(name, type, ::testing::Values(__VA_ARGS__))
#define SIMD_TUPLE(name, mask, maskwidth) \
std::tr1::make_tuple(mask, maskwidth, #name)
INSTANTIATE(ARCH, ARCH_POSTFIX(U32_V64V64),
(SIMD_TUPLE(v64_sad_u8, 0U, 0U), SIMD_TUPLE(v64_ssd_u8, 0U, 0U)));
INSTANTIATE(
ARCH, ARCH_POSTFIX(V64_V64V64), SIMD_TUPLE(v64_add_8, 0U, 0U),
SIMD_TUPLE(v64_add_16, 0U, 0U), SIMD_TUPLE(v64_sadd_s16, 0U, 0U),
SIMD_TUPLE(v64_add_32, 0U, 0U), SIMD_TUPLE(v64_sub_8, 0U, 0U),
SIMD_TUPLE(v64_ssub_u8, 0U, 0U), SIMD_TUPLE(v64_ssub_s8, 0U, 0U),
SIMD_TUPLE(v64_sub_16, 0U, 0U), SIMD_TUPLE(v64_ssub_s16, 0U, 0U),
SIMD_TUPLE(v64_sub_32, 0U, 0U), SIMD_TUPLE(v64_ziplo_8, 0U, 0U),
SIMD_TUPLE(v64_ziphi_8, 0U, 0U), SIMD_TUPLE(v64_ziplo_16, 0U, 0U),
SIMD_TUPLE(v64_ziphi_16, 0U, 0U), SIMD_TUPLE(v64_ziplo_32, 0U, 0U),
SIMD_TUPLE(v64_ziphi_32, 0U, 0U), SIMD_TUPLE(v64_pack_s32_s16, 0U, 0U),
SIMD_TUPLE(v64_pack_s16_u8, 0U, 0U), SIMD_TUPLE(v64_pack_s16_s8, 0U, 0U),
SIMD_TUPLE(v64_unziphi_8, 0U, 0U), SIMD_TUPLE(v64_unziplo_8, 0U, 0U),
SIMD_TUPLE(v64_unziphi_16, 0U, 0U), SIMD_TUPLE(v64_unziplo_16, 0U, 0U),
SIMD_TUPLE(v64_or, 0U, 0U), SIMD_TUPLE(v64_xor, 0U, 0U),
SIMD_TUPLE(v64_and, 0U, 0U), SIMD_TUPLE(v64_andn, 0U, 0U),
SIMD_TUPLE(v64_mullo_s16, 0U, 0U), SIMD_TUPLE(v64_mulhi_s16, 0U, 0U),
SIMD_TUPLE(v64_mullo_s32, 0U, 0U), SIMD_TUPLE(v64_madd_s16, 0U, 0U),
SIMD_TUPLE(v64_madd_us8, 0U, 0U), SIMD_TUPLE(v64_avg_u8, 0U, 0U),
SIMD_TUPLE(v64_rdavg_u8, 0U, 0U), SIMD_TUPLE(v64_avg_u16, 0U, 0U),
SIMD_TUPLE(v64_min_u8, 0U, 0U), SIMD_TUPLE(v64_max_u8, 0U, 0U),
SIMD_TUPLE(v64_min_s8, 0U, 0U), SIMD_TUPLE(v64_max_s8, 0U, 0U),
SIMD_TUPLE(v64_min_s16, 0U, 0U), SIMD_TUPLE(v64_max_s16, 0U, 0U),
SIMD_TUPLE(v64_cmpgt_s8, 0U, 0U), SIMD_TUPLE(v64_cmplt_s8, 0U, 0U),
SIMD_TUPLE(v64_cmpeq_8, 0U, 0U), SIMD_TUPLE(v64_cmpgt_s16, 0U, 0U),
SIMD_TUPLE(v64_cmplt_s16, 0U, 0U), SIMD_TUPLE(v64_cmpeq_16, 0U, 0U),
SIMD_TUPLE(v64_shuffle_8, 7U, 8U));
INSTANTIATE(
ARCH, ARCH_POSTFIX(V64_V64V64_Part2), SIMD_TUPLE(imm_v64_align<1>, 0U, 0U),
SIMD_TUPLE(imm_v64_align<2>, 0U, 0U), SIMD_TUPLE(imm_v64_align<3>, 0U, 0U),
SIMD_TUPLE(imm_v64_align<4>, 0U, 0U), SIMD_TUPLE(imm_v64_align<5>, 0U, 0U),
SIMD_TUPLE(imm_v64_align<6>, 0U, 0U), SIMD_TUPLE(imm_v64_align<7>, 0U, 0U));
INSTANTIATE(ARCH, ARCH_POSTFIX(V64_V64), SIMD_TUPLE(v64_abs_s16, 0U, 0U),
SIMD_TUPLE(v64_unpacklo_u8_s16, 0U, 0U),
SIMD_TUPLE(v64_unpackhi_u8_s16, 0U, 0U),
SIMD_TUPLE(v64_unpacklo_u16_s32, 0U, 0U),
SIMD_TUPLE(v64_unpacklo_s16_s32, 0U, 0U),
SIMD_TUPLE(v64_unpackhi_u16_s32, 0U, 0U),
SIMD_TUPLE(v64_unpackhi_s16_s32, 0U, 0U),
SIMD_TUPLE(imm_v64_shr_n_byte<1>, 0U, 0U),
SIMD_TUPLE(imm_v64_shr_n_byte<2>, 0U, 0U),
SIMD_TUPLE(imm_v64_shr_n_byte<3>, 0U, 0U),
SIMD_TUPLE(imm_v64_shr_n_byte<4>, 0U, 0U),
SIMD_TUPLE(imm_v64_shr_n_byte<5>, 0U, 0U),
SIMD_TUPLE(imm_v64_shr_n_byte<6>, 0U, 0U),
SIMD_TUPLE(imm_v64_shr_n_byte<7>, 0U, 0U),
SIMD_TUPLE(imm_v64_shl_n_byte<1>, 0U, 0U),
SIMD_TUPLE(imm_v64_shl_n_byte<2>, 0U, 0U),
SIMD_TUPLE(imm_v64_shl_n_byte<3>, 0U, 0U),
SIMD_TUPLE(imm_v64_shl_n_byte<4>, 0U, 0U),
SIMD_TUPLE(imm_v64_shl_n_byte<5>, 0U, 0U),
SIMD_TUPLE(imm_v64_shl_n_byte<6>, 0U, 0U),
SIMD_TUPLE(imm_v64_shl_n_byte<7>, 0U, 0U),
SIMD_TUPLE(imm_v64_shl_n_8<1>, 0U, 0U),
SIMD_TUPLE(imm_v64_shl_n_8<2>, 0U, 0U),
SIMD_TUPLE(imm_v64_shl_n_8<3>, 0U, 0U),
SIMD_TUPLE(imm_v64_shl_n_8<4>, 0U, 0U),
SIMD_TUPLE(imm_v64_shl_n_8<5>, 0U, 0U),
SIMD_TUPLE(imm_v64_shl_n_8<6>, 0U, 0U),
SIMD_TUPLE(imm_v64_shl_n_8<7>, 0U, 0U),
SIMD_TUPLE(imm_v64_shr_n_u8<1>, 0U, 0U),
SIMD_TUPLE(imm_v64_shr_n_u8<2>, 0U, 0U),
SIMD_TUPLE(imm_v64_shr_n_u8<3>, 0U, 0U),
SIMD_TUPLE(imm_v64_shr_n_u8<4>, 0U, 0U),
SIMD_TUPLE(imm_v64_shr_n_u8<5>, 0U, 0U),
SIMD_TUPLE(imm_v64_shr_n_u8<6>, 0U, 0U),
SIMD_TUPLE(imm_v64_shr_n_u8<7>, 0U, 0U),
SIMD_TUPLE(imm_v64_shr_n_s8<1>, 0U, 0U),
SIMD_TUPLE(imm_v64_shr_n_s8<2>, 0U, 0U),
SIMD_TUPLE(imm_v64_shr_n_s8<3>, 0U, 0U),
SIMD_TUPLE(imm_v64_shr_n_s8<4>, 0U, 0U),
SIMD_TUPLE(imm_v64_shr_n_s8<5>, 0U, 0U),
SIMD_TUPLE(imm_v64_shr_n_s8<6>, 0U, 0U),
SIMD_TUPLE(imm_v64_shr_n_s8<7>, 0U, 0U),
SIMD_TUPLE(imm_v64_shl_n_16<1>, 0U, 0U),
SIMD_TUPLE(imm_v64_shl_n_16<2>, 0U, 0U),
SIMD_TUPLE(imm_v64_shl_n_16<4>, 0U, 0U),
SIMD_TUPLE(imm_v64_shl_n_16<6>, 0U, 0U),
SIMD_TUPLE(imm_v64_shl_n_16<8>, 0U, 0U),
SIMD_TUPLE(imm_v64_shl_n_16<10>, 0U, 0U),
SIMD_TUPLE(imm_v64_shl_n_16<12>, 0U, 0U),
SIMD_TUPLE(imm_v64_shl_n_16<14>, 0U, 0U));
INSTANTIATE(ARCH, ARCH_POSTFIX(V64_V64_Part2),
SIMD_TUPLE(imm_v64_shr_n_u16<1>, 0U, 0U),
SIMD_TUPLE(imm_v64_shr_n_u16<2>, 0U, 0U),
SIMD_TUPLE(imm_v64_shr_n_u16<4>, 0U, 0U),
SIMD_TUPLE(imm_v64_shr_n_u16<6>, 0U, 0U),
SIMD_TUPLE(imm_v64_shr_n_u16<8>, 0U, 0U),
SIMD_TUPLE(imm_v64_shr_n_u16<10>, 0U, 0U),
SIMD_TUPLE(imm_v64_shr_n_u16<12>, 0U, 0U),
SIMD_TUPLE(imm_v64_shr_n_u16<14>, 0U, 0U),
SIMD_TUPLE(imm_v64_shr_n_s16<1>, 0U, 0U),
SIMD_TUPLE(imm_v64_shr_n_s16<2>, 0U, 0U),
SIMD_TUPLE(imm_v64_shr_n_s16<4>, 0U, 0U),
SIMD_TUPLE(imm_v64_shr_n_s16<6>, 0U, 0U),
SIMD_TUPLE(imm_v64_shr_n_s16<8>, 0U, 0U),
SIMD_TUPLE(imm_v64_shr_n_s16<10>, 0U, 0U),
SIMD_TUPLE(imm_v64_shr_n_s16<12>, 0U, 0U),
SIMD_TUPLE(imm_v64_shr_n_s16<14>, 0U, 0U),
SIMD_TUPLE(imm_v64_shl_n_32<1>, 0U, 0U),
SIMD_TUPLE(imm_v64_shl_n_32<4>, 0U, 0U),
SIMD_TUPLE(imm_v64_shl_n_32<8>, 0U, 0U),
SIMD_TUPLE(imm_v64_shl_n_32<12>, 0U, 0U),
SIMD_TUPLE(imm_v64_shl_n_32<16>, 0U, 0U),
SIMD_TUPLE(imm_v64_shl_n_32<20>, 0U, 0U),
SIMD_TUPLE(imm_v64_shl_n_32<24>, 0U, 0U),
SIMD_TUPLE(imm_v64_shl_n_32<28>, 0U, 0U),
SIMD_TUPLE(imm_v64_shr_n_u32<1>, 0U, 0U),
SIMD_TUPLE(imm_v64_shr_n_u32<4>, 0U, 0U),
SIMD_TUPLE(imm_v64_shr_n_u32<8>, 0U, 0U),
SIMD_TUPLE(imm_v64_shr_n_u32<12>, 0U, 0U),
SIMD_TUPLE(imm_v64_shr_n_u32<16>, 0U, 0U),
SIMD_TUPLE(imm_v64_shr_n_u32<20>, 0U, 0U),
SIMD_TUPLE(imm_v64_shr_n_u32<24>, 0U, 0U),
SIMD_TUPLE(imm_v64_shr_n_u32<28>, 0U, 0U),
SIMD_TUPLE(imm_v64_shr_n_s32<1>, 0U, 0U),
SIMD_TUPLE(imm_v64_shr_n_s32<4>, 0U, 0U),
SIMD_TUPLE(imm_v64_shr_n_s32<8>, 0U, 0U),
SIMD_TUPLE(imm_v64_shr_n_s32<12>, 0U, 0U),
SIMD_TUPLE(imm_v64_shr_n_s32<16>, 0U, 0U),
SIMD_TUPLE(imm_v64_shr_n_s32<20>, 0U, 0U),
SIMD_TUPLE(imm_v64_shr_n_s32<24>, 0U, 0U),
SIMD_TUPLE(imm_v64_shr_n_s32<28>, 0U, 0U));
INSTANTIATE(ARCH, ARCH_POSTFIX(V64_V64U32), SIMD_TUPLE(v64_shl_8, 7U, 32U),
SIMD_TUPLE(v64_shr_u8, 7U, 32U), SIMD_TUPLE(v64_shr_s8, 7U, 32U),
SIMD_TUPLE(v64_shl_16, 15U, 32U), SIMD_TUPLE(v64_shr_u16, 15U, 32U),
SIMD_TUPLE(v64_shr_s16, 15U, 32U), SIMD_TUPLE(v64_shl_32, 31U, 32U),
SIMD_TUPLE(v64_shr_u32, 31U, 32U),
SIMD_TUPLE(v64_shr_s32, 31U, 32U));
INSTANTIATE(ARCH, ARCH_POSTFIX(U64_V64), SIMD_TUPLE(v64_hadd_u8, 0U, 0U));
INSTANTIATE(ARCH, ARCH_POSTFIX(U32_V64), SIMD_TUPLE(v64_u64, 0U, 0U),
SIMD_TUPLE(v64_low_u32, 0U, 0U), SIMD_TUPLE(v64_high_u32, 0U, 0U),
SIMD_TUPLE(v64_hadd_s16, 0U, 0U), SIMD_TUPLE(v64_low_s32, 0U, 0U),
SIMD_TUPLE(v64_high_s32, 0U, 0U));
INSTANTIATE(ARCH, ARCH_POSTFIX(S64_V64V64), SIMD_TUPLE(v64_dotp_s16, 0U, 0U),
SIMD_TUPLE(v64_dotp_su8, 0U, 0U));
INSTANTIATE(ARCH, ARCH_POSTFIX(V64_U32), SIMD_TUPLE(v64_dup_8, 0xffU, 32U),
SIMD_TUPLE(v64_dup_16, 0xffffU, 32U),
SIMD_TUPLE(v64_dup_32, 0U, 0U));
INSTANTIATE(ARCH, ARCH_POSTFIX(V64_U32U32), SIMD_TUPLE(v64_from_32, 0U, 0U));
} // namespace SIMD_NAMESPACE
/*
* Copyright (c) 2016, Alliance for Open Media. All rights reserved
*
* This source code is subject to the terms of the BSD 2 Clause License and
* the Alliance for Open Media Patent License 1.0. If the BSD 2 Clause License
* was not distributed with this source code in the LICENSE file, you can
* obtain it at www.aomedia.org/license/software. If the Alliance for Open
* Media Patent License 1.0 was not distributed with this source code in the
* PATENTS file, you can obtain it at www.aomedia.org/license/patent.
*/
#define ARCH NEON
#define ARCH_POSTFIX(name) name##_neon
#define SIMD_NAMESPACE simd_test_neon
#include "./simd_impl.h"
/*
* Copyright (c) 2016, Alliance for Open Media. All rights reserved
*
* This source code is subject to the terms of the BSD 2 Clause License and
* the Alliance for Open Media Patent License 1.0. If the BSD 2 Clause License
* was not distributed with this source code in the LICENSE file, you can
* obtain it at www.aomedia.org/license/software. If the Alliance for Open
* Media Patent License 1.0 was not distributed with this source code in the
* PATENTS file, you can obtain it at www.aomedia.org/license/patent.
*/
#define ARCH SSE2
#define ARCH_POSTFIX(name) name##_sse2
#define SIMD_NAMESPACE simd_test_sse2
#include "./simd_impl.h"
/*
* Copyright (c) 2016, Alliance for Open Media. All rights reserved
*
* This source code is subject to the terms of the BSD 2 Clause License and
* the Alliance for Open Media Patent License 1.0. If the BSD 2 Clause License
* was not distributed with this source code in the LICENSE file, you can
* obtain it at www.aomedia.org/license/software. If the Alliance for Open
* Media Patent License 1.0 was not distributed with this source code in the
* PATENTS file, you can obtain it at www.aomedia.org/license/patent.
*/
#define ARCH SSE4_1
#define ARCH_POSTFIX(name) name##_sse4_1
#define SIMD_NAMESPACE simd_test_sse4_1
#include "./simd_impl.h"
/*
* Copyright (c) 2016, Alliance for Open Media. All rights reserved
*
* This source code is subject to the terms of the BSD 2 Clause License and
* the Alliance for Open Media Patent License 1.0. If the BSD 2 Clause License
* was not distributed with this source code in the LICENSE file, you can
* obtain it at www.aomedia.org/license/software. If the Alliance for Open
* Media Patent License 1.0 was not distributed with this source code in the
* PATENTS file, you can obtain it at www.aomedia.org/license/patent.
*/
#define ARCH SSSE3
#define ARCH_POSTFIX(name) name##_ssse3
#define SIMD_NAMESPACE simd_test_ssse3
#include "./simd_impl.h"
......@@ -126,6 +126,11 @@ LIBAOM_TEST_SRCS-$(HAVE_SSE2) += simd_cmp_sse2.cc
LIBAOM_TEST_SRCS-$(HAVE_SSSE3) += simd_cmp_ssse3.cc
LIBAOM_TEST_SRCS-$(HAVE_SSE4_1) += simd_cmp_sse4.cc
LIBAOM_TEST_SRCS-$(HAVE_NEON) += simd_cmp_neon.cc
LIBAOM_TEST_SRCS-yes += simd_impl.h
LIBAOM_TEST_SRCS-$(HAVE_SSE2) += simd_sse2_test.cc
LIBAOM_TEST_SRCS-$(HAVE_SSSE3) += simd_ssse3_test.cc
LIBAOM_TEST_SRCS-$(HAVE_SSE4_1) += simd_sse4_test.cc
LIBAOM_TEST_SRCS-$(HAVE_NEON) += simd_neon_test.cc
LIBAOM_TEST_SRCS-yes += intrapred_test.cc
#LIBAOM_TEST_SRCS-$(CONFIG_AV1_DECODER) += av1_thread_test.cc
LIBAOM_TEST_SRCS-$(CONFIG_AV1_ENCODER) += dct16x16_test.cc
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment