From d7a84148483b1a11b993c037a2cea5b43f2c052f Mon Sep 17 00:00:00 2001 From: Mehdi Goli Date: Wed, 1 Aug 2018 11:56:30 +0100 Subject: Distinguishing between internal memory allocation/deallocation from explicit user memory allocation/deallocation. --- unsupported/Eigen/CXX11/src/Tensor/TensorDeviceGpu.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'unsupported/Eigen/CXX11/src/Tensor/TensorDeviceGpu.h') diff --git a/unsupported/Eigen/CXX11/src/Tensor/TensorDeviceGpu.h b/unsupported/Eigen/CXX11/src/Tensor/TensorDeviceGpu.h index 0c036833f..48bbd5e45 100644 --- a/unsupported/Eigen/CXX11/src/Tensor/TensorDeviceGpu.h +++ b/unsupported/Eigen/CXX11/src/Tensor/TensorDeviceGpu.h @@ -159,6 +159,13 @@ class GpuStreamDevice : public StreamInterface { err = gpuFree(buffer); gpu_assert(err == gpuSuccess); } + EIGEN_STRONG_INLINE void* allocate_temp(size_t num_bytes) const { + return stream_->allocate(num_bytes); + } + + EIGEN_STRONG_INLINE void deallocate_temp(void* buffer) const { + stream_->deallocate(buffer); + } virtual void* scratchpad() const { if (scratch_ == NULL) { -- cgit v1.2.3