aboutsummaryrefslogtreecommitdiffhomepage
path: root/unsupported/Eigen/CXX11/src/Tensor/TensorDeviceSycl.h
diff options
context:
space:
mode:
authorGravatar Benoit Steiner <benoit.steiner.goog@gmail.com>2016-11-30 20:45:20 -0800
committerGravatar Benoit Steiner <benoit.steiner.goog@gmail.com>2016-11-30 20:45:20 -0800
commitfca27350eb19b34260a22c04355619b9782eeedd (patch)
tree62c03d20f6a8b66a3bb5700f2ba0bf4e2ec80948 /unsupported/Eigen/CXX11/src/Tensor/TensorDeviceSycl.h
parente633a8371f0e2785c278f0e0570434f70d8a1b55 (diff)
Added the deallocate_all() method back
Diffstat (limited to 'unsupported/Eigen/CXX11/src/Tensor/TensorDeviceSycl.h')
-rw-r--r--unsupported/Eigen/CXX11/src/Tensor/TensorDeviceSycl.h5
1 files changed, 5 insertions, 0 deletions
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<std::mutex> lock(mutex_);
+ buffer_map.clear();
+ }
+
EIGEN_STRONG_INLINE std::map<const uint8_t *, cl::sycl::buffer<uint8_t,1>>::iterator find_buffer(const void* ptr) const {
std::lock_guard<std::mutex> lock(mutex_);
auto it1 = buffer_map.find(static_cast<const uint8_t*>(ptr));