M_SQRT1_2未在OpenCL中定义

时间:2016-06-27 00:53:04

标签: xcode opencl

我试图在Xcode中编译以下内容:

#pragma OPENCL EXTENSION cl_khr_fp64 : enable

double normcdf(double x) {
    return 0.5 * erfc(-x * M_SQRT1_2);
}

但我收到错误:error: use of undeclared identifier 'M_SQRT1_2'

如何使用常量M_SQRT1_2

0 个答案:

没有答案