SetData
Function Usage
Sets the data at the specified position for a host tensor obtained through AllocHostTensor.
Prototype
Parameters
- API for setting the value at the specified index
- API for initializing tensor data with an existing memory
Returns
None
Constraints
The input parameter pointer must not be null.
Example
1 2 3 4 5 6 |
// Initialize an int64_t memory and set the first 10 digits of the input to the content of the memory. Set the 11th digit of the input to the first digit of myArray. void Func(const aclTensor *input) { int64_t myArray[10]; input->SetData(myArray, 10, DT_INT64); input->SetData(10, myArray[0], DT_INT64); } |
Parent topic: common_types