Implement CLConstantTile
- Create tile object to store constant variables
- Add unit tests for the CLConstantTile
- Extend unit test for CLTile
Resolves COMPMID-5786
Signed-off-by: Gian Marco Iodice <gianmarco.iodice@arm.com>
Change-Id: I351d8b88327e071791b781a04a6ab4990c89c04d
Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/9794
Benchmark: Arm Jenkins <bsgcomp@arm.com>
Tested-by: Arm Jenkins <bsgcomp@arm.com>
Reviewed-by: Viet-Hoa Do <viet-hoa.do@arm.com>
diff --git a/compute_kernel_writer/src/ITile.h b/compute_kernel_writer/src/ITile.h
index 283e6fa..15f4a3e 100644
--- a/compute_kernel_writer/src/ITile.h
+++ b/compute_kernel_writer/src/ITile.h
@@ -31,6 +31,9 @@
namespace ckw
{
+/** Compute Kernel Writer tile container. It contains the variables stored in the tile as a string */
+using TileContainer = std::vector<std::vector<std::string>>;
+
/** Tile descriptor which reports the underlying datatype and vector length */
struct TileVariableDescriptor
{
@@ -92,12 +95,12 @@
public:
virtual ~IScalarTile() = default;
/** Method to get the scalar variable from a tile as a string
- * @param[in] col Tile column. If out-of-bound, the column is clamped to the nearest valid edge
* @param[in] row Tile row. If out-of-bound, the row is clamped to the nearest valid edge
+ * @param[in] col Tile column. If out-of-bound, the column is clamped to the nearest valid edge
*
* @return the @ref TileVariable
*/
- virtual TileVariable scalar(int32_t col, int32_t row) const = 0;
+ virtual TileVariable scalar(int32_t row, int32_t col) const = 0;
};
/** Tile base class to store vector variables. It derives from IScalarTile since we can still access the scalar variable
@@ -116,13 +119,13 @@
virtual TileVariable vector(int32_t row) const = 0;
/** Method to get a sub-vector variable. The length of the sub-vector must be supported by the derived IVectorTile class
*
+ * @param[in] row Tile row. If out-of-bound, the row is clamped to the nearest valid edge
* @param[in] col_start Tile starting column to get the sub-vector. If out-of-bound, the derived IVectorTile class may throw an assert.
* @param[in] width The width of the sub-vector. The width must be supported by the derived IVectorTile class and the last element must be in-bound.
- * @param[in] row Tile row. If out-of-bound, the row is clamped to the nearest valid edge
*
* @return the vector variable as a @ref TileVariable
*/
- virtual TileVariable vector(int32_t col_start, int32_t width, int32_t row) const = 0;
+ virtual TileVariable vector(int32_t row, int32_t col_start, int32_t width) const = 0;
/** Method to get the supported vector length.
*
* @return a vector containing the supported vector lengths