aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/core/common_runtime/mkl_cpu_allocator.h
diff options
context:
space:
mode:
authorGravatar Niranjan Hasabnis <niranjan.hasabnis@intel.com>2018-09-05 16:39:36 -0700
committerGravatar GitHub <noreply@github.com>2018-09-05 16:39:36 -0700
commit6c3171d7911df621f8800050d244e08d5197c0c5 (patch)
tree46a4cbe4644934fef0ea56d2b0f2d86a850d1ef7 /tensorflow/core/common_runtime/mkl_cpu_allocator.h
parent352d2a0a2a099ae830855c94a30f9ea657556aef (diff)
parent2c8bc1587e9480a44c10146d0e9472c1d6f9c7d7 (diff)
Merge branch 'master' into nhasabni/memallocator
Diffstat (limited to 'tensorflow/core/common_runtime/mkl_cpu_allocator.h')
-rw-r--r--tensorflow/core/common_runtime/mkl_cpu_allocator.h5
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 200ca57a9a..b80d507774 100644
--- a/tensorflow/core/common_runtime/mkl_cpu_allocator.h
+++ b/tensorflow/core/common_runtime/mkl_cpu_allocator.h
@@ -311,12 +311,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
@@ -336,6 +338,9 @@ class MklCPUAllocator : public VisitableAllocator {
// Size in bytes that defines the upper-bound for "small" allocations.
// Any allocation below this threshold is "small" allocation.
static constexpr const size_t kSmallAllocationsThreshold = 4096;
+
+ // Prevent copying and assignment
+ TF_DISALLOW_COPY_AND_ASSIGN(MklCPUAllocator);
};
} // namespace tensorflow