Add initialize lost class members initialization (#4535)
author오형석/On-Device Lab(SR)/Staff Engineer/삼성전자 <hseok82.oh@samsung.com>
Mon, 4 Mar 2019 02:08:20 +0000 (11:08 +0900)
committerGitHub Enterprise <noreply-CODE@samsung.com>
Mon, 4 Mar 2019 02:08:20 +0000 (11:08 +0900)
Add initialize class members not defined yet

Signed-off-by: Hyeongseok Oh <hseok82.oh@samsung.com>
libs/ARMComputeEx/arm_compute/core/CL/kernels/CLHashtableLookupKernel.h
libs/ARMComputeEx/arm_compute/core/CL/kernels/CLSpaceToBatchNDKernel.h
libs/ARMComputeEx/arm_compute/runtime/CL/functions/CLArgOperation.h
libs/ARMComputeEx/arm_compute/runtime/misc/functions/GenericGather.h
libs/ARMComputeEx/arm_compute/runtime/misc/functions/SimpleArgOperation.h
libs/ARMComputeEx/src/core/CL/kernels/CLHashtableLookupKernel.cpp
libs/ARMComputeEx/src/core/CL/kernels/CLSpaceToBatchNDKernel.cpp
libs/ARMComputeEx/src/runtime/CL/functions/CLArgOperation.cpp

index c3fc156..8269e5a 100644 (file)
@@ -118,11 +118,11 @@ public:
   void run(const Window &window, cl::CommandQueue &queue) override;
 
 private:
-  const ICLTensor *_lookups;                          /** Lookups tensor */
-  const ICLTensor *_keys;                             /** Keys tensor */
-  const ICLTensor *_input;                            /** Source tensor */
-  ICLTensor *_output;                                 /** Destination tensor */
-  ICLTensor *_hits;                                   /** Hits tensor */
+  const ICLTensor *_lookups{nullptr};                 /** Lookups tensor */
+  const ICLTensor *_keys{nullptr};                    /** Keys tensor */
+  const ICLTensor *_input{nullptr};                   /** Source tensor */
+  ICLTensor *_output{nullptr};                        /** Destination tensor */
+  ICLTensor *_hits{nullptr};                          /** Hits tensor */
   std::unique_ptr<CLTensor> _lookup_indices{nullptr}; /** Lookup indices tensor */
 };
 } // namespace arm_compute
index 68534f1..577e38c 100644 (file)
@@ -58,10 +58,10 @@ public:
   void run(const Window &window, cl::CommandQueue &queue) override;
 
 private:
-  const ICLTensor *_input;        /**< Source tensor */
-  const ICLTensor *_block_size;   /**< Block size tensor */
-  const ICLTensor *_padding_size; /**< Padding size tensor */
-  ICLTensor *_output;             /**< Destination tensor */
+  const ICLTensor *_input{nullptr};        /**< Source tensor */
+  const ICLTensor *_block_size{nullptr};   /**< Block size tensor */
+  const ICLTensor *_padding_size{nullptr}; /**< Padding size tensor */
+  ICLTensor *_output{nullptr};             /**< Destination tensor */
 };
 
 } // namespace arm_compute
index 8d4b95d..d9d0d4d 100644 (file)
@@ -93,14 +93,14 @@ public:
   void run() override;
 
 private:
-  ICLTensor *_input;
-  ICLTensor *_output;
-  std::vector<uint32_t> _axis;
-  ArgOperation _arg_op;
+  ICLTensor *_input{nullptr};
+  ICLTensor *_output{nullptr};
+  std::vector<uint32_t> _axis{};
+  ArgOperation _arg_op{ArgOperation::MAX};
 
   std::unique_ptr<CLTensor[]> _interm_tensors{nullptr};
   std::unique_ptr<CLArgOperationKernel[]> _argop_kernels{nullptr};
-  size_t _num_of_kernels;
+  size_t _num_of_kernels{0};
 };
 }
 #endif /*__ARM_COMPUTE_CLARGOPERATION_H__ */
index 0230fa1..dc02e91 100644 (file)
@@ -43,7 +43,6 @@ class GenericGather : public arm_compute::IFunction
 {
 public:
   GenericGather(void)
-      : _input(nullptr), _output(nullptr), _cl_permuted{}, _cl_permute{}, _cl_gather{}
   {
     // DO NOTHING
   }
@@ -68,10 +67,10 @@ public:
   void run(void) override;
 
 private:
-  arm_compute::ITensor *_input;
-  arm_compute::ITensor *_indices;
-  arm_compute::ITensor *_output;
-  int _axis;
+  arm_compute::ITensor *_input{nullptr};
+  arm_compute::ITensor *_indices{nullptr};
+  arm_compute::ITensor *_output{nullptr};
+  int _axis{0};
   arm_compute::CLTensor _cl_permuted;
 
 private:
index f40902f..c709dd0 100644 (file)
@@ -31,7 +31,7 @@ namespace misc
 class SimpleArgOperation : public arm_compute::IFunction
 {
 public:
-  SimpleArgOperation(void) : _input(nullptr), _output(nullptr), _axis(), _input_rank(0)
+  SimpleArgOperation(void)
   {
     // DO NOTHING
   }
@@ -50,11 +50,11 @@ public:
   void run() override;
 
 private:
-  arm_compute::ITensor *_input;
-  arm_compute::ITensor *_output;
-  std::vector<uint32_t> _axis;
-  int _input_rank;
-  arm_compute::ArgOperation _op_type;
+  arm_compute::ITensor *_input{nullptr};
+  arm_compute::ITensor *_output{nullptr};
+  std::vector<uint32_t> _axis{};
+  int _input_rank{0};
+  arm_compute::ArgOperation _op_type{ArgOperation::MAX};
 };
 
 } // namespace misc
index bf79e3c..31e98c9 100644 (file)
@@ -43,8 +43,8 @@ std::pair<Status, Window> validate_and_configure_window(ITensorInfo *input, ITen
 } // namespace
 
 CLHashtableLookupKernel::CLHashtableLookupKernel()
-    : _lookups(nullptr), _input(nullptr), _output(nullptr)
 {
+  // DO NOTHING
 }
 
 Status CLHashtableLookupKernel::validate(const ITensorInfo *lookups, const ITensorInfo *keys,
index 0715fea..f7836b6 100644 (file)
@@ -80,7 +80,10 @@ Status validate_arguments(const ITensorInfo *input, const ITensorInfo *block_siz
 
 } // namespace
 
-CLSpaceToBatchNDKernel::CLSpaceToBatchNDKernel() : _input(nullptr), _output(nullptr) {}
+CLSpaceToBatchNDKernel::CLSpaceToBatchNDKernel()
+{
+  // DO NOTHING
+}
 
 void CLSpaceToBatchNDKernel::configure(const ICLTensor *input, const ICLTensor *block_size,
                                        const ICLTensor *padding_size, ICLTensor *output)
index 6cabd1c..ed7cec6 100644 (file)
@@ -23,9 +23,8 @@ namespace arm_compute
 {
 
 CLArgOperation::CLArgOperation()
-    : _input(nullptr), _output(nullptr), _axis(), _interm_tensors(), _argop_kernels(),
-      _num_of_kernels()
 {
+  // DO NOTHING
 }
 
 void CLArgOperation::configure(ICLTensor *input, ICLTensor *output, std::vector<uint32_t> axis,