How can I declare a register variable that is global to all the functions and kernels in the same file? So far, I can declare variables in shared (shared), global(global) or constant(constant) memory but nvcc will not compile if I don’t specify any of these identifiers. My code is:
shared int i, j;
device void function1(){
//Use i and j here
}
device void function2(){
//Use i and j here
}
.
.
.