From acea4071a7f457bab696dc3c895ba47d60345541 Mon Sep 17 00:00:00 2001 From: Nikolaj Jensen Date: Mon, 3 Jul 2023 09:44:42 +0100 Subject: Fix code formatting in CKW Signed-off-by: Nikolaj Jensen Change-Id: I8064b345c1efd243f8bded12ed5d561afe7c339a Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/9854 Benchmark: Arm Jenkins Tested-by: Arm Jenkins Reviewed-by: Jakub Sujak Comments-Addressed: Arm Jenkins --- compute_kernel_writer/prototype/include/ckw/KernelWriter.h | 1 + compute_kernel_writer/prototype/include/ckw/OperandBase.h | 1 + compute_kernel_writer/prototype/include/ckw/TensorInfo.h | 10 +++++++++- compute_kernel_writer/prototype/include/ckw/TensorOperand.h | 2 +- compute_kernel_writer/prototype/include/ckw/TileInfo.h | 8 ++++++++ 5 files changed, 20 insertions(+), 2 deletions(-) (limited to 'compute_kernel_writer/prototype/include') diff --git a/compute_kernel_writer/prototype/include/ckw/KernelWriter.h b/compute_kernel_writer/prototype/include/ckw/KernelWriter.h index a2778a9485..3b1539116a 100644 --- a/compute_kernel_writer/prototype/include/ckw/KernelWriter.h +++ b/compute_kernel_writer/prototype/include/ckw/KernelWriter.h @@ -39,6 +39,7 @@ namespace ckw namespace prototype { struct GpuKernelWriterAttribute; + class IGpuKernelWriter; } // namespace prototype diff --git a/compute_kernel_writer/prototype/include/ckw/OperandBase.h b/compute_kernel_writer/prototype/include/ckw/OperandBase.h index f4825e16a7..a9e313fc0a 100644 --- a/compute_kernel_writer/prototype/include/ckw/OperandBase.h +++ b/compute_kernel_writer/prototype/include/ckw/OperandBase.h @@ -33,6 +33,7 @@ namespace ckw namespace prototype { class IGpuKernelWriter; + class Operand; } // namespace prototype diff --git a/compute_kernel_writer/prototype/include/ckw/TensorInfo.h b/compute_kernel_writer/prototype/include/ckw/TensorInfo.h index 00bb60a444..807158896b 100644 --- a/compute_kernel_writer/prototype/include/ckw/TensorInfo.h +++ b/compute_kernel_writer/prototype/include/ckw/TensorInfo.h @@ -117,20 +117,28 @@ public: * - less than 0: bind a virtual tensor (tile) */ TensorInfo(DataType dt, const TensorShape &shape, TensorDataLayout dl, int32_t id); + /** Set shape */ TensorInfo &shape(const TensorShape &shape); + /** Get shape */ TensorShape shape() const; + /** Set data type */ TensorInfo &data_type(DataType dt); + /** Get data type */ DataType data_type() const; + /** Set data layout */ TensorInfo &data_layout(TensorDataLayout dl); + /** Get data layout */ TensorDataLayout data_layout() const; + /** Set id */ TensorInfo &id(int32_t id); + /** Get layout */ int32_t id() const; @@ -140,6 +148,6 @@ private: TensorDataLayout _dl{ TensorDataLayout::Unknown }; int32_t _id{ -1 }; }; -} // namespace kw +} // namespace ckw #endif /* CKW_PROTOTYPE_INCLUDE_CKW_TENSORINFO_H */ diff --git a/compute_kernel_writer/prototype/include/ckw/TensorOperand.h b/compute_kernel_writer/prototype/include/ckw/TensorOperand.h index 2fc5044d1c..7a663f095b 100644 --- a/compute_kernel_writer/prototype/include/ckw/TensorOperand.h +++ b/compute_kernel_writer/prototype/include/ckw/TensorOperand.h @@ -134,7 +134,7 @@ public: private: TensorInfo _info; - TileOperand *_tile{ nullptr }; + TileOperand *_tile{ nullptr }; TensorTileSampler _tile_sampler{}; ::std::unique_ptr _stride1{ nullptr }; diff --git a/compute_kernel_writer/prototype/include/ckw/TileInfo.h b/compute_kernel_writer/prototype/include/ckw/TileInfo.h index 8fba8bb827..c60880dcd1 100644 --- a/compute_kernel_writer/prototype/include/ckw/TileInfo.h +++ b/compute_kernel_writer/prototype/include/ckw/TileInfo.h @@ -48,12 +48,14 @@ public: * @param[in] dt Tile data type */ TileInfo(DataType dt); + /** Constructor used to initialize a vector with a given data type and vector length. * * @param[in] dt Tile data type * @param[in] w Tile width (or vector length) */ TileInfo(DataType dt, int32_t w); + /** Constructor used to initialize a tile with a given data type and tile sizes. * * @param[in] dt Tile data type @@ -61,16 +63,22 @@ public: * @param[in] w Tile width */ TileInfo(DataType dt, int32_t h, int32_t w); + /** Set width */ TileInfo &width(int32_t w); + /** Get width */ int32_t width() const; + /** Set height */ TileInfo &height(int32_t h); + /** Get height */ int32_t height() const; + /** Set data type */ TileInfo &data_type(DataType dt); + /** Get data type */ DataType data_type() const; -- cgit v1.2.1