Add CKW flow control writing methods
* Structures: if/else/else if, for, return.
* Add corresponding tests.
Partially resolves: COMPMID-6387
Signed-off-by: Viet-Hoa Do <viet-hoa.do@arm.com>
Change-Id: I2912ccaf46f836907f21bb53fa82bcc1f48dd224
Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/10199
Tested-by: Arm Jenkins <bsgcomp@arm.com>
Reviewed-by: SiCong Li <sicong.li@arm.com>
Reviewed-by: Gunes Bayir <gunes.bayir@arm.com>
Comments-Addressed: Arm Jenkins <bsgcomp@arm.com>
Benchmark: Arm Jenkins <bsgcomp@arm.com>
diff --git a/compute_kernel_writer/src/ITile.h b/compute_kernel_writer/src/ITile.h
index b5585ab..73b7315 100644
--- a/compute_kernel_writer/src/ITile.h
+++ b/compute_kernel_writer/src/ITile.h
@@ -21,8 +21,8 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
-#ifndef CKW_SRC_ITILE
-#define CKW_SRC_ITILE
+#ifndef CKW_SRC_ITILE_H
+#define CKW_SRC_ITILE_H
#include "ckw/TileInfo.h"
@@ -100,7 +100,7 @@
/** Tile base class.
* A Tile is a collection of variables (either program variables or constants) used to express a 2D data.
*/
-class ITile: public IScalarAccess
+class ITile : public IScalarAccess
{
public:
virtual ~ITile() = default;
@@ -129,7 +129,13 @@
* @return true if the tile is assignable
*/
virtual bool is_assignable() const = 0;
+
+ /** Get whether the tile is scalar, i.e. the width and height are both 1.
+ *
+ * @return true if the tile is scalar.
+ */
+ bool is_scalar() const;
};
} // namespace ckw
-#endif /* CKW_SRC_ITILE */
+#endif // CKW_SRC_ITILE_H