aboutsummaryrefslogtreecommitdiffhomepage
path: root/unsupported/Eigen/CXX11/src/Tensor/TensorDeviceGpu.h
diff options
context:
space:
mode:
authorGravatar Mehdi Goli <mehdi.goli@codeplay.com>2018-08-01 11:56:30 +0100
committerGravatar Mehdi Goli <mehdi.goli@codeplay.com>2018-08-01 11:56:30 +0100
commitd7a84148483b1a11b993c037a2cea5b43f2c052f (patch)
tree6c61129700b4935e3e40299d2d7f3d44a731a24c /unsupported/Eigen/CXX11/src/Tensor/TensorDeviceGpu.h
parentedf46bd7a27ef1088efc2116196c088d59d22b4a (diff)
Distinguishing between internal memory allocation/deallocation from explicit user memory allocation/deallocation.
Diffstat (limited to 'unsupported/Eigen/CXX11/src/Tensor/TensorDeviceGpu.h')
-rw-r--r--unsupported/Eigen/CXX11/src/Tensor/TensorDeviceGpu.h7
1 files changed, 7 insertions, 0 deletions
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) {