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

Method Run

catboost/cuda/cuda_util/transform.cpp:50–77  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

48 }
49
50 void Run(const TCudaStream& stream) const {
51 const ui64 size = X.Size();
52 CB_ENSURE(X.ObjectCount() == X.Size(), "Error, we support only 1-object bin operations currently");
53
54 {
55 using namespace NKernel;
56 switch (OperationType) {
57 case EBinOpType::AddVec:
58 AddVector<T>(X.Get(), Y.Get(), size, stream.GetStream());
59 break;
60 case EBinOpType::AddConst:
61 AddVector<T>(X.Get(), ConstY, size, stream.GetStream());
62 break;
63 case EBinOpType::SubVec:
64 SubtractVector<T>(X.Get(), Y.Get(), size, stream.GetStream());
65 break;
66 case EBinOpType::MulVec:
67 MultiplyVector<T>(X.Get(), Y.Get(), size, stream.GetStream());
68 break;
69 case EBinOpType::MulConst:
70 MultiplyVector<T>(X.Get(), ConstY, size, stream.GetStream());
71 break;
72 case EBinOpType::DivVec:
73 DivideVector<T>(X.Get(), Y.Get(), size, SkipZeroesOnDivide, stream.GetStream());
74 break;
75 }
76 }
77 }
78
79 Y_SAVELOAD_DEFINE(X, Y, ConstY, OperationType);
80 };

Callers

nothing calls this directly

Calls 4

SizeMethod · 0.45
ObjectCountMethod · 0.45
GetMethod · 0.45
GetStreamMethod · 0.45

Tested by

no test coverage detected