Linear Algebra infra

Linear Algebra infrastructure for choosing the backend.