MCPcopy Create free account
hub / github.com/catboost/catboost / Write

Method Write

catboost/cuda/cuda_lib/cuda_kernel_buffer.h:159–169  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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();

Callers

nothing calls this directly

Calls 4

GetMethod · 0.95
AsyncWriteFunction · 0.85
sizeMethod · 0.45
SynchronizeMethod · 0.45

Tested by

no test coverage detected