OpenCL* for CPU
Ask questions and share information on Intel® SDK for OpenCL™ Applications and OpenCL™ implementations for Intel® CPU.
공지
This forum covers OpenCL* for CPU only. OpenCL* for GPU questions can be asked in the GPU Compute Software forum. Intel® FPGA SDK for OpenCL™ questions can be ask in the FPGA Intel® High Level Design forum.

Debugger doesn't display local variable

Tar__Alex
초급자
1,704 조회수

I try to debug some opencl kernel in Visual Studio 2013. After entering in kernel debugger show me local variables, but only before row with union operator (#11). Once debug go to row 11 a "Locals" window is cleared. I think this is a bug. (sorry for my english)

__kernel void randn2(float sigma, unsigned int user_k, __global float4* out)
{
	philox4x32_key_t k = {{get_global_id(0), get_global_id(1)}};
	philox4x32_ctr_t c = {{ 0, 0xf00dcafe, 0xdeadbeef, user_k }};
	float4 buf={0, 0, 0, 0};
	float2 cos2;
	union {
		philox4x32_ctr_t c;
		uint4 ui;
		float4 f;
	} u;
	u.c = philox4x32_R(7,c, k);
	u.f = convert_float4(u.ui) / UINT_MAX;

 

0 포인트
3 응답
Jeffrey_M_Intel1
1,704 조회수

Thanks Alex!  I agree that this looks like a bug.  I've replicated the behavior you've described and reported to the development team.  

0 포인트
Jeffrey_M_Intel1
1,704 조회수

Sorry for the delay in getting back to you.  There are several issues with unions, including support in the kernel builder.  We're looking into what can be done.  There are many things that need to be prioritized, and your feedback can help.  How critical is union support for your application?  

0 포인트
Tar__Alex
초급자
1,704 조회수

In the future it is will be critical, but not now. Simply in some cases using union is very convenient.

Now I can use workaround.

0 포인트
응답