cuquantum.cutensornet.contraction_optimizer_info_pack_data

cuquantum.cutensornet.contraction_optimizer_info_pack_data(intptr_t handle, intptr_t info, buf, size_t size)[source]

Pack the contraction optimizer info data into a contiguous buffer.

Parameters
  • handle (intptr_t) – The library handle.

  • info (intptr_t) – An opaque optimizer info handle (as Python int). It must already be in a valid state (i.e., initialized).

  • buf

    A contiguous host buffer of size bytes for holding the packed optimizer info. It can be

    • an int as the pointer address to the buffer

    • any Python object supporting the Python buffer protocol. In this case, it must be 1D and writable; the format would be ignored.

  • size (size_t) – The buffer size in bytes as returned by contraction_optimizer_info_get_packed_size().