add feature to convert FP32(float) to FP16(half)

* check compiler support
  * check HW support before executing
  * add test doing round trip conversion from / to FP32
  * treat array correctly if size is not multiple of 4
  * add declaration to prevent warning
  * make it possible to enable fp16 on 32bit ARM
  * let the conversion possible on non-supported HW, too.
  * add test using both HW and SW implementation
This commit is contained in:
Tomoaki Teshima
2016-05-21 21:31:33 +09:00
parent c3d1f94ee6
commit b2ad7cd9c0
8 changed files with 459 additions and 5 deletions

View File

@@ -3064,6 +3064,9 @@ void printVersionInfo(bool useStdOut)
#if CV_NEON
if (checkHardwareSupport(CV_CPU_NEON)) cpu_features += " neon";
#endif
#if CV_FP16
if (checkHardwareSupport(CV_CPU_FP16)) cpu_features += " fp16";
#endif
cpu_features.erase(0, 1); // erase initial space