13#ifndef ROOFIT_BATCHCOMPUTE_ROOBATCHCOMPUTE_H
14#define ROOFIT_BATCHCOMPUTE_ROOBATCHCOMPUTE_H
70 virtual void*
cudaMalloc(
size_t) {
throw std::bad_function_call(); }
71 virtual void cudaFree(
void*) {
throw std::bad_function_call(); }
73 virtual void cudaFreeHost(
void*) {
throw std::bad_function_call(); }
74 virtual cudaEvent_t*
newCudaEvent(
bool ) {
throw std::bad_function_call(); }
76 virtual cudaStream_t*
newCudaStream() {
throw std::bad_function_call(); }
78 virtual bool streamIsActive(cudaStream_t*) {
throw std::bad_function_call(); }
79 virtual void cudaEventRecord(cudaEvent_t*, cudaStream_t*) {
throw std::bad_function_call(); }
82 virtual void memcpyToCUDA(
void*,
const void*,
size_t, cudaStream_t* =
nullptr) {
throw std::bad_function_call(); }
83 virtual void memcpyToCPU (
void*,
const void*,
size_t, cudaStream_t* =
nullptr) {
throw std::bad_function_call(); }
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 &, const ArgVector &={})=0
virtual std::string architectureName() const =0
virtual float cudaEventElapsedTime(cudaEvent_t *, cudaEvent_t *)
virtual void * cudaMalloc(size_t)
virtual void memcpyToCPU(void *, const void *, size_t, cudaStream_t *=nullptr)
virtual double sumReduce(cudaStream_t *, InputArr input, size_t n)=0
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
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