HDnn-PIM: Efficient in Memory Design of Hyperdimensional Computing with Feature Extraction