diff options
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 |