AnsweredAssumed Answered

problems with OpenCL constants and OpenCL compiler on Linux

Question asked by lantonov on Feb 28, 2015
Latest reply on Mar 9, 2015 by ravkum

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:

 

Constanterror
INFINITYerror: function "__builtin_inff" declared implicitly
HUGE_VALFerror: function "__builtin_huge_valf" declared implicitly
NANerror: function "__builtin_nanf" declared implicitly
MAXFLOATno 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)

Outcomes