In-memory hyperdimensional computing