Matrix Algebra on GPU and Multicore Architectures