I have an array of pointers to global inside a function, I’m having issues with having a pointer then to this array.
For example if I have
global double2 * Start[SIZE];
I get errors when I try to pass it as (global double2 **) argument to a function.
Are these errors from the specific implementation or am I doing things incorrectly?
Error Message:
Call parameter type does not match function signature!
%ptr210 = getelementptr inbounds [6 x <2 x double> addrspace(1)] %Start, i32 0, i32 0 ; <<2 x double> addrspace(1)> [#uses=1]
<2 x double> addrspace(1)* addrspace(1)* %call216 = call i32 @func(<2 x double> addrspace(1) %ptr210) nounwind ; <i32> [#uses=0]
Broken module found, compilation aborted!
Stack dump:
0. Running pass ‘Module Verifier’ on function ‘@__OpenCL_Main_kernel’
Aborted
note: I am not passing it as a kernel function