cuquantum.cutensornet.workspace_get_memory

cuquantum.cutensornet.workspace_get_memory(intptr_t handle, intptr_t workspace, int mem_space, int kind) tuple[source]

Get the workspace pointer and size for the corresponding memory space and workspace kind that are set in a workspace descriptor.

Parameters
  • handle (intptr_t) – The library handle.

  • workspace (intptr_t) – The workspace descriptor.

  • mem_space (Memspace) – The memory space for the workspace being queried.

  • kind (WorkspaceKind) – The kind of the workspace being queried

Returns

A 2-tuple (workspace_ptr, workspace_size) for the pointer address to the workspace and the size of it.

Return type

tuple