extern __shared__ int buf[]; //when you launch the kernel you should launch it this way; kernel<<>>(...);