CMOS-compatible spintronic devices