17#ifndef ROOFIT_ROOFITCORE_RUNCONTEXT_H
18#define ROOFIT_ROOFITCORE_RUNCONTEXT_H
53 std::map<RooFit::Detail::DataKey, RooSpan<const double>>
spans;
54 std::map<RooFit::Detail::DataKey, const double*>
spansCuda;
57 std::map<RooFit::Detail::DataKey, std::vector<double>>
ownedMemory;
size_t size(const MatrixT &matrix)
retrieve the size of a square matrix
RooAbsArg is the common abstract base class for objects that represent a value and a "shape" in RooFi...
RooArgProxy is the abstract interface for RooAbsArg proxy classes.
RooArgSet is a container object that can hold multiple RooAbsArg objects.
A simple container to hold a batch of data values.
Namespace for dispatching RooFit computations to various backends.
This struct enables passing computation data around between elements of a computation graph.
const char * rangeName
If evaluation should only occur in a range, the range name can be passed here.
std::vector< double > logProbabilities
Possibility to register log probabilities.
RooSpan< double > makeBatch(const RooAbsArg *owner, std::size_t size)
Create a writable batch.
void clear()
Clear all computation results without freeing memory.
RunContext(RunContext &&)=default
Move a RunContext. All spans pointing to data retrieved from the original remain valid.
RunContext(const RunContext &)=delete
Deleted because copying the owned memory is expensive.
std::map< RooFit::Detail::DataKey, std::vector< double > > ownedMemory
Memory owned by this struct. It is associated to nodes in the computation graph using their pointers.
std::map< RooFit::Detail::DataKey, double * > ownedMemoryCuda
RooSpan< const double > getBatch(const RooArgProxy &proxy) const
std::map< RooFit::Detail::DataKey, const double * > spansCuda
RooSpan< const double > operator[](const RooAbsArg *owner) const
Retrieve a batch of data corresponding to the element passed as owner.
RunContext()
Create an empty RunContext that doesn't have access to any computation results.
std::map< RooFit::Detail::DataKey, RooSpan< const double > > spans
Once an object has computed its value(s), the span pointing to the results is registered here.
RooSpan< double > getWritableBatch(const RooAbsArg *owner)
Check if there is a writable span of data corresponding to the object passed as owner.