General, Flexible And Unified Near-Data Computing