cancel
Showing results for 
Search instead for 
Did you mean: 

Archives Discussions

shinchan
Journeyman III

Getting Access violation errors while using c lang blocks in opencl.

Hi,

I was trying to execute following kernel in opencl2.0 using AMD R380 with win 7.

When I build the program using clBuildProgram, I get following error :

Access violation at address 0x674b0af9

        Exception Flag: 0x00000000

        Exception Addr: 0x674b0af9

Access violation at address 0x675812ff

        Exception Flag: 0x00000000

        Exception Addr: 0x675812ff

Kernel Program :

__kernel void clang_block_neg(__global int* input_array,__global int* output_array)

{

  int global_id = get_global_id(0);

  void (^MyBlock)(void) = ^void (void){printf("void block");};

  //BlockStructure var;

  MyBlock();

  output_array[global_id] = input_array[global_id];

}

0 Likes
1 Reply
boxerab
Challenger

Function pointers are not allowed in OpenCL.

0 Likes