diff options
author | Pablo Tello <pablo.tello@arm.com> | 2019-07-22 17:36:03 +0100 |
---|---|---|
committer | Pablo Marquez <pablo.tello@arm.com> | 2019-07-23 10:29:00 +0000 |
commit | cf9c843b44db74ad5671efd2efdf9a4b4dd79214 (patch) | |
tree | 2999ab4c14ab31fed7c6e5f0b9abb096ffe9eea3 /utils/Utils.cpp | |
parent | 10c53f1ef317095ddcd9143bf759cc68ecb0e721 (diff) | |
download | ComputeLibrary-cf9c843b44db74ad5671efd2efdf9a4b4dd79214.tar.gz |
COMPMID 1528: Fixed compilation error when opencl=0
Change-Id: I0d57ba882a608026f582f9f208830e5b5ad315cd
Signed-off-by: Pablo Tello <pablo.tello@arm.com>
Reviewed-on: https://review.mlplatform.org/c/1586
Tested-by: Arm Jenkins <bsgcomp@arm.com>
Reviewed-by: Giuseppe Rossini <giuseppe.rossini@arm.com>
Comments-Addressed: Arm Jenkins <bsgcomp@arm.com>
Diffstat (limited to 'utils/Utils.cpp')
-rw-r--r-- | utils/Utils.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/utils/Utils.cpp b/utils/Utils.cpp index 47ec25963b..baf829b473 100644 --- a/utils/Utils.cpp +++ b/utils/Utils.cpp @@ -23,7 +23,9 @@ */ #include "Utils.h" +#ifdef ARM_COMPUTE_CL #include "arm_compute/runtime/CL/CLScheduler.h" +#endif /* ARM_COMPUTE_CL */ #include <cctype> #include <cerrno> @@ -276,6 +278,7 @@ uint64_t get_mem_free_from_meminfo() */ void restore_program_cache_from_file(const std::string &filename) { +#ifdef ARM_COMPUTE_CL std::ifstream cache_file(filename, std::ios::binary); if(cache_file.is_open()) { @@ -310,6 +313,7 @@ void restore_program_cache_from_file(const std::string &filename) } cache_file.close(); } +#endif /* ARM_COMPUTE_CL */ } /** This function saves opencl kernels library to a file @@ -318,6 +322,7 @@ void restore_program_cache_from_file(const std::string &filename) */ void save_program_cache_to_file(const std::string &filename) { +#ifdef ARM_COMPUTE_CL if(CLScheduler::get().is_initialised()) { std::ofstream cache_file(filename, std::ios::binary); @@ -342,6 +347,7 @@ void save_program_cache_to_file(const std::string &filename) ARM_COMPUTE_ERROR("Cannot open cache file"); } } +#endif /* ARM_COMPUTE_CL */ } } // namespace utils } // namespace arm_compute |