A custom coprocessor for matrix algorithms