From fca27350eb19b34260a22c04355619b9782eeedd Mon Sep 17 00:00:00 2001 From: Benoit Steiner Date: Wed, 30 Nov 2016 20:45:20 -0800 Subject: Added the deallocate_all() method back --- unsupported/Eigen/CXX11/src/Tensor/TensorDeviceSycl.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'unsupported/Eigen/CXX11/src/Tensor/TensorDeviceSycl.h') diff --git a/unsupported/Eigen/CXX11/src/Tensor/TensorDeviceSycl.h b/unsupported/Eigen/CXX11/src/Tensor/TensorDeviceSycl.h index 61eaeab5d..3d53b40ec 100644 --- a/unsupported/Eigen/CXX11/src/Tensor/TensorDeviceSycl.h +++ b/unsupported/Eigen/CXX11/src/Tensor/TensorDeviceSycl.h @@ -92,6 +92,11 @@ struct QueueInterface { } } + EIGEN_STRONG_INLINE void deallocate_all() const { + std::lock_guard lock(mutex_); + buffer_map.clear(); + } + EIGEN_STRONG_INLINE std::map>::iterator find_buffer(const void* ptr) const { std::lock_guard lock(mutex_); auto it1 = buffer_map.find(static_cast(ptr)); -- cgit v1.2.3