Updated local cpath

torch-pkg installs library files to <local-instal-prefix>/lib/torch/lua
(changed in c622014a5d25668f2308277d68fc9b1de5b2d0d2 and
e500d7cea89b2454b1219c3a883a0cae2f6cc9fe). torch-env now adds this
location to the cpath, whereas before it only added
<local-install-prefix>/lib/torch which was the correct location prior to
c622014a5d25668f2308277d68fc9b1de5b2d0d2.
Added CudaTensor.sign
Added copying form of CudaTensor.cmul

i.e.
	x:cmul(y,z)
Previously only
	x:cmul(y)
was implemented.
Added single-dimensional sum for CudaTensor

i.e. summation of the form y:sum(x,1). This is supported for up to
4-dimensional tensors in a single kernel call. More dimensions could be
added if needed by looping over this kernel.

Internally two generic reduction kernels are used which reduce either
the innermost or one of the outer dimensions. In either case global
memory accesses are fully coelesced.
Added single-dimensional min/max for CudaTensor
Added copying form of CudaTensor.pow
Added logical operators that return non-ByteTensors

The existing equality operators always return ByteTensors. Often the
return values from an equality operation needs to be used with a tensor
of the original type (e.g. point-wise multiplication with a mask), and
the ByteTensor therefore has to be cast back to this type. This casting
is unneccessary, and for CudaTensors would be costly, as it involves a
round-trip to the host.

This commit adds new forms of the equality operators that directly
writes the result into a tensor of the approriate type. For example

	x = torch.DoubleTensor(5)
	y = torch.rand(5)
	x:lt(y,0.5)

The existing ByteTensor-returning forms are still present.
Added new logical operators for CudaTensor
Replaced uint with unsigned

... as it otherwise does not build on all compilers.
Fixed operand order for CudaTensor logical operations
Changed cpath order

The new paths used by torch-pkg takes presedence over the old path, but
the old path is still there for backwards compatability.
Merge pull request #125 from akfidjeland/cpath

Updated local cpath
Single-dimensional CudaTensor reduction handles large tensors

Previously most dimensions were limited to 64k. Now there is no limit.
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.
Merge pull request #127 from akfidjeland/cuda

Cuda updates.
Bugfix: incorrect CudaTensor.max
Optional return tensor for CudaTensor reductions

Previously this needed to be called as

	y:sum(x,1)

Now it can be called as

	x:sum(1)

as for regular tensors.
Merge pull request #130 from akfidjeland/cuda-reductions

Cuda reductions
add setprintlevel function to control number of print levels
Merge branch 'master' of github.com:andresy/torch