diff options
Diffstat (limited to 'tensorflow/core/common_runtime/mkl_cpu_allocator.h')
-rw-r--r-- | tensorflow/core/common_runtime/mkl_cpu_allocator.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tensorflow/core/common_runtime/mkl_cpu_allocator.h b/tensorflow/core/common_runtime/mkl_cpu_allocator.h index 99bd43e090..6b76e7e0e7 100644 --- a/tensorflow/core/common_runtime/mkl_cpu_allocator.h +++ b/tensorflow/core/common_runtime/mkl_cpu_allocator.h @@ -148,12 +148,14 @@ class MklCPUAllocator : public VisitableAllocator { Status s = Status(error::Code::UNIMPLEMENTED, "Unimplemented case for hooking MKL function."); TF_CHECK_OK(s); // way to assert with an error message + return nullptr; // return a value and make static code analyzers happy } static inline void* ReallocHook(void* ptr, size_t size) { Status s = Status(error::Code::UNIMPLEMENTED, "Unimplemented case for hooking MKL function."); TF_CHECK_OK(s); // way to assert with an error message + return nullptr; // return a value and make static code analyzers happy } /// Do we allow growth in BFC Allocator @@ -166,6 +168,9 @@ class MklCPUAllocator : public VisitableAllocator { static constexpr const size_t kAlignment = 64; VisitableAllocator* allocator_; // owned by this class + + // Prevent copying and assignment + TF_DISALLOW_COPY_AND_ASSIGN(MklCPUAllocator); }; } // namespace tensorflow |