0

在renderscript
http://android-developers.blogspot.com/2011/03/renderscript.html

的博客中 提到了

高级 C++ 特性很难在非 cpu 硬件上运行。

所以我想问一下这一段所指的“高级功能”是什么?

谢谢

4

1 回答 1

0

I'd consider two things hard: virtual functions, and exceptions. These affect program flow in a complex way. GPU's are rather simple in that respect, they don't even like branches.

Note that function pointers are also hard, and you do have those in C. In fact, you'd have more of them: qsort() needs a function pointer, but std::sort doesn't.

于 2011-09-22T08:34:49.240 回答