SetViewShape
Function Usage
Sets the ViewShape of an aclTensor. ViewShape indicates the logical shape of the aclTensor, which can be obtained from GetViewShape.
Prototype
void SetViewShape(const op::Shape &shape)
Parameters
Returns
None
Constraints
None
Example
1 2 3 4 5 6 7 8 |
// Set the ViewShape of the input to [1, 2, 3, 4, 5]. void Func(aclTensor *input) { gert::Shape newShape; for (int64_t i = 1; i <= 5; i++) { newShape.AppendDim(i); } input->SetViewShape(newShape); } |
Parent topic: common_types