Optimizing Sparse Matrix-Matrix Multiplication For Graph Computations On Gpus And Multi-Core Systems