A Smart Logic-in-Memory Architecture for Low-Power non-von Neumann Computing