28# pragma warning(disable : 4251 )
51 virtual void configure(TiXmlElement *eKernel)
override;
150 UInt getNumJobs()
const;
190 virtual RangeJob *allocateRangeJobs(
size_t numJobs)
override;
191 void callOnJobRange(
const RangeJob& job);
#define AGX_DECLARE_POINTER_TYPES(type)
#define AGX_DECLARE_VECTOR_TYPES(type)
Only use as member allocated variable.
Templated value-reference.
Templated callback with one argument.
A kernel which executes on the CPU using native C/C++ code.
const RangeDispatch & getRangeDispatch() const
RangeDispatch m_rangeDispatch
CpuKernel(const agx::Name &name, RangeDispatch rangeDispatch)
RangeJob::RangeCallback RangeDispatch
virtual RangeJob * allocateRangeJobs(size_t numJobs)=0
CpuKernel(const agx::Name &name, Job::Callback serialDispatch)
static CpuKernel * load(TiXmlElement *eKernel, Device *device)
An agx::Device is an abstract representation of a device on which data can be stored and processed.
A kernel is an abstract representation of data parallel tasks.
agxData::ValueRefT< UInt > m_numWorkItems
void setCostPerElement(agx::UInt cost)
Set the per-element cost estimate.
virtual float getComputeTime()
void setNumJobsPerThread(agx::UInt numJobs)
Set the number of jobs per thread.
void setMinJobSize(agx::UInt min)
Set the minimum number of work elements per job.
virtual void parameterAddedCallback(Parameter *parameter) override
agx::UInt getMaxJobSize() const
Kernel(const agx::Name &name, agx::Device *device, const agx::Job::Callback &dispatcher)
virtual void rebind() override
agx::UInt getNumJobsPerThread() const
agx::UInt getNumWorkItems() const
agx::UInt getCostPerElement() const
void setMaxJobSize(agx::UInt max)
Set the maximum number of work elements per job.
virtual void parameterRemovedCallback(Parameter *parameter) override
virtual void preDispatch()
Explicitly set the splitting parameter.
static Kernel * load(TiXmlElement *eKernel, Device *device)
static agx::Model * ClassModel()
void locateNumWorkItemsValue()
agx::UInt getMinJobSize() const
virtual void configure(TiXmlElement *eKernel) override
std::function< void(const RangeJob &)> LambdaCallback
Vector< RangeJob > m_rangeJobs
LambdaKernel(const agx::Name &name, LambdaCallback lambdaCallback, DataSetSizeCallback sizeCallback)
Constructor.
std::function< UInt()> DataSetSizeCallback
A model is an abstract representation of the class of an agx::Object.
Representation of a name string.
A representation of a task/kernel parameter, which can be bound using a string path or explicitly to ...
A range job executes a kernel implementation on a subset of the data.
The agx namespace contains the dynamics/math part of the AGX Dynamics API.