Hand-tweak generated bitonic code
Use device global memory when possible
Merge pull request #2 from emwap/master

Use device global memory when possible