add cuda shared memory support