| 157 | } |
| 158 | |
| 159 | void Write(const TVector<T>& data, const TCudaStream& stream) const { |
| 160 | if (Type == EPtrType::CudaHost) { |
| 161 | T* Dst = this->Get(); |
| 162 | for (ui32 i = 0; i < data.size(); ++i) { |
| 163 | Dst[i] = data[i]; |
| 164 | } |
| 165 | } else { |
| 166 | AsyncWrite(data, stream); |
| 167 | stream.Synchronize(); |
| 168 | } |
| 169 | } |
| 170 | |
| 171 | TVector<std::remove_const_t<T>> Read(const TCudaStream& stream) const { |
| 172 | const ui64 size = Size(); |
nothing calls this directly
no test coverage detected