This class overrides some RooBatchComputeInterface functions, for the purpose of providing a CPU specific implementation of the library.
Definition at line 46 of file RooBatchCompute.cxx.
Public Member Functions | |
RooBatchComputeClass () | |
Architecture | architecture () const override |
std::string | architectureName () const override |
void | compute (cudaStream_t *, Computer computer, RestrictArr output, size_t nEvents, const VarVector &vars, ArgVector &extraArgs) override |
Compute multiple values using optimized functions. | |
ReduceNLLOutput | reduceNLL (cudaStream_t *, RooSpan< const double > probas, RooSpan< const double > weightSpan, RooSpan< const double > weights, double weightSum, RooSpan< const double > binVolumes) override |
double | reduceSum (cudaStream_t *, InputArr input, size_t n) override |
Return the sum of an input array. | |
Public Member Functions inherited from RooBatchCompute::RooBatchComputeInterface | |
virtual | ~RooBatchComputeInterface ()=default |
void | compute (cudaStream_t *stream, Computer comp, RestrictArr output, size_t size, const VarVector &vars) |
virtual float | cudaEventElapsedTime (cudaEvent_t *, cudaEvent_t *) |
virtual void | cudaEventRecord (cudaEvent_t *, cudaStream_t *) |
virtual void | cudaFree (void *) |
virtual void | cudaFreeHost (void *) |
virtual void * | cudaMalloc (size_t) |
virtual void * | cudaMallocHost (size_t) |
virtual void | cudaStreamWaitEvent (cudaStream_t *, cudaEvent_t *) |
virtual void | deleteCudaEvent (cudaEvent_t *) |
virtual void | deleteCudaStream (cudaStream_t *) |
virtual void | memcpyToCPU (void *, const void *, size_t, cudaStream_t *=nullptr) |
virtual void | memcpyToCUDA (void *, const void *, size_t, cudaStream_t *=nullptr) |
virtual cudaEvent_t * | newCudaEvent (bool) |
virtual cudaStream_t * | newCudaStream () |
virtual bool | streamIsActive (cudaStream_t *) |
Private Attributes | |
const std::vector< void(*)(BatchesHandle)> | _computeFunctions |
|
inline |
Definition at line 51 of file RooBatchCompute.cxx.
|
inlineoverridevirtual |
Implements RooBatchCompute::RooBatchComputeInterface.
Definition at line 57 of file RooBatchCompute.cxx.
|
inlineoverridevirtual |
Implements RooBatchCompute::RooBatchComputeInterface.
Definition at line 58 of file RooBatchCompute.cxx.
|
inlineoverridevirtual |
Compute multiple values using optimized functions.
This method creates a Batches object and passes it to the correct compute function. In case Implicit Multithreading is enabled, the events to be processed are equally divided among the tasks to be generated and computed in parallel.
computer | An enum specifying the compute function to be used. |
output | The array where the computation results are stored. |
nEvents | The number of events to be processed. |
vars | A std::vector containing pointers to the variables involved in the computation. |
extraArgs | An optional std::vector containing extra double values that may participate in the computation. |
Implements RooBatchCompute::RooBatchComputeInterface.
Definition at line 81 of file RooBatchCompute.cxx.
|
overridevirtual |
Implements RooBatchCompute::RooBatchComputeInterface.
Definition at line 175 of file RooBatchCompute.cxx.
|
overridevirtual |
Return the sum of an input array.
Implements RooBatchCompute::RooBatchComputeInterface.
Definition at line 170 of file RooBatchCompute.cxx.
|
private |
Definition at line 48 of file RooBatchCompute.cxx.