Improved performance of single-dimensional CudaTensor reduction
Improved performance of single-dimensional CudaTensor reduction

This uses a parallel reduction to speed up the case where the reduction
is over the innermost dimension. For a 2k x 2k matrix the speedup is
around 3x.

This approach means that the reduction is done using single-precision
rather than double-precision, as before.

fmassa/cutorch,hughperkins/cutorch,hughperkins/cutorch,yvan-sraka/cutorch,torch/cutorch,luketwitter/cutorch,soumith/cutorch,torch/cutorch,torch/cutorch,Zhen-hao/cutorch,0wu/cutorch,LinusU/cutorch,adamlerer/cutorch,0wu/cutorch,wickedfoo/cutorch,clementfarabet/cutorch,clementfarabet/cutorch,Zhen-hao/cutorch,Moodstocks/cutorch,luketwitter/cutorch,Moodstocks/cutorch,wickedfoo/cutorch,adamlerer/cutorch,LinusU/cutorch,Schakirov/cutorch_my,Schakirov/cutorch_my,yvan-sraka/cutorch