Refactoring convolution.cpp
Added matrix type