Use global memory for queue

- Instead of using local memory which has max limitations, use global
memory for queue.
- Also, I noticed that the performance has been increased a little by
using the global memory.