摘要: c++中的new会返回NULL空指针吗 "https://stackoverflow.com/questions/3389420/will new operator return null" On a standards conforming C++ implementation, no. The 阅读全文
posted @ 2018-12-13 15:06 willhua 阅读(3572) 评论(0) 推荐(0) 编辑
摘要: "https://stackoverflow.com/questions/4424193/what happens to mutex when the thread which acquired it exits?noredirect=1&lq=1" 解释当一个lock了mutex的线程退出了,却没 阅读全文
posted @ 2018-12-13 14:49 willhua 阅读(1718) 评论(0) 推荐(0) 编辑
摘要: 在高通的OpenCL SDK中,其Android.mk文件中,有判断当前kernel的版本,如果大于4.12,那么就使用libion.so,否则则使用ion kernle uapi : 从Andriod P开始, "Kernel 4.14已推到AOSP, libion在Android P上已支持新的 阅读全文
posted @ 2018-12-07 19:34 willhua 阅读(3040) 评论(0) 推荐(0) 编辑
摘要: "参考1 https://computing.llnl.gov/tutorials/pthreads/" "参考2 http://man7.org/linux/man pages/man7/pthreads.7.html" join 阻塞调用线程,直至指定pthread_t线程终止 在同一个线程中重 阅读全文
posted @ 2018-12-02 15:53 willhua 阅读(592) 评论(0) 推荐(0) 编辑
摘要: 在main线程中调用 会起到只让main线程退出,但是保留进程资源,供其他由main创建的线程使用,直至所有线程都结束,但在其他线程中不会有这种效果 "https://stackoverflow.com/questions/3559463/is it ok to call pthread exit 阅读全文
posted @ 2018-12-01 16:04 willhua 阅读(2710) 评论(0) 推荐(1) 编辑
摘要: The Android ION memory allocator "英文原文" ION heaps ION设计的目标 为了避免内存碎片化,或者为一些有着特殊内存需求的硬件,比如GPUs、display controller以及camera等,在系统启动的时候,会为他们预留一些memory pools 阅读全文
posted @ 2018-11-27 21:50 willhua 阅读(18434) 评论(0) 推荐(1) 编辑
摘要: 在kernel中使用 half 类型可以在牺牲一定精度的代价下来提升运算速度. 在kernel中, 可以比较方便的对half数据进行计算, 但在host上的, 对half的使用就没那么方便了. 查看 cl_float 的定义: 可知其本质是一个 uint16_t . 所以, 如果直接拿cl_floa 阅读全文
posted @ 2018-11-06 15:26 willhua 阅读(2649) 评论(0) 推荐(0) 编辑
摘要: 由于从Android 7.0, API 24, 开始, "系统将阻止应用链接至非公开NDK库" , 所以, 使用libOpenCL.so时与面向低版本的Android平台有所不同, 需要把依赖的非公开NDK库打包到APK中 确定依赖的库 首先应该确定你所使用的libOpenC.so所依赖的库, 使用 阅读全文
posted @ 2018-11-05 14:43 willhua 阅读(2250) 评论(0) 推荐(1) 编辑
摘要: 在穿件image对象的时候,需要传入一个 cl_image_format 参数,该参数结果包含 image_channel_order 和 image_channel_data_type 两个成员。前一个成员表示的是image对象含有的内容及其顺序,如下表 这个很好理解,表示是的image对象的数据 阅读全文
posted @ 2018-11-02 23:39 willhua 阅读(649) 评论(0) 推荐(0) 编辑
摘要: Callgrind介绍 用来对统计程序的函数调用之间的关系, 并统计每个函数的耗时 Callgrind之所以能够发现函数调用的关系, 依赖于平台的明确返回和调用指令. 在x86和amd64平台上works best, 但在PowerPC ARM Thumb以及MIPS上无法运行 可以使用 " gpr 阅读全文
posted @ 2018-10-19 20:11 willhua 阅读(4274) 评论(0) 推荐(0) 编辑