fix bug in type evaluation

- fix that const or reference type was used to create memory
fix comment
Merge pull request #448 from psychocoderHPC/fix-nvidiaReduce

fix bug in type evaluation