Type casting in CUDA

Hi all,

I want to know :

Is Type Casting allowed in CUDA
char A = ‘5’;
int X = (int)A;

If YES Then, Is this approach Divergent ?

Yes, casting is allowed, just like in C90, and no your example won’t cause divergence. In fact I would guess that if your were to look at the ptx, your cast example is probably already hard coded as int X = 53.