diff options
Diffstat (limited to 'tensorflow/contrib/lite/allocation.cc')
-rw-r--r-- | tensorflow/contrib/lite/allocation.cc | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tensorflow/contrib/lite/allocation.cc b/tensorflow/contrib/lite/allocation.cc index a4772731ec..c42622ff02 100644 --- a/tensorflow/contrib/lite/allocation.cc +++ b/tensorflow/contrib/lite/allocation.cc @@ -14,7 +14,9 @@ limitations under the License. ==============================================================================*/ #include <fcntl.h> +#ifndef TFLITE_MCU #include <sys/mman.h> +#endif #include <sys/stat.h> #include <sys/types.h> #include <unistd.h> @@ -27,10 +29,13 @@ limitations under the License. #include "tensorflow/contrib/lite/allocation.h" #include "tensorflow/contrib/lite/context.h" #include "tensorflow/contrib/lite/error_reporter.h" +#ifndef TFLITE_MCU #include "tensorflow/contrib/lite/nnapi_delegate.h" +#endif namespace tflite { +#ifndef TFLITE_MCU MMAPAllocation::MMAPAllocation(const char* filename, ErrorReporter* error_reporter) : Allocation(error_reporter), mmapped_buffer_(MAP_FAILED) { @@ -111,6 +116,7 @@ MemoryAllocation::MemoryAllocation(const void* ptr, size_t num_bytes, buffer_ = ptr; buffer_size_bytes_ = num_bytes; } +#endif MemoryAllocation::~MemoryAllocation() {} |