SetViewStrides
Function Usage
Sets the ViewStrides of an aclTensor.
Prototype
SetViewStrides(const op::Strides &strides)
SetViewStrides(op::Strides &&strides)
Parameters
Parameter |
Input/Output |
Description |
|---|---|---|
strides |
Input |
The type is FVector<int64_t>, indicating the stride size of each dimension of the aclTensor. The value cannot be a negative number. |
Returns
void
Constraints
None
Example
1 2 3 4 5 6 | // Increase the stride of the last dimension of the input by eight times. void Func(const aclTensor *input) { auto strides = input->GetViewStrides(); strides[strides.size() - 1] *= 8; input->SetViewStrides(strides); } |
Parent topic: common_types