cuda automatic variable

I’ve started to read in some stuff about cuda. can anyone tell me, what an automatic variable is? In the book “programming massively parallel processors” it’s said, that all automatic variables other than arrays are stored in registers. But couldnt figure out what automatic stands for…

Automatic variables are variables inside functions that don’t have an explicit storage class in their declaration. E.g.

void myfun(void)


    int a;

    static int b;

    register int c;



[font=“Courier New”]a[/font] is an automatic variable, but not [font=“Courier New”]b[/font] or [font=“Courier New”]c[/font] (even though [font=“Courier New”]a[/font] and [font=“Courier New”]c[/font] are stored in registers). Note that [font=“Courier New”]a[/font] may still be stored in local memory instead of a register if it’s address is taken with the [font=“Courier New”]&[/font] operator and the compiler is not able to optimize this away.