2 ms·
> both are better and faster than C++ "Better" is a matter of opinion, so I'll stay away from that claim. But if we include AMD's HCC or Microsoft's C++ AMP p
by dragontamer 9y ago
> both are better and faster than C++
"Better" is a matter of opinion, so I'll stay away from that claim.
But if we include AMD's HCC or Microsoft's C++ AMP projects (which turn C++ code and directly run it on the GPU), then I think you are mistaken about "faster".
http://rocm-documentation.readthedocs.io/en/latest/ROCm_API_References/HCC-API.html#hcc-api http://rocm-documentation.readthedocs.io/en/latest/ROCm_API_...
https://msdn.microsoft.com/en-us/library/hh265136.aspx https://msdn.microsoft.com/en-us/library/hh265136.aspx
Full GPU acceleration from C++ code. The SIMT model is quite powerful for allowing massive parallelism. And the "tiling" feature indicates that C++ is powerful enough to represent the various memory structures inside of the GPU. (LDS vs Global memory)
------------
Transparency of the memory model is incredibly important. GPUs only get their massive TFlop numbers if they are calculating from their LDS cache / Shared Memory locations. Even the biggest, beefiest GPUs with HBM2 only have ~480GB/s of main-memory performance, which is insufficient to reach 10TFlops. (Remember: a single float is 4-bytes. So 480GB/s bandwidth only gives 120GFlops at best)
Careful programming of memory, and transparency of the "LDS" cache and awareness of the limited register space of the GPU is needed to even