mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-08-11 11:19:02 +08:00
Correcting the position of allocate_temp/deallocate_temp in TensorDeviceGpu.h
This commit is contained in:
parent
d7a8414848
commit
c6a5c70712
@ -159,13 +159,6 @@ class GpuStreamDevice : public StreamInterface {
|
|||||||
err = gpuFree(buffer);
|
err = gpuFree(buffer);
|
||||||
gpu_assert(err == gpuSuccess);
|
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 {
|
virtual void* scratchpad() const {
|
||||||
if (scratch_ == NULL) {
|
if (scratch_ == NULL) {
|
||||||
@ -214,6 +207,15 @@ struct GpuDevice {
|
|||||||
stream_->deallocate(buffer);
|
stream_->deallocate(buffer);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
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);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
EIGEN_STRONG_INLINE void* scratchpad() const {
|
EIGEN_STRONG_INLINE void* scratchpad() const {
|
||||||
return stream_->scratchpad();
|
return stream_->scratchpad();
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user