cuquantum.custatevec.sv_swap_worker_set_sub_svs_p2p

cuquantum.custatevec.sv_swap_worker_set_sub_svs_p2p(intptr_t handle, intptr_t sv_swap_worker, dst_sub_svs_p2p, dst_sub_sv_indices_p2p, dst_events, uint32_t n_dst_sub_svs_p2p)[source]

设置可通过 GPUDirect P2P 访问的子状态向量指针。

参数
  • handle (intptr_t) – cuStateVec 库的句柄。

  • sv_swap_worker (intptr_t) – 状态向量交换工作器。

  • dst_sub_svs_p2p (object) –

    可通过 GPUDirect P2P 访问的子状态向量指针数组。它可以是

    • 作为数组的指针地址的 int,或者

    • 一个 intptr_t 的 Python 序列。

  • dst_sub_sv_indices_p2p (object) –

    由 dst_sub_svs_p2p 参数指定的子状态向量指针的子状态向量索引。它可以是

    • 作为数组的指针地址的 int,或者

    • 一个 int32_t 的 Python 序列。

  • dst_events (object) –

    用于创建对等工作器的事件。它可以是

    • 作为数组的指针地址的 int,或者

    • 一个 intptr_t 的 Python 序列。

  • n_dst_sub_svs_p2p (uint32_t) – 由 dst_sub_svs_p2p 参数指定的子状态向量指针的数量。