Made many optimizations to the CUDA implementation. Device2Host copy now utilizes thrust stream compaction, and the register pressure has been decreased.