[Tools/GenTestData] Fix a warning about sign-compare
authorWook Song <wook16.song@samsung.com>
Wed, 20 Nov 2019 08:59:25 +0000 (17:59 +0900)
committer채동주/On-Device Lab(SR)/Staff Engineer/삼성전자 <dongju.chae@samsung.com>
Fri, 22 Nov 2019 04:48:15 +0000 (13:48 +0900)
This patch fixes the sign-compare warning in testdata_gen.cpp.

Signed-off-by: Wook Song <wook16.song@samsung.com>
tools/gen-testdata/testdata_gen.cpp

index ebb4690..f5a9465 100644 (file)
@@ -51,7 +51,7 @@ class TestdataGen: public TrinityCore<64>, public DataGen {
     /** @brief append an trinity operation to the operation list */
     void append(TRINITY_CORE_PARA_OP& op) { ops.push_back(op); }
     /** @brief convert the operation to VISA assembly codes */
-    void write_asm_file(int idx, TRINITY_FMAP_PARA& in,
+    void write_asm_file(size_t idx, TRINITY_FMAP_PARA& in,
         TRINITY_FMAP_PARA& out, WGT_PARA& weight);
   private:
     uint32_t addr_in, addr_wgt;
@@ -62,7 +62,7 @@ class TestdataGen: public TrinityCore<64>, public DataGen {
 };
 
 /** @brief convert the operation to VISA assembly codes */
-void TestdataGen::write_asm_file(int idx, TRINITY_FMAP_PARA& in,
+void TestdataGen::write_asm_file(size_t idx, TRINITY_FMAP_PARA& in,
     TRINITY_FMAP_PARA& out, WGT_PARA& weight)
 {
   TRINITY_CORE_PARA_OP& op = ops[idx];
@@ -184,7 +184,7 @@ void TestdataGen::emit()
 
   ofs_asm.open(dir + "/program.asm");
 
-  for (int idx = 0; idx < ops.size(); idx++) {
+  for (size_t idx = 0; idx < ops.size(); idx++) {
     TRINITY_FMAP_PARA para_fmap_in;
     TRINITY_FMAP_PARA para_fmap_out;
     WGT_PARA para_weight;