Energy-efficiency and thermal management in nanoscale devices