Accelerator architectures for matrix applications