我尝试在我的 OpenCL 内核中使用双精度扩展,但它不会构建。(Cloo.BuildProgramFailureComputeException)
这是我的代码:
string kernel = @"
#pragma OPENCL EXTENSION cl_khr_fp64 : enable
kernel void ImgWarp(
global char* img1,
global char* img2)
{ }"
ComputeContextPropertyList Properties = new ComputeContextPropertyList(ComputePlatform.Platforms[0]);
ComputeContext context = new ComputeContext(ComputeDeviceTypes.All, Properties, null, IntPtr.Zero);
ComputeProgram program = new ComputeProgram(context, kernel);
program.Build(null, null, null, IntPtr.Zero);
我检查了我的硬件是否支持双精度,它确实支持。但是,使用 cl_amd_printf 扩展是可行的。有任何想法吗?