diff options
author | Viet-Hoa Do <viet-hoa.do@arm.com> | 2023-07-20 17:31:47 +0100 |
---|---|---|
committer | Viet-Hoa Do <viet-hoa.do@arm.com> | 2023-07-21 13:33:12 +0000 |
commit | 25d26f4d86042e0ca52ac1bef4039b187f77b5b3 (patch) | |
tree | 9a4ee7d5173883a2c67a68689d591efd746f2b5f /compute_kernel_writer/include/ckw/TileOperand.h | |
parent | 8dfb8820d5fe0f72a923eccc3bb73ee0b87d5511 (diff) | |
download | ComputeLibrary-25d26f4d86042e0ca52ac1bef4039b187f77b5b3.tar.gz |
Change TileOperand to a view of a tile object
* TileOperand instead of being the tile object now is only a view
of a tile object.
- declare_tile now returns a TileOperand object, not a reference
to a TileOperand object.
- This is to prepare for the posibility that the users need
to perform operations on part of a tile (e.g. a scalar value,
a vector, a sub-tile).
Partially resolves: COMPMID-6391
Signed-off-by: Viet-Hoa Do <viet-hoa.do@arm.com>
Change-Id: I35c08b22a384a756d99dcd04cbe66fc57bd548d2
Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/9958
Reviewed-by: Gunes Bayir <gunes.bayir@arm.com>
Comments-Addressed: Arm Jenkins <bsgcomp@arm.com>
Tested-by: Arm Jenkins <bsgcomp@arm.com>
Benchmark: Arm Jenkins <bsgcomp@arm.com>
Diffstat (limited to 'compute_kernel_writer/include/ckw/TileOperand.h')
-rw-r--r-- | compute_kernel_writer/include/ckw/TileOperand.h | 24 |
1 files changed, 18 insertions, 6 deletions
diff --git a/compute_kernel_writer/include/ckw/TileOperand.h b/compute_kernel_writer/include/ckw/TileOperand.h index abd3e0ac97..fe44b73e82 100644 --- a/compute_kernel_writer/include/ckw/TileOperand.h +++ b/compute_kernel_writer/include/ckw/TileOperand.h @@ -22,20 +22,32 @@ * SOFTWARE. */ -#ifndef CKW_INCLUDE_CKW_TILEOPERAND -#define CKW_INCLUDE_CKW_TILEOPERAND +#ifndef CKW_INCLUDE_CKW_TILEOPERAND_H +#define CKW_INCLUDE_CKW_TILEOPERAND_H namespace ckw { -/** Tile operand which can be either scalar, vector or 2D tile. */ +class KernelWriter; +class ITile; + +/** A tile operand refers to a tile object that can be used for kernel writing. */ class TileOperand { public: - /* Destructor */ - virtual ~TileOperand(); + // The constructor and _tile field is completely hidden from the public API to avoid any misuse. + // Only kernel writer class interacts with tile operand hence we allow it to access this field. + friend class KernelWriter; + +private: + // These are hidden from the public API to avoid any misuse. + + /** Initialize a new instance of @ref TileOperand class for the given tile. */ + TileOperand(ITile &tile); + + ITile &_tile; }; } // namespace ckw -#endif /* COMPUTE_KERNEL_WRITER_INCLUDE_CKW_TILEOPERAND */ +#endif // CKW_INCLUDE_CKW_TILEOPERAND_H |