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

Method DeviceMemoryOffset

catboost/cuda/cuda_lib/mapping.h:53–61  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

51 }
52
53 ui64 DeviceMemoryOffset(ui64 dev, const TSlice& slice) const {
54 const TSlice deviceSlice = static_cast<const TImpl*>(this)->DeviceSlice(dev);
55 CB_ENSURE(TSlice::Intersection(slice, deviceSlice) == slice);
56 const ui64 devSize = slice.Size() != 0u ? (slice.Left - deviceSlice.Left) : 0;
57 if (devSize != 0u) {
58 CB_ENSURE(slice.Left >= deviceSlice.Left, slice << " " << deviceSlice);
59 }
60 return devSize * SingleObjectSize();
61 }
62
63 TDevicesList NonEmptyDevices() const {
64 TDevicesListBuilder builder;

Callers 10

SliceViewMethod · 0.80
ColumnsViewMethod · 0.80
DeviceViewMethod · 0.80
ConstDeviceViewMethod · 0.80
StripeViewFunction · 0.80
ParallelStripeViewFunction · 0.80
BroadcastSliceMethod · 0.80
RunMethod · 0.80
WriteMethod · 0.80
SubmitReadAsyncMethod · 0.80

Calls 2

DeviceSliceMethod · 0.45
SizeMethod · 0.45

Tested by

no test coverage detected