operator==
Function Usage
Determines whether a shape object is equal to another shape object. If dim num of the two shape objects is the same and each dim value in dim num is the same, the two shape objects are equal.
Prototype
1 | bool operator==(const Shape &rht) const |
Parameters
Parameter |
Input/Output |
Description |
|---|---|---|
rht |
Input |
Another shape object. |
Returns
true: equal; false: not equal
Constraints
None.
Examples
1 2 3 | Shape shape0({3, 256, 256}); Shape shape1({1, 3, 256, 256}); auto is_same_shape = shape0 == shape1; // false is returned, indicating that the two shapes are not equal. |
Parent topic: Shape