Analysis And Computation Of Constrained Sparse Coding On Emerging Non-Von Neumann Devices