[英]how to implement double pointer with OpenCl rand with android JNI
I am currently using an implementation of OpenCL
bound with JNI
interface to my android app. 我目前正在使用与JNI
接口绑定到我的android应用程序的OpenCL
实现。
When the kernel is loaded 加载内核时
__kernel void someFunction( __global double* out,
I get this error : 我收到此错误:
error: use of type 'double' requires cl_khr_fp64 extension to be enabled
__global double* weight_coef,
I tried to replace it by float and it works but I want to avoid that ! 我试图用float代替它,但是它可以工作,但是我想避免这种情况!
You need to enable the 'cl_khr_fp64' extension. 您需要启用“ cl_khr_fp64”扩展名。
To do that, you need to do 为此,您需要做
#pragma OPENCL EXTENSION cl_khr_fp64 : enable
before any double-precision data type is initialized in the kernel code. 在内核代码中初始化任何双精度数据类型之前。
For further information, feel free to refer to the Khronos OpenCL specification: https://www.khronos.org/registry/cl/sdk/1.0/docs/man/xhtml/cl_khr_fp64.html 有关更多信息,请随时参考Khronos OpenCL规范: https : //www.khronos.org/registry/cl/sdk/1.0/docs/man/xhtml/cl_khr_fp64.html
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.