Cast parameter values to resolve error founded by CLANG-9.0 (#679)
author이성재/동작제어Lab(SR)/Principal Engineer/삼성전자 <sj925.lee@samsung.com>
Tue, 17 Jul 2018 00:51:09 +0000 (09:51 +0900)
committerGitHub Enterprise <noreply-CODE@samsung.com>
Tue, 17 Jul 2018 00:51:09 +0000 (09:51 +0900)
* cast `seed` to the right parameter type of `std::default_random_engine` constructor.

Signed-off-by: Sung-Jae Lee <sj925.lee@samsung.com>
contrib/nnsuite/conv/src/RandomModel.cpp

index f46e600..f2ec898 100644 (file)
@@ -15,7 +15,7 @@ RandomModel::RandomModel(int32_t seed)
     : _ifm_shape{1, 8, 8}, _ifm_name{"ifm"}, _ofm_name{"ofm"}, _ofm_shape{2, 6, 6},
       _ker_buffer{kernel::Shape{2, 1, 3, 3}, kernel::NCHWLayout{}}
 {
-  std::default_random_engine gen{seed};
+  std::default_random_engine gen{static_cast<uint32_t>(seed)};
   std::normal_distribution<float> dist{0.0f, 1.0f};
 
   const uint32_t N = _ker_buffer.shape().count();