From: Vitaliy Cherepanov/AI Tools Lab /SRR/Engineer/삼성전자 Date: Tue, 3 Jul 2018 23:54:33 +0000 (+0300) Subject: tflite_benchmark: use get_env_bool instead of getenv (#1812) X-Git-Tag: 0.2~525 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=17fa3bdbdd53243a1b136300019c409db86a7d05;p=platform%2Fcore%2Fml%2Fnnfw.git tflite_benchmark: use get_env_bool instead of getenv (#1812) * tflite_benchmark: use get_env_bool instead of getenv Replace std::getenv by nnfw::util::get_env_bool for USE_NNAPI Signed-off-by: Vitaliy Cherepanov * Update tflite_benchmark.cc --- diff --git a/tools/tflite_benchmark/src/tflite_benchmark.cc b/tools/tflite_benchmark/src/tflite_benchmark.cc index cfe244e..5f25aea 100644 --- a/tools/tflite_benchmark/src/tflite_benchmark.cc +++ b/tools/tflite_benchmark/src/tflite_benchmark.cc @@ -68,14 +68,9 @@ int main(const int argc, char **argv) const auto filename = argv[1]; - bool use_nnapi = false; + const bool use_nnapi = nnfw::util::get_env_bool("USE_NNAPI"); const auto thread_count = nnfw::util::get_env_int("THREAD", -1); - if (std::getenv("USE_NNAPI") != nullptr) - { - use_nnapi = true; - } - std::cout << "Num threads: " << thread_count << std::endl; if (use_nnapi) {