code: def nvmlDeviceGetBAR1MemoryInfo(handle):
      r
      c_bar1_memory = c_nvmlBAR1Memory_t()
      fn = _nvmlGetFunctionPointer("nvmlDeviceGetBAR1MemoryInfo")
      ret = fn(handle, byref(c_bar1_memory))
      _nvmlCheckReturn(ret)
      return bytes_to_str(c_bar1_memory)
docs: r"""
      /**
       * Gets Total, Available and Used size of BAR1 memory.
       *
       * BAR1 is used to map the FB (device memory) so that it can be directly accessed by the CPU or by 3rd party
       * devices (peer-to-peer on the PCIE bus).
       *
       * For Kepler &tm; or newer fully supported devices.
       *
       * @param device                               The identifier of the target device
       * @param bar1Memory                           Reference in which BAR1 memory
       *                                             information is returned.
       *
       * @return
       *         - \ref NVML_SUCCESS                 if BAR1 memory is successfully retrieved
       *         - \ref NVML_ERROR_UNINITIALIZED     if the library has not been successfully initialized
       *         - \ref NVML_ERROR_INVALID_ARGUMENT  if \a device is invalid, \a bar1Memory is NULL
       *         - \ref NVML_ERROR_NOT_SUPPORTED     if this query is not supported by the device
       *         - \ref NVML_ERROR_GPU_IS_LOST       if the target GPU has fallen off the bus or is otherwise inaccessible
       *         - \ref NVML_ERROR_UNKNOWN           on any unexpected error
       *
       */
      nvmlReturn_t DECLDIR nvmlDeviceGetBAR1MemoryInfo