cuquantum.custatevec.get_device_mem_handler¶
- cuquantum.custatevec.get_device_mem_handler(intptr_t handle) tuple [源代码]¶
获取 cuStateVec 的设备内存处理程序。
- 参数
handle (intptr_t) – 库句柄。
- 返回值
handler
对象,它有两种形式如果
handler
是一个 3 元组,则它被解释为(malloc, free, name)
,其中前两个对象是 Python 可调用对象,而name
是处理程序的名称。此 3 元组处理程序将与先前传递给set_device_mem_handler()
的处理程序进行相等比较(按元素比较)。如果
handler
是一个 4 元组,则它被解释为(ctx, device_alloc, device_free, name)
,其中前三个元素是相应成员的指针地址(int
)。name
与上面相同。
- 返回类型