Text this: Spintronic devices for energy-efficient data storage and energy harvesting