The new OpenCL compiler for the EVMK2H platform complains about the "global" address space qualifier in a kernel function array parameter (see program below). Even though the OpenCL 1.1 standard is less specific about this (but does not disallow it), the OpenCL 1.2 standard explicitely allows the "global" address space qualifier in kernel function array arguments (Sec. 6.5). Could you please fix this (even though one could argue if this is a bug in OpenCL 1.1)?
Thanks, John Romein
#define __CL_ENABLE_EXCEPTIONS
#include <CL/cl.hpp>
#include <iostream>
#include <string>
#include <vector>
const char *kernelSource = "kernel void foo(global int arg[1]) { }"; // compiler complains about the "global" address space qualifier
int main()
{
try
{
cl::Context context(CL_DEVICE_TYPE_ACCELERATOR);
std::vector<cl::Device> devices(context.getInfo<CL_CONTEXT_DEVICES>());
cl::Program::Sources source(1, std::make_pair(kernelSource, strlen(kernelSource)));
cl::Program program(context, source);
program.build(devices);
} catch (cl::Error &err) {
std::cerr <<"cl::Error(): " << err.what() << '(' << err.err() << ')' << std::endl;
}
return 0;
}