use managed shared memory to avoid making vector copies of the feature ids and weights