Debugger doesn't display local variable

Debugger doesn't display local variable

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;


4 帖子 / 0 全新

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

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?  

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.