CUDA context in which to perform the memcpy/memset. If ctx is NULL, the current context will be used.