This class overrides some RooBatchComputeInterface functions, for the purpose of providing a CPU specific implementation of the library.
Definition at line 43 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, const ArgVector &extraArgs) override |
Compute multiple values using optimized functions. | |
double | sumReduce (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 |
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 48 of file RooBatchCompute.cxx.
|
inlineoverridevirtual |
Implements RooBatchCompute::RooBatchComputeInterface.
Definition at line 54 of file RooBatchCompute.cxx.
|
inlineoverridevirtual |
Implements RooBatchCompute::RooBatchComputeInterface.
Definition at line 55 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 78 of file RooBatchCompute.cxx.
|
inlineoverridevirtual |
Return the sum of an input array.
Implements RooBatchCompute::RooBatchComputeInterface.
Definition at line 139 of file RooBatchCompute.cxx.
|
private |
Definition at line 45 of file RooBatchCompute.cxx.