From 47f317943aaf78269c719a7fb353fa1c3ee66316 Mon Sep 17 00:00:00 2001 From: Matthew Letter Date: Thu, 19 Jul 2018 16:26:52 -0400 Subject: [PATCH] Add new file change-execution-object-creation.md --- .../change-execution-object-creation.md | 27 +++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 docs/changelog/change-execution-object-creation.md diff --git a/docs/changelog/change-execution-object-creation.md b/docs/changelog/change-execution-object-creation.md new file mode 100644 index 000000000..b5526aeb7 --- /dev/null +++ b/docs/changelog/change-execution-object-creation.md @@ -0,0 +1,27 @@ +Here is what I plan to put in the change log + +Changed how Execution objects are created and passed from the cont environment to the execution environment. See chapter 13.9 on worklets in the user manual for details. +---- +Example of new execution object: +```cpp +template +struct ExecutionObject +{ + vtkm::Int32 Number; +}; + +struct TestExecutionObject : public vtkm::cont::ExecutionObjectBase +{ + vtkm::Int32 Number; + + template + VTKM_CONT ExecutionObject PrepareForExecution(Device) const + { + ExecutionObject object; + object.Number = this->Number; + return object; + } +}; +``` + +Instead we will now fill out a class and call prepareForExecution() and create the execution object for the execution environment from this function. This way we do not have to template the class that extends `vtkm::cont::ExecutionObjectBase` on the device. \ No newline at end of file