aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/stream_executor/device_memory.h
diff options
context:
space:
mode:
authorGravatar A. Unique TensorFlower <gardener@tensorflow.org>2017-01-30 16:27:43 -0800
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2017-01-30 16:46:54 -0800
commitb4fa4ad13831174f2276f0b382e06a7d5c42a7e7 (patch)
tree81a658edb4c4a8d5f9c3b75c1968daed90619cd5 /tensorflow/stream_executor/device_memory.h
parent6788e17e80173ca7b30df9df5a0f8e591c630b14 (diff)
Remove Eigen/Core includes from public SE headers
This gives the Eigen headers the chance to define the macro EIGEN_USE_GPU in the proper places. Change: 146055230
Diffstat (limited to 'tensorflow/stream_executor/device_memory.h')
-rw-r--r--tensorflow/stream_executor/device_memory.h6
1 files changed, 2 insertions, 4 deletions
diff --git a/tensorflow/stream_executor/device_memory.h b/tensorflow/stream_executor/device_memory.h
index 47bd0b0c38..4c92b7dc78 100644
--- a/tensorflow/stream_executor/device_memory.h
+++ b/tensorflow/stream_executor/device_memory.h
@@ -119,11 +119,9 @@ class DeviceMemory final : public DeviceMemoryBase {
: DeviceMemoryBase(const_cast<DeviceMemoryBase &>(other).opaque(),
other.size(), other.is_sub_buffer()) {}
- static constexpr size_t kElemSize = sizeof(ElemT);
-
// Returns the number of elements of type ElemT that constitute this
// allocation.
- uint64 ElementCount() const { return size() / kElemSize; }
+ uint64 ElementCount() const { return size() / sizeof(ElemT); }
// Returns whether this is a single-element allocation.
bool IsScalar() const { return ElementCount() == 1; }
@@ -140,7 +138,7 @@ class DeviceMemory final : public DeviceMemoryBase {
void ResetFromByteSize(void *opaque, uint64 bytes) {
// TODO(leary) when NVCC is eliminated we can add this check (and the
// logging include it requires).
- // CHECK_EQ(0, bytes % kElemSize);
+ // CHECK_EQ(0, bytes % sizeof(ElemT));
DeviceMemoryBase::Reset(opaque, bytes);
}