13#ifndef ROOFIT_BATCHCOMPUTE_ROOBATCHCOMPUTE_H
14#define ROOFIT_BATCHCOMPUTE_ROOBATCHCOMPUTE_H
126 virtual void *
cudaMalloc(
size_t) {
throw std::bad_function_call(); }
127 virtual void cudaFree(
void *) {
throw std::bad_function_call(); }
130 virtual cudaEvent_t *
newCudaEvent(
bool ) {
throw std::bad_function_call(); }
135 virtual void cudaEventRecord(cudaEvent_t *, cudaStream_t *) {
throw std::bad_function_call(); }
138 virtual void memcpyToCUDA(
void *,
const void *,
size_t, cudaStream_t * =
nullptr) {
throw std::bad_function_call(); }
139 virtual void memcpyToCPU(
void *,
const void *,
size_t, cudaStream_t * =
nullptr) {
throw std::bad_function_call(); }
size_t size(const MatrixT &matrix)
retrieve the size of a square matrix
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void input
The Kahan summation is a compensated summation algorithm, which significantly reduces numerical error...
The interface which should be implemented to provide optimised computation functions for implementati...
virtual void cudaEventRecord(cudaEvent_t *, cudaStream_t *)
virtual cudaEvent_t * newCudaEvent(bool)
virtual void compute(cudaStream_t *, Computer, RestrictArr, size_t, const VarVector &, ArgVector &)=0
virtual std::string architectureName() const =0
virtual float cudaEventElapsedTime(cudaEvent_t *, cudaEvent_t *)
virtual void * cudaMalloc(size_t)
virtual ReduceNLLOutput reduceNLL(cudaStream_t *, RooSpan< const double > probas, RooSpan< const double > weightSpan, RooSpan< const double > weights, double weightSum, RooSpan< const double > binVolumes)=0
virtual void memcpyToCPU(void *, const void *, size_t, cudaStream_t *=nullptr)
virtual double reduceSum(cudaStream_t *, InputArr input, size_t n)=0
void compute(cudaStream_t *stream, Computer comp, RestrictArr output, size_t size, const VarVector &vars)
virtual cudaStream_t * newCudaStream()
virtual void cudaStreamWaitEvent(cudaStream_t *, cudaEvent_t *)
virtual bool streamIsActive(cudaStream_t *)
virtual void cudaFree(void *)
virtual void * cudaMallocHost(size_t)
virtual void deleteCudaStream(cudaStream_t *)
virtual void deleteCudaEvent(cudaEvent_t *)
virtual void memcpyToCUDA(void *, const void *, size_t, cudaStream_t *=nullptr)
virtual Architecture architecture() const =0
virtual void cudaFreeHost(void *)
virtual ~RooBatchComputeInterface()=default
A simple container to hold a batch of data values.
Namespace for dispatching RooFit computations to various backends.
std::vector< RooSpan< const double > > VarVector
R__EXTERN RooBatchComputeInterface * dispatchCUDA
R__EXTERN RooBatchComputeInterface * dispatchCPU
This dispatch pointer points to an implementation of the compute library, provided one has been loade...
const double *__restrict InputArr
std::vector< double > ArgVector
double *__restrict RestrictArr
ROOT::Math::KahanSum< double > nllSum
std::size_t nNonPositiveValues