MAtrix, TEnsor, and Deep-learning Optimized Routines (MATEDOR)