AGX Dynamics  2.37.2.0
Task.h
Go to the documentation of this file.
1 /*
2 Copyright 2007-2024. Algoryx Simulation AB.
3 
4 All AGX source code, intellectual property, documentation, sample code,
5 tutorials, scene files and technical white papers, are copyrighted, proprietary
6 and confidential material of Algoryx Simulation AB. You may not download, read,
7 store, distribute, publish, copy or otherwise disseminate, use or expose this
8 material unless having a written signed agreement with Algoryx Simulation AB, or having been
9 advised so by Algoryx Simulation AB for a time limited evaluation, or having purchased a
10 valid commercial license from Algoryx Simulation AB.
11 
12 Algoryx Simulation AB disclaims all responsibilities for loss or damage caused
13 from using this software, unless otherwise stated in written agreements with
14 Algoryx Simulation AB.
15 */
16 
17 #ifndef AGX_TASK_H
18 #define AGX_TASK_H
19 
20 #include <agx/Job.h>
21 #include <agx/Device.h>
22 #include <agx/HashSet.h>
23 #include <agx/Component.h>
24 #include <agx/Parameter.h>
25 #include <agx/Referenced.h>
26 #include <agx/String.h>
27 #include <agx/Vector.h>
28 #include <agx/Statistics.h>
29 
30 #include <agxData/Buffer.h>
31 #include <agx/ParameterBinding.h>
32 
33 
34 namespace agx
35 {
36  class TiXmlElement;
37  class Solver;
38  class Thread;
39  class Clock;
40  class TaskTimingReportHandle;
41 
47 
48 
49 
50 
57  class AGXCORE_EXPORT Task : public Component
58  {
59  public:
60  static agx::Model *ClassModel();
61 
62  // Allow concatenated syntax: path.to.tasks:implementationName
63  static Task* load(const String& path, Device* device = CpuDevice::instance());
64  static Task* load(const char* path, Device* device = CpuDevice::instance());
65 
66  static Task* load(TiXmlElement *eTask, Device* device);
67  static Task* load(const Path& path, Device* device = CpuDevice::instance());
68  // static Task *load(const String& path, Device *device, const String& implementation);
69  static Task* load(const Path& path, const Name& implementation, Device* device = CpuDevice::instance());
70 
71  static Task* load(const Path& path, const Name& implementation, const agx::ParameterBindingVector& parameterList, Device* device = CpuDevice::instance());
72  static Task* load(const Path& path, const Name& implementation, agx::ParameterBindingVector& parameterList, bool allowFormatPromotions, Device* device = CpuDevice::instance());
73 
74  virtual void configure(TiXmlElement* eTask) override;
75  void configure(TiXmlElement* eTask, bool loadParameters);
76 
77  void save(agx::TiXmlElement* parent) const override;
78 
80  {
83  PROFILING_FULL
84  };
85 
86  static void setProfilingMode(ProfilingMode mode);
87  static ProfilingMode getProfilingMode();
88 
89  public:
92 
94  ExecutionEvent startEvent;
95 
97  ExecutionEvent completionEvent;
98 
100  ParameterEvent addParameterEvent;
101 
103  ParameterEvent removeParameterEvent;
104 
107 
108  public:
109 
112  NO_EVENTS = 0,
113 
114  // Bits set to indicate events that does not imply a failed match.
115  EMPTY_BINDING_LIST = (1<<0), // Matched by default since the list of supplied parameters was empty.
116  PARAMETER_VALID = (1<<1), // A parameter was valid and therefore didn't need a new binding.
117  PARAMETER_NOT_REQUIRED = (1<<2), // A parameter was marked as not required and therefore didn't need a new binding.
118  PARAMETER_BOUND = (1<<3), // A parameter was already bound and therefore didn't need a new binding.
119  PARAMETER_HAS_BOUND_PATH = (1<<4), // A parameter has a bind path already and therefore didn't need a new binding.
120  FORMATS_MATCH = (1<<5), // A parameter and a new binding had the same format.
121  NEED_DEVICE_TRANSFORM = (1<<6), // The device has requested to get data of the new binding type in the format of the parameter. Transformation will be required.
122 
123  // Bits set to signal a failed match.
124  MISSING_BINDING = (1<<7), // When a task has a parameter that needs a new binding but didn't get one.
125  BINDING_LACKS_TYPE = (1<<8), // A new binding didn't have a type.
126  FORMATS_MISSMATCH = (1<<9), // The format of a new binding was incompatible with the parameter format.
127  EXTRA_BINDING = (1<<10), // There were new bindings that didn't have a corresponding parameter.
128  INCONSISTEN_PARAMETERS = (1<<11), // Don't think this can ever happen. Means that a loop over all parameters didn't visit all of them.
129 
130  // Mask of all events that doesn't imply a failed match.
131  // Note that the NO_MATCH_MASK test has precendence, so match-testing should only use that.
132  MATCH_MASK = EMPTY_BINDING_LIST | PARAMETER_VALID | PARAMETER_NOT_REQUIRED | PARAMETER_BOUND | PARAMETER_HAS_BOUND_PATH | FORMATS_MATCH | NEED_DEVICE_TRANSFORM,
133 
134  // The following is the union of all events signaling a failed parameter match. Bitwise and between this mask and a ParameterMatch is == 0 when there is a match.
135  NO_MATCH_MASK = MISSING_BINDING | BINDING_LACKS_TYPE | FORMATS_MISSMATCH | EXTRA_BINDING | INCONSISTEN_PARAMETERS
136  };
137  static void printParameterMatch( UInt32 parameterMatch );
138 
139  public:
144  Task(const agx::Name& name, agx::Device *device = agx::CpuDevice::instance());
145 
149  void execute();
150 
154  virtual void wait();
155 
159  bool isRunning() const;
160 
164  void setEnable(bool flag);
165 
169  bool isEnabled() const;
170 
174  virtual void setTargetThread(agx::Thread *thread);
175 
179  agx::Thread *getTargetThread();
180 
184  agx::Thread *getDispatchThread();
185 
189  void addParameter(agx::Parameter *parameter);
190  void addParameter(agx::Parameter *parameter, size_t index);
191 
195  void removeParameter(agx::Parameter *parameter);
196  void removeParameter(size_t index);
197 
201  const agx::ParameterPtrVector& getParameters() const;
202 
206  agx::Parameter *getParameter(const agx::Name& name);
207  const agx::Parameter *getParameter(const agx::Name& name) const;
208 
209  // ScalarParameter
210  agx::ScalarParameter *getScalarParameter(const agx::Name& name);
211  const agx::ScalarParameter *getScalarParameter(const agx::Name& name) const;
212 
213  // ArrayParameter
214  agx::ArrayParameter *getArrayParameter(const agx::Name& name);
215  const agx::ArrayParameter *getArrayParameter(const agx::Name& name) const;
216 
217  // PointerParameter
218  agx::PointerParameter *getPointerParameter(const agx::Name& name);
219  const agx::PointerParameter *getPointerParameter(const agx::Name& name) const;
220 
224  agx::Parameter *getParameter(size_t index);
225  const agx::Parameter *getParameter(size_t index) const;
226 
227 
228  UInt32 matchParameters(const ParameterTable& bindings);
229  UInt32 matchParameters(const agx::ParameterBindingVector& bindings);
230  UInt32 matchParameters(agx::ParameterBindingVector& bindings, bool allowFormatPromotions);
231 
235  agx::TaskGroup *getGroup();
236  const agx::TaskGroup *getGroup() const;
237 
238 
242  const agx::TaskPtrVector& getParents() const;
243 
247  const agx::TaskPtrVector& getChildren() const;
248 
249 
250 
255  void addDependency(agx::Task *parent);
256  void addDependency(const agx::Path& path);
257  void addDependencies(const agx::String& paths); // Semi-colon separated
258 
263  void removeDependency(agx::Task* parent);
264 
265  // Search recursively for a parent dependency
266  bool hasDependency(agx::Task *parent) const;
267 
271  void replace(agx::Task *other);
272 
273  void traverse(const Callback1<Task *>& callback, bool breadthFirst = true);
274 
275  void print() const;
276  void print(std::ostream& stream) const;
277  void printBindings();
278  void printBindings(std::ostream& stream);
279 
280  virtual void setContext( agx::Object* context ) override;
281  void setModel(agx::Model *model);
282 
283  public:
287  virtual agx::Job *getPreJob() = 0;
288 
292  virtual agx::Job *getPostJob() = 0;
293 
294 
295 
296  public:
297  virtual void rebind() override;
298 
299  void addTriggerPath(const agx::Path& path);
300  void addTriggerPaths(const agx::String& paths);
301  void addResolvePath(const agx::Path& path);
302  void addResolvePaths(const agx::String& paths);
303 
304  public:
305 
307 
308 
310  agx::Real32 getWallTime() const;
311 
313  agx::Real32 getOverheadTime() const;
314 
316  agx::Real32 getComputeCost() const;
317 
318  agx::Real32 getAccumulatedWallTime() const;
319  agx::Real32 getAccumulatedOverheadTime() const;
320  agx::Real32 getAccumulatedComputeCost() const;
321  agx::UInt getNumAccumulationSamples() const;
322 
324  void resetAccumulationTimers(bool recursive = true);
325 
326  // private
327  void beginCallback();
328  void endCallback(agx::Real32 computeCost, agx::Real32 overheadCost = 0);
329 
330  protected:
331 
332  virtual ~Task();
333 
334 
335  // void setGroup(Task *group);
336  void enableCallback(agxData::Value *enable);
337 
338  static void addConnection(Task *parent, Task *child);
339  static void removeConnection(Task *parent, Task *child);
340 
341  virtual void parameterAddedCallback(Parameter* /*parameter*/) {}
342  virtual void parameterRemovedCallback(Parameter* /*parameter*/) {}
343  virtual void subtaskAddedCallback(Task* /*subtask*/) {}
344 
345  // Must be called after the number of kernel jobs is known, during dispatch
346  void prepareGlobalResultSorting(size_t numJobs);
347 
348  protected:
349  friend class Component;
350  friend class UnresolvedTask;
351  friend class TaskManager;
352  friend class Solver;
353 
354  void init();
355 
356  // void defaultRunCallback();
357  void registerBufferReadersAndWriters();
358  void unregisterBufferReadersAndWriters();
359  void verifyParameters();
360  void disconnectFromParent(Task* ancestor);
361  void disconnectFromChild(Task* descendant);
362  void connectToParent(Task* ancestor);
363  void connectToChild(Task* descendant);
364  void dispatchBlocking(Thread *thread);
365 
366  friend class TaskGroup;
367  void setGroup(TaskGroup *group);
368 
369 
370  friend class Thread;
371  static void signalUnhandledException();
372  static bool hasUnhandledException();
373 
374 #ifndef SWIG
375  virtual Object *getResourceImpl(const Path& path, agx::Model *model) override;
376 #endif
377 
378  private:
379  bool m_enabled;
380  std::atomic<bool> m_running;
381 
382  Thread *m_targetThread;
383  Thread *m_dispatchThread;
384  Timer m_overheadTimer;
385  // Timer m_runTimer;
386  Timer m_wallTimer;
387 
388 
389 
390  // Currently not decided how task timer reporting will be handled, with internal Real32s or through Statistics.
391  // Keeping both as part of the object for now since we do not want to have to change this header file when
392  // changing the reporting strategy.
393  Real32 m_wallTime;
394  Real32 m_computeCost;
395  Real32 m_overheadTime;
396  Real32 m_accumulatedWallTime;
397  Real32 m_accumulatedComputeCost;
398  Real32 m_accumulatedOverheadTime;
399  UInt m_numAccumulations;
400 
401  TaskTimingReportHandleRef m_statisticsHandle;
402 
403 
404  TaskGroup *m_group;
405  TaskPtrVector m_parents;
406  TaskPtrVector m_children;
407 
408  ParameterPtrVector m_parameters;
409  ParameterPtrVector m_globalResultParameters;
410  agxData::Value::Event::CallbackType m_enableCallback;
411 
412  struct BindPath
413  {
414  enum Type
415  {
416  INVALID=-1,
417  DEPENDENCY,
418  RESOLVE,
419  TRIGGER
420  };
421 
422  BindPath() : type((Type)agx::InvalidIndex), binding(nullptr) {}
423  BindPath(const Path& _path, Type _type) : path(_path), type(_type), binding(nullptr) {}
424 
425  Path path;
426  Type type;
427  ObjectRef binding;
428  };
429 
430  Vector<BindPath> m_bindPaths;
431  Path m_bindContextPath;
432  ObjectObserver m_bindContext;
433 
434  AGX_DECLARE_POINTER_TYPES(DisableHelper);
435  class DisableHelper : public Referenced
436  {
437  public:
438  DisableHelper(Task *task);
439 
440  void restore();
441 
442  void registerSubtask(Task* subtask);
443  void removeSubtask(Task* subtask);
444 
445  protected:
446  virtual ~DisableHelper();
447 
448  private:
449  void emptyPre();
450  void emptyPost();
451 
452  private:
453  Task *m_task;
454  JobPtrVector m_oldPreChildren;
455  UInt32 m_oldNumPostDependencies;
456  Callback m_oldPre;
457  Callback m_oldPost;
458  };
459 
460  DisableHelperRef m_disableHelper;
461 
462  static ProfilingMode s_profilingMode;
463  };
464 
465 
470  {
471  public:
472  SerialTask(const agx::Name& name, agx::Device *device = agx::CpuDevice::instance());
473 
474  SerialTask(const agx::Name& name, const Job::Callback& runCallback, agx::Device* device = agx::CpuDevice::instance());
475 
479  void setDispatch(const Job::Callback& dispatchCallback);
480 
481 
485  virtual void run() {}
486 
487 
488  Job *getJob();
489 
490  virtual agx::Job *getPreJob() override;
491  virtual agx::Job *getPostJob() override;
492  virtual void setTargetThread(agx::Thread *thread) override;
493 
494  protected:
495  virtual ~SerialTask();
496 
497  private:
498  class SerialJob : public Job
499  {
500  public:
501  virtual ~SerialJob();
502 
503  private:
504  virtual void implementation() override;
505  };
506 
507  private:
508  SerialJob m_job;
509  };
510 
511 
516  {
517  public:
519  ParallelTask(const agx::Name& name, const agx::Job::Callback& dispatchCallback, agx::Device* device = agx::CpuDevice::instance());
520 
524  void addJob(agx::Job *job);
525 
529  void removeAllJobs();
530 
531  Job *getDispatchJob();
532 
533  void setDispatch(const agx::Job::Callback& dispatchCallback);
534 
535  virtual agx::Job *getPreJob() override;
536  virtual agx::Job *getPostJob() override;
537  virtual void setTargetThread(agx::Thread *thread) override;
538 
539  protected:
540  virtual ~ParallelTask();
541 
542  friend class Solver;
543  void endCallback();
544 
545  private:
546  class PreJob : public Job
547  {
548  public:
549  virtual ~PreJob();
550 
551  private:
552  virtual void implementation() override;
553  };
554 
555  class PostJob : public Job
556  {
557  public:
558  virtual ~PostJob();
559 
560  private:
561  virtual void implementation() override;
562  };
563 
564  class DispatchJob : public Job
565  {
566  public:
567  virtual ~DispatchJob();
568 
569  private:
570  virtual void implementation() override;
571  };
572 
573  private:
574  PreJob m_preJob;
575  PostJob m_postJob;
576  DispatchJob m_dispatchJob;
577  JobPtrVector m_jobStack;
578  Index m_jobIndexCounter;
579  };
580 
581 
586  {
587  public:
588  TaskGroup(const agx::Name& name, bool isSequential = true, agx::Device *device = agx::CpuDevice::instance());
589 
591  bool isSequential() const;
592 
593  void setSequential(bool flag);
594 
599  void addSubtask(agx::Task *subtask);
600 
602  void addSubtaskBetween(agx::Task *subtask, agx::Task *parent, agx::Task *child);
603  void addSubtaskBetween(agx::Task *subtask, const agx::String& parent, const agx::String& child);
604 
606  void addSubtaskAfter(agx::Task *subtask, agx::Task *parent);
607  void addSubtaskAfter(agx::Task *subtask, const agx::String& parent);
608 
610  void addSubtaskBefore(agx::Task *subtask, agx::Task *child);
611  void addSubtaskBefore(agx::Task *subtask, const agx::String& child);
612 
617  void removeSubtask(agx::Task *subtask);
618 
623  void removeSubtask(const agx::Name& name);
624 
628  void removeAllSubtasks();
629 
633  void serialize(bool recursive = false);
634 
638  const agx::TaskRefVector& getSubtasks() const;
639 
643  agx::Task *getSubtask(const agx::String& name, size_t index = 0);
644 
645 
646  virtual void traverse(const Callback1<Task *>& callback, bool breadthFirst = true);
647 
648  void writeDependencyDotGraph() const;
649 
650 
651  virtual agx::Job* getPreJob() override;
652  virtual agx::Job* getPostJob() override;
653  virtual void setTargetThread(agx::Thread* thread) override;
654 
655  protected:
656  virtual ~TaskGroup();
657 
658  private:
659  friend class Task;
660  void registerSubtask(Task* subtask);
661  void endCallback();
662 
663  private:
664  class PreJob : public Job
665  {
666  public:
667  virtual ~PreJob();
668 
669  private:
670  virtual void implementation() override;
671  };
672 
673  class PostJob : public Job
674  {
675  public:
676  virtual ~PostJob();
677 
678  private:
679  virtual void implementation() override;
680  };
681 
682  private:
683  friend class Solver;
684 
685  bool m_sequential;
686  PreJob m_preJob;
687  PostJob m_postJob;
688  TaskRefVector m_subtasks;
689  };
690 
691  /* Implementation */
693 
694  AGX_FORCE_INLINE bool Task::isEnabled() const { return m_enabled; }
695  AGX_FORCE_INLINE bool Task::isRunning() const { return m_running; }
697  AGX_FORCE_INLINE const TaskGroup *Task::getGroup() const { return m_group; }
698 
699 
700  AGX_FORCE_INLINE const TaskPtrVector& Task::getParents() const { return m_parents; }
701  AGX_FORCE_INLINE const TaskPtrVector& Task::getChildren() const { return m_children; }
702  AGX_FORCE_INLINE Thread *Task::getTargetThread() { return m_targetThread; }
703 
704 
705  AGX_FORCE_INLINE const ParameterPtrVector& Task::getParameters() const { return m_parameters; }
706  AGX_FORCE_INLINE Parameter *Task::getParameter(const Name& name) { return this->getObject<Parameter>(name); }
707  AGX_FORCE_INLINE const Parameter *Task::getParameter(const Name& name) const { return const_cast<Task *>(this)->getParameter(name); }
708 
709  AGX_FORCE_INLINE ScalarParameter *Task::getScalarParameter(const Name& name) { return this->getObject<ScalarParameter>(name); }
710  AGX_FORCE_INLINE const ScalarParameter *Task::getScalarParameter(const Name& name) const { return const_cast<Task *>(this)->getScalarParameter(name); }
711 
712  AGX_FORCE_INLINE ArrayParameter *Task::getArrayParameter(const Name& name) { return this->getObject<ArrayParameter>(name); }
713  AGX_FORCE_INLINE const ArrayParameter *Task::getArrayParameter(const Name& name) const { return const_cast<Task *>(this)->getArrayParameter(name); }
714 
715  AGX_FORCE_INLINE PointerParameter *Task::getPointerParameter(const Name& name) { return this->getObject<PointerParameter>(name); }
716  AGX_FORCE_INLINE const PointerParameter *Task::getPointerParameter(const Name& name) const { return const_cast<Task *>(this)->getPointerParameter(name); }
717 
718  AGX_FORCE_INLINE Parameter *Task::getParameter(size_t index) { return m_parameters[index]; }
719  AGX_FORCE_INLINE const Parameter *Task::getParameter(size_t index) const { return m_parameters[index]; }
720 
721  AGX_FORCE_INLINE Thread *Task::getDispatchThread() { return m_dispatchThread; }
722 
723  AGX_FORCE_INLINE Real32 Task::getWallTime() const { return m_wallTime; }
724  AGX_FORCE_INLINE Real32 Task::getComputeCost() const { return m_computeCost; }
725  AGX_FORCE_INLINE Real32 Task::getOverheadTime() const { return m_overheadTime; }
726  AGX_FORCE_INLINE Real32 Task::getAccumulatedWallTime() const { return m_accumulatedWallTime; }
727  AGX_FORCE_INLINE Real32 Task::getAccumulatedOverheadTime() const { return m_accumulatedOverheadTime; }
728  AGX_FORCE_INLINE Real32 Task::getAccumulatedComputeCost() const { return m_accumulatedComputeCost; }
729  AGX_FORCE_INLINE UInt Task::getNumAccumulationSamples() const { return m_numAccumulations; }
730 
731 
732 
733  // TaskGroup
734  AGX_FORCE_INLINE bool TaskGroup::isSequential() const { return m_sequential; }
735  AGX_FORCE_INLINE const TaskRefVector& TaskGroup::getSubtasks() const { return m_subtasks; }
736 
737 
738 }
739 
740 #endif /* _AGX_TASK_H_ */
agx::Thread * getDispatchThread()
Definition: Task.h:721
Representation of a path, a list of name components.
Definition: Path.h:32
ParallelTask.
Definition: Task.h:515
ProfilingMode
Definition: Task.h:79
float Real32
Definition: Real.h:44
void AGXPHYSICS_EXPORT init()
Initialize AGX Dynamics API including thread resources and must be executed before using the AGX API...
virtual void parameterRemovedCallback(Parameter *)
Definition: Task.h:342
agx::Real32 getAccumulatedComputeCost() const
Definition: Task.h:728
ParameterEvent addParameterEvent
Triggered when a parameter is added.
Definition: Task.h:100
const agx::TaskRefVector & getSubtasks() const
Definition: Task.h:735
agx::Thread is a representation of an OS specific implementation of a computational thread...
Definition: Thread.h:198
agx::UInt getNumAccumulationSamples() const
Definition: Task.h:729
ExecutionEvent startEvent
Triggered before the task begins.
Definition: Task.h:94
A component is an object containing other objects, enabling hierarchical structuring.
Definition: Component.h:38
A model is an abstract representation of the class of an agx::Object.
Definition: Model.h:40
Abstract representation of a value.
Definition: Value.h:48
An abstract job/workblock representation, which allows work threads to execute arbitrary tasks...
Definition: Job.h:62
agx::Real32 getOverheadTime() const
Definition: Task.h:725
Generalized callback, using std::function.
Definition: Callback.h:53
AGXCORE_EXPORT const InvalidIndexStruct InvalidIndex
#define AGX_DECLARE_POINTER_TYPES(type)
Definition: Referenced.h:254
agx::ScalarParameter * getScalarParameter(const agx::Name &name)
Definition: Task.h:709
A representation of a generic task.
Definition: Task.h:57
Representation of a name string.
Definition: Name.h:32
#define AGX_FORCE_INLINE
Definition: Object.h:59
The Timer class permits timing execution speed with the same refinement as the built in hardware cloc...
Definition: Timer.h:74
ParameterMatch
Used for tracing mismatched parameter bindings.
Definition: Task.h:111
agx::TaskGroup * getGroup()
Definition: Task.h:696
SerialTask.
Definition: Task.h:469
Event2< Task *, Parameter * > ParameterEvent
Definition: Task.h:91
const agx::TaskPtrVector & getParents() const
Definition: Task.h:700
Base class providing referencing counted objects.
Definition: Referenced.h:119
static ProfilingMode getProfilingMode()
Definition: Task.h:692
const agx::TaskPtrVector & getChildren() const
Definition: Task.h:701
static CpuDevice * instance()
agx::Real32 getAccumulatedOverheadTime() const
Definition: Task.h:727
uint32_t UInt
Definition: Integer.h:34
Vector containing &#39;raw&#39; data.
Definition: Vector.h:245
The agx namespace contains the dynamics/math part of the AGX Dynamics API.
virtual void subtaskAddedCallback(Task *)
Definition: Task.h:343
Pointer parameter.
Definition: Parameter.h:434
Templated callback with one argument.
Definition: Callback.h:100
TaskGroup.
Definition: Task.h:585
virtual void run()
Execution callback.
Definition: Task.h:485
A representation of a task/kernel parameter, which can be bound using a string path or explicitly to ...
Definition: Parameter.h:61
Event1< Task * > ExecutionEvent
Definition: Task.h:90
UInt32 Index
Definition: Integer.h:52
ParameterEvent removeParameterEvent
Triggered when a parameter is removed.
Definition: Task.h:103
Scalar parameter.
Definition: Parameter.h:255
agx::Real32 getAccumulatedWallTime() const
Definition: Task.h:726
const agx::ParameterPtrVector & getParameters() const
Definition: Task.h:705
ExecutionEvent completionEvent
Triggered after the task has completed.
Definition: Task.h:97
bool isSequential() const
Definition: Task.h:734
agx::PointerParameter * getPointerParameter(const agx::Name &name)
Definition: Task.h:715
virtual void parameterAddedCallback(Parameter *)
Definition: Task.h:341
agx::ArrayParameter * getArrayParameter(const agx::Name &name)
Definition: Task.h:712
agx::Real32 getWallTime() const
Performance statistics.
Definition: Task.h:723
agxData::Val< Bool > enableParameter
Enable/disable the task, normally use setEnable/isEnabled instead.
Definition: Task.h:106
agx::Thread * getTargetThread()
Definition: Task.h:702
#define AGX_DECLARE_VECTOR_TYPES(type)
Definition: Vector.h:34
Array parameter.
Definition: Parameter.h:328
Inheritance with partial specialization due to bug with ref_ptr containers.
agx::Real32 getComputeCost() const
Definition: Task.h:724
bool isRunning() const
Definition: Task.h:695
An agx::Device is an abstract representation of a device on which data can be stored and processed...
Definition: Device.h:57
bool isEnabled() const
Definition: Task.h:694
uint32_t UInt32
Definition: Integer.h:40
agx::Parameter * getParameter(const agx::Name &name)
Definition: Task.h:706
#define AGXCORE_EXPORT
agx::Object is a refcounted object with a name.
Definition: Object.h:58