| 22 | } |
| 23 | |
| 24 | void TMakeLinearSystemKernel::Run(const TCudaStream& stream) const { |
| 25 | const ui32 systemSize = LinearSystem.ObjectSize(); |
| 26 | const ui32 rowSize = GetRowSizeFromLinearSystemSize(systemSize); |
| 27 | CB_ENSURE(rowSize > 1, systemSize); |
| 28 | const ui32 leavesCount = rowSize / 2; |
| 29 | |
| 30 | CB_ENSURE(systemSize == (rowSize + rowSize * (rowSize + 1) / 2)); |
| 31 | CB_ENSURE(BlockFeaturesSlice.Size() <= HistogramLineSize); |
| 32 | CB_ENSURE(BlockFeaturesSlice.Size() == LinearSystem.ObjectCount()); |
| 33 | const bool useWeights = PointwiseHistogram.ObjectSize() == 2; |
| 34 | |
| 35 | NKernel::MakePointwiseDerivatives(PointwiseHistogram.Get(), HistogramLineSize, |
| 36 | PartStats.Get(), |
| 37 | useWeights, |
| 38 | rowSize, |
| 39 | BlockFeaturesSlice.Left, BlockFeaturesSlice.Size(), |
| 40 | LinearSystem.Get(), stream.GetStream()); |
| 41 | |
| 42 | NKernel::MakePairwiseDerivatives(PairwiseHistogram.Get(), |
| 43 | leavesCount, |
| 44 | BlockFeaturesSlice.Left, BlockFeaturesSlice.Size(), |
| 45 | HistogramLineSize, |
| 46 | LinearSystem.Get(), |
| 47 | stream.GetStream()); |
| 48 | } |
| 49 | |
| 50 | void TExtractMatricesAndTargetsKernel::Run(const TCudaStream& stream) const { |
| 51 | const ui32 rowSize = GetRowSizeFromLinearSystemSize(LinearSystem.ObjectSize()); |
no test coverage detected