目录

SetData

Function Description

Sets the tensor data.

Function Prototype

void SetData(TensorData &&data)

Parameters

Parameter Input/Output Description
data Input

Data to be set.

For details about the definition of the TensorData type, see TensorData.

Return Value

None

Restrictions

None

Calling Example

Tensor t = {{}, {}, {}, {}, nullptr};
void *a = &t;
TensorData td(a, nullptr);
t.SetData(std::move(td));