Add matrix.cpp from cuda_convnet to fix some problem on Windows.

bbudescu found the real problem. I just made it work with out
compilation system.