cuquantum.custatevec.apply_matrix_get_workspace_size¶
- cuquantum.custatevec.apply_matrix_get_workspace_size(intptr_t handle, int sv_data_type, uint32_t n_index_bits, intptr_t matrix, int matrix_data_type, int layout, int32_t adjoint, uint32_t n_targets, uint32_t n_controls, int compute_type) size_t [源代码]¶
此函数获取
apply_matrix()
所需的工作区大小。- 参数
handle (intptr_t) – cuStateVec 上下文的句柄。
sv_data_type (int) – 状态向量的数据类型。
n_index_bits (uint32_t) – 状态向量的索引位数。
matrix (intptr_t) – 指向矩阵的主机或设备指针。
matrix_data_type (int) – 矩阵的数据类型。
layout (MatrixLayout) – 枚举器,指定矩阵的内存布局。
adjoint (int32_t) – 应用矩阵的伴随矩阵。
n_targets (uint32_t) – 目标位的数量。
n_controls (uint32_t) – 控制位的数量。
compute_type (ComputeType) – 矩阵乘法的 compute_type。
- 返回值
工作区大小。
- 返回类型
size_t