Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
RooBatchCompute.cu File Reference
#include "RooBatchCompute.h"
#include "RooNaNPacker.h"
#include "Batches.h"
#include "CudaInterface.h"
#include <algorithm>
#include <array>
#include <cassert>
#include <cstring>
#include <functional>
#include <map>
#include <queue>
#include <unordered_map>
#include <vector>
Include dependency graph for RooBatchCompute.cu:

Classes

class  RooBatchCompute::CUDA::RooBatchComputeClass
 This class overrides some RooBatchComputeInterface functions, for the purpose of providing a cuda specific implementation of the library. More...
 

Namespaces

namespace  RooBatchCompute
 Namespace for dispatching RooFit computations to various backends.
 
namespace  RooBatchCompute::CUDA
 

Functions

std::vector< void(*)(Batches &)> RooBatchCompute::CUDA::getFunctions ()
 Returns a std::vector of pointers to the compute functions in this file.
 
__global__ void RooBatchCompute::CUDA::kahanSum (const double *__restrict__ input, const double *__restrict__ carries, size_t n, double *__restrict__ result, bool nll)
 
__device__ void RooBatchCompute::CUDA::kahanSumReduction (double *shared, size_t n, double *__restrict__ result, int carry_index)
 
__device__ void RooBatchCompute::CUDA::kahanSumUpdate (double &sum, double &carry, double a, double otherCarry)
 
__global__ void RooBatchCompute::CUDA::nllSumKernel (const double *__restrict__ probas, const double *__restrict__ weights, const double *__restrict__ offsetProbas, size_t nProbas, double scalarProba, size_t nWeights, double *__restrict__ result, double *__restrict__ stats)
 Computes the negative log likelihood sum with the same semantics as the CPU implementation of RooBatchComputeInterface::reduceNLL(): zero-weight events are skipped, and evaluation problems are counted and accumulated into a "badness" value that the host can pack into a NaN for the error recovery in the minimizer.
 

Variables

constexpr int RooBatchCompute::CUDA::blockSize = 512
 
static RooBatchComputeClass RooBatchCompute::CUDA::computeObj
 Static object to trigger the constructor which overwrites the dispatch pointer.
 

Variable Documentation

◆ _arr

CudaInterface::PinnedHostArray<double> _arr
private

Definition at line 643 of file RooBatchCompute.cu.

◆ _cudaStream

CudaInterface::CudaStream* _cudaStream = nullptr
private

Definition at line 707 of file RooBatchCompute.cu.

◆ _deferredCursor

std::size_t _deferredCursor = 0
private

Definition at line 225 of file RooBatchCompute.cu.

◆ _deferredSlots

std::vector<DeferredSlot> _deferredSlots
private

Definition at line 224 of file RooBatchCompute.cu.

◆ _gpuBuffer

GPUBufferContainer _gpuBuffer
private

Definition at line 706 of file RooBatchCompute.cu.

◆ _lastAccess

LastAccessType _lastAccess = LastAccessType::CPU_READ
mutableprivate

Definition at line 708 of file RooBatchCompute.cu.

◆ _next

std::size_t _next = 0
private

Definition at line 223 of file RooBatchCompute.cu.

◆ _queue

Queue& _queue
private

Definition at line 741 of file RooBatchCompute.cu.

◆ _queuesMaps

std::unique_ptr<BufferQueuesMaps> _queuesMaps
private

Definition at line 781 of file RooBatchCompute.cu.

◆ _slots

std::array<Slot, 64> _slots
private

Definition at line 222 of file RooBatchCompute.cu.

◆ _val

double _val
private

Definition at line 584 of file RooBatchCompute.cu.

◆ _vec

std::unique_ptr<Container> _vec
private

Definition at line 612 of file RooBatchCompute.cu.

◆ capacity

std::size_t capacity = 0

Definition at line 105 of file RooBatchCompute.cu.

◆ cpuBufferQueuesMap

std::map<std::size_t, CPUBuffer::Queue> cpuBufferQueuesMap

Definition at line 751 of file RooBatchCompute.cu.

◆ device

char* device = nullptr

Definition at line 104 of file RooBatchCompute.cu.

◆ dst

double* dst = nullptr

Definition at line 162 of file RooBatchCompute.cu.

◆ event

cudaEvent_t event = nullptr

Definition at line 106 of file RooBatchCompute.cu.

◆ gpuBufferQueuesMap

std::map<std::size_t, GPUBuffer::Queue> gpuBufferQueuesMap

Definition at line 752 of file RooBatchCompute.cu.

◆ host

char* host = nullptr

Definition at line 103 of file RooBatchCompute.cu.

◆ inFlight

bool inFlight = false

Definition at line 107 of file RooBatchCompute.cu.

◆ nPending

std::size_t nPending = 0

Definition at line 163 of file RooBatchCompute.cu.

◆ pinnedBufferQueuesMap

std::map<std::size_t, PinnedBuffer::Queue> pinnedBufferQueuesMap

Definition at line 753 of file RooBatchCompute.cu.

◆ scalarBufferQueuesMap

std::map<std::size_t, ScalarBuffer::Queue> scalarBufferQueuesMap

Definition at line 750 of file RooBatchCompute.cu.