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

Support fp16 for RISC-V.

This commit is contained in:
Liutong HAN
2024-08-02 07:42:15 +00:00
parent f24e80297a
commit f3cc5a9e1e
10 changed files with 585 additions and 117 deletions
+7
View File
@@ -434,6 +434,7 @@ struct HWFeatures
g_hwFeatureNames[CPU_AVX512_ICL] = "AVX512-ICL";
g_hwFeatureNames[CPU_RVV] = "RVV";
g_hwFeatureNames[CPU_RVV_ZVFH] = "RVV_ZVFH";
g_hwFeatureNames[CPU_LSX] = "LSX";
g_hwFeatureNames[CPU_LASX] = "LASX";
@@ -712,6 +713,12 @@ struct HWFeatures
#if defined __riscv && defined __riscv_vector
have[CV_CPU_RVV] = true;
#if (defined __riscv_zvfh && __riscv_zvfh) || (defined __riscv_zvfhmin && __riscv_zvfhmin)
have[CV_CPU_FP16] = true;
#endif
#if defined __riscv_zvfh && __riscv_zvfh
have[CV_CPU_RVV_ZVFH] = true;
#endif
#endif
#if defined __loongarch64 && defined __linux__