I am having a strange problem when building a kernel on Linux targeting the CPU device in the AMD OpenCL platform - if the kernel code contains a reference to one of the predefined OpenCL constants, the OpenCL compiler gives an error as below:
Constant | error |
---|
INFINITY | error: function "__builtin_inff" declared implicitly |
HUGE_VALF | error: function "__builtin_huge_valf" declared implicitly |
NAN | error: function "__builtin_nanf" declared implicitly |
MAXFLOAT | no error |
Can anybody else reproduce this?
Code:
kernel void test()
{
float t = INFINITY;
}
Ubuntu 14.04 with AMDAPP SDK 2.9
VirtualBox VM 4.3.22
CPU: Intel Core i7-3820QM (2 cores available in VM)