PTX: marshalling functions do not ensure the array remains live for the duration of the computation. Marshal instance for Shape