aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--tensorflow/core/lib/jpeg/jpeg_mem.cc1
-rw-r--r--tensorflow/core/platform/mem.h12
-rw-r--r--tensorflow/core/platform/mutex.h2
3 files changed, 13 insertions, 2 deletions
diff --git a/tensorflow/core/lib/jpeg/jpeg_mem.cc b/tensorflow/core/lib/jpeg/jpeg_mem.cc
index 17fcad97a3..cf116d032a 100644
--- a/tensorflow/core/lib/jpeg/jpeg_mem.cc
+++ b/tensorflow/core/lib/jpeg/jpeg_mem.cc
@@ -26,6 +26,7 @@ limitations under the License.
#include "tensorflow/core/lib/jpeg/jpeg_handle.h"
#include "tensorflow/core/platform/logging.h"
+#include "tensorflow/core/platform/mem.h"
#include "tensorflow/core/platform/port.h"
namespace tensorflow {
diff --git a/tensorflow/core/platform/mem.h b/tensorflow/core/platform/mem.h
index af87d1408c..cd864d51b5 100644
--- a/tensorflow/core/platform/mem.h
+++ b/tensorflow/core/platform/mem.h
@@ -16,8 +16,20 @@ limitations under the License.
#ifndef TENSORFLOW_PLATFORM_MEM_H_
#define TENSORFLOW_PLATFORM_MEM_H_
+#include "tensorflow/core/platform/platform.h"
#include "tensorflow/core/platform/types.h"
+// Include appropriate platform-dependent implementation of
+// TF_ANNOTATE_MEMORY_IS_INITIALIZED.
+#if defined(PLATFORM_GOOGLE)
+#include "tensorflow/core/platform/google/dynamic_annotations.h"
+#elif defined(PLATFORM_POSIX) || defined(PLATFORM_POSIX_ANDROID) || \
+ defined(PLATFORM_GOOGLE_ANDROID)
+#include "tensorflow/core/platform/default/dynamic_annotations.h"
+#else
+#error Define the appropriate PLATFORM_<foo> macro for this platform
+#endif
+
namespace tensorflow {
namespace port {
diff --git a/tensorflow/core/platform/mutex.h b/tensorflow/core/platform/mutex.h
index c166af2b8e..a7744d3c9c 100644
--- a/tensorflow/core/platform/mutex.h
+++ b/tensorflow/core/platform/mutex.h
@@ -25,11 +25,9 @@ enum ConditionResult { kCond_Timeout, kCond_MaybeNotified };
// Include appropriate platform-dependent implementations of mutex etc.
#if defined(PLATFORM_GOOGLE)
-#include "tensorflow/core/platform/google/dynamic_annotations.h"
#include "tensorflow/core/platform/google/mutex.h"
#elif defined(PLATFORM_POSIX) || defined(PLATFORM_POSIX_ANDROID) || \
defined(PLATFORM_GOOGLE_ANDROID)
-#include "tensorflow/core/platform/default/dynamic_annotations.h"
#include "tensorflow/core/platform/default/mutex.h"
#else
#error Define the appropriate PLATFORM_<foo> macro for this platform