10#include <gmock/gmock.h>
11#include <gtest/gtest.h>
28 for (
int i = 0; i < 3; ++i) {
29 if (
fabsf(arg[i] - expected[i]) >
eps) {
30 *result_listener <<
"component " << i <<
" should be " << expected[i];
43 for (
int row = 0; row < 3; ++row) {
44 for (
int col = 0; col < 3; ++col) {
45 if (
fabsf(arg[row][col] - expected[row][col]) >
eps) {
46 *result_listener <<
"component (" << row <<
", " << col <<
") should be "
47 << expected[row][col];
58 os <<
"(" << m.
x <<
", " << m.
y <<
", " << m.
z <<
")";
77 EXPECT_THAT(identity, IsNearFloat3x3(identity, 1e-6f));
78 EXPECT_THAT(zero, Not(IsNearFloat3x3(identity, 1e-6f)));
148 IsNearFloat3(
make_float3(1.94f, 11.54f, 21.14f), 1e-6f));
225 make_float3(13.57142857f, 10.23809524f, -6.66666667f),
226 make_float3(-2.14285714f, -5.47619048f, 3.33333333f)),
268 EXPECT_THAT(
R.x, IsNearFloat3(tfm.
x, 1e-6f));
269 EXPECT_THAT(
R.y, IsNearFloat3(tfm.
y, 1e-6f));
270 EXPECT_THAT(
R.z, IsNearFloat3(tfm.
z, 1e-6f));
300 EXPECT_THAT(unpacked,
#define CCL_NAMESPACE_END
std::ostream & operator<<(std::ostream &os, DeviceKernel kernel)
TEST_F(FFmpegTest, libaom_av1_AV_PIX_FMT_YUV420P)
b[1] b &&[1] b &&[1] b &&[1] b &&[1] b[3] b &&[1] b[3] float determinant(MatBase< C, R >) RET
void quaternion_to_rotation(float w, float x, float y, float z, float4 &rotation)
float2x2 adjoint(float2x2 mat)
#define EXPECT_NEAR(result, expect, threshold)
ccl_device_inline float3x3 transposed(const float3x3 m)
ccl_device_inline float3x3 inverted(const float3x3 m)
ccl_device_inline float3x3 quaternion_to_scaled_rotation(const Quaternion q)
ccl_device_inline float3x3 float3x3_scale(const float3 s)
ccl_device_inline float3x3 identity_float3x3()
ccl_device_inline float3x3 zero_float3x3()
ccl_device_inline float3x3 make_float3x3(const float3 x, const float3 y, const float3 z)
ccl_device_inline Quaternion make_quaternion(const float w, const float x, const float y, const float z)
MATCHER_P2(IsNearFloat3, expected, eps, "")