1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-30 07:43:03 +04:00

core: Rename cv::float16_t to cv::hfloat (#25217)

* rename cv::float16_t to cv::fp16_t

* add typedef fp16_t float16_t

* remove zero(), bits() from fp16_t class

* fp16_t -> hfloat

* remove cv::float16_t::fromBits; add hfloatFromBits

* undo changes in conv_winograd_f63.simd.hpp and conv_block.simd.hpp

* undo some changes in dnn
This commit is contained in:
Yuantao Feng
2024-03-22 04:44:19 +08:00
committed by GitHub
parent 3aefd4862c
commit 3afe8ddaf8
31 changed files with 156 additions and 166 deletions
+3 -3
View File
@@ -1557,14 +1557,14 @@ template<typename R> struct TheTest
AlignedData<v_float32> data_f32; data_f32.a.clear();
AlignedData<v_uint16> out;
R r1 = vx_load_expand((const cv::float16_t*)data.a.d);
R r1 = vx_load_expand((const cv::hfloat*)data.a.d);
R r2(r1);
EXPECT_EQ(1.0f, v_get0(r1));
v_store(data_f32.a.d, r2);
EXPECT_EQ(-2.0f, data_f32.a.d[VTraits<R>::vlanes() - 1]);
out.a.clear();
v_pack_store((cv::float16_t*)out.a.d, r2);
v_pack_store((cv::hfloat*)out.a.d, r2);
for (int i = 0; i < VTraits<R>::vlanes(); ++i)
{
EXPECT_EQ(data.a[i], out.a[i]) << "i=" << i;
@@ -1588,7 +1588,7 @@ template<typename R> struct TheTest
// check some initialization methods
R r1 = data.u;
R r2 = vx_load_expand((const float16_t*)data.a.d);
R r2 = vx_load_expand((const hfloat*)data.a.d);
R r3(r2);
EXPECT_EQ(data.u[0], v_get0(r1));
EXPECT_EQ(data.a[0], v_get0(r2));