33. CUDA
unsigned short a = g_indata[y*imgw+x];
float gain;
gain = __half2float(a);
float b = imageData[(y*imgw+x)*3 ];
float g = imageData[(y*imgw+x)*3+1];
float r = imageData[(y*imgw+x)*3+2];
g_odata[(y*imgw+x)*3 ] = clamp(b * gain, 0.0f, 255.0f);
g_odata[(y*imgw+x)*3+1] = clamp(g * gain, 0.0f, 255.0f);
g_odata[(y*imgw+x)*3+2] = clamp(r * gain, 0.0f, 255.0f);
41. 参考文献
1. 半精度浮動小数点数 - Wikipedia
https://ja.wikipedia.org/wiki/半精度浮動小数点数
2. tomoaki0705/sampleFp16: sample code to treat FP16 on ARM
https://github.com/tomoaki0705/sampleFp16
3. ARM Information Center
http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0204ij/CJAGIFIJ.html
4. ARM Information Center
http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0348bj/BABGABJH.html
5. tomoaki0705/sampleFp16Vector: float16bit sample code on x86 and ARM
https://github.com/tomoaki0705/sampleFp16Vector
6. opengl:fpu_vfp [HYPERでんち]
http://dench.flatlib.jp/opengl/fpu_vfp
7. ARMのFPU - AkiWiki
http://tessy.org/wiki/index.php?ARM%A4%CEFPU
8. F16C - Wikipedia, the free encyclopedia
https://en.wikipedia.org/wiki/F16C
9. DirectXMath: F16C and FMA | Games for Windows and the DirectX SDK
https://blogs.msdn.microsoft.com/chuckw/2012/09/11/directxmath-f16c-and-fma/
10. 1071: GPUコンピューティング最新情報 ~ CUDA 7.5とMaxwellアーキテクチャ ~
http://www.slideshare.net/NVIDIAJapan/1071-gpu-cuda-75maxwell
11. 【イベントレポート】次世代GPUアーキテクチャ「Pascal」が明らかに ~HBM2による720GB/secの超広帯域など - PC Watch
http://pc.watch.impress.co.jp/docs/news/event/20160406_751833.html
12. 結城浩の「マヨイドーロ問題」 | CodeIQ
https://codeiq.jp/q/2549
13. 結城浩の「マヨイドーロ問題」解説|CodeIQ MAGAZINE
https://codeiq.jp/magazine/2015/12/35521/