GetBufferCopyType

Function Usage

This function is used to obtain the data type of two tensor buffers.

Prototype

static TensorBufferCopyType GetBufferCopyType(const TensorBuffer &buffer1, const TensorBuffer &buffer2);

Parameter Description

Parameter

Input/Output

Description

buffer1

Input

TensorBuffer object

buffer2

Input

TensorBuffer object

Return Parameter Description

Data Structure

Description

TensorBufferCopyType

Copy type of two tensor buffers.

  • HOST_AND_HOST: The two tensor buffers are on the host.
  • HOST_AND_DEVICE: One tensor buffer is on the host, and the other is on the device.
  • DEVICE_AND_SAME_DEVICE: The two tensor buffers are on the device and have the same device ID.
  • DEVICE_AND_DIFF_DEVICE: The two tensor buffers are on the device but have different device IDs.