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

Method ConstDeviceView

catboost/cuda/cuda_lib/cuda_buffer.h:237–247  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

235 }
236
237 TCudaBuffer<const T, TSingleMapping, Type> ConstDeviceView(ui32 devId) const {
238 TCudaBuffer<const T, TSingleMapping, Type> buffer;
239 const auto devSlice = Mapping.DeviceSlice(devId);
240 buffer.Mapping = TSingleMapping(devId, devSlice.Size(), Mapping.SingleObjectSize());
241 if (Buffers.at(devId).NotEmpty()) {
242 buffer.Buffers.at(devId) = Buffers.at(devId).ShiftedConstBuffer(Mapping.DeviceMemoryOffset(devId, devSlice));
243 }
244 buffer.IsSliceView = true;
245 buffer.ColumnCount = ColumnCount;
246 return buffer;
247 }
248
249 TCudaBuffer<const T, TMapping, Type> AsConstBuf() const {
250 TCudaBuffer<const T, TMapping, Type> buffer;

Callers 1

UpdateBestSplitMethod · 0.80

Calls 8

SingleObjectSizeMethod · 0.80
ShiftedConstBufferMethod · 0.80
DeviceMemoryOffsetMethod · 0.80
TSingleMappingClass · 0.70
DeviceSliceMethod · 0.45
SizeMethod · 0.45
NotEmptyMethod · 0.45
atMethod · 0.45

Tested by

no test coverage detected