Distributed-memory dense and sparse-direct linear algebra