Graph Framework
Loading...
Searching...
No Matches
workflow::work_item< T, SAFE_MATH > Class Template Reference

Class representing a workitem. More...

#include <workflow.hpp>

Inheritance diagram for workflow::work_item< T, SAFE_MATH >:
workflow::converge_item< T, SAFE_MATH >

Public Member Functions

 work_item (graph::input_nodes< T, SAFE_MATH > in, graph::output_nodes< T, SAFE_MATH > out, graph::map_nodes< T, SAFE_MATH > maps, graph::shared_random_state< T, SAFE_MATH > state, const std::string name, const size_t size, jit::context< T, SAFE_MATH > &context)
 Construct a workflow item.
 
virtual void create_kernel_call (jit::context< T, SAFE_MATH > &context)
 Set the kernel function.
 
virtual void run ()
 Run the workitem.
 

Protected Attributes

const std::string kernel_name
 Name of the GPU kernel.
 
const size_t kernel_size
 Name of the GPU kernel.
 
graph::input_nodes< T, SAFE_MATH > inputs
 Input nodes.
 
graph::output_nodes< T, SAFE_MATH > outputs
 Output nodes.
 
graph::shared_random_state< T, SAFE_MATH > state
 Random state node.
 
std::function< void(void)> kernel
 Kernel function.
 

Detailed Description

template<jit::float_scalar T, bool SAFE_MATH = false>
class workflow::work_item< T, SAFE_MATH >

Class representing a workitem.

Template Parameters
TBase type of the calculation.
SAFE_MATHUse Safe Math operations.

Constructor & Destructor Documentation

◆ work_item()

template<jit::float_scalar T, bool SAFE_MATH = false>
workflow::work_item< T, SAFE_MATH >::work_item ( graph::input_nodes< T, SAFE_MATH >  in,
graph::output_nodes< T, SAFE_MATH >  out,
graph::map_nodes< T, SAFE_MATH >  maps,
graph::shared_random_state< T, SAFE_MATH >  state,
const std::string  name,
const size_t  size,
jit::context< T, SAFE_MATH > &  context 
)
inline

Construct a workflow item.

Parameters
[in]inInput variables.
[in]outOutput nodes.
[in]mapsSetter maps.
[in]stateRandom state node.
[in]nameName of the workitem.
[in]sizeSize of the workitem.
[in,out]contextJit context.

Member Function Documentation

◆ create_kernel_call()

template<jit::float_scalar T, bool SAFE_MATH = false>
virtual void workflow::work_item< T, SAFE_MATH >::create_kernel_call ( jit::context< T, SAFE_MATH > &  context)
inlinevirtual

Set the kernel function.

Parameters
[in,out]contextJit context.

Reimplemented in workflow::converge_item< T, SAFE_MATH >.

◆ run()

template<jit::float_scalar T, bool SAFE_MATH = false>
virtual void workflow::work_item< T, SAFE_MATH >::run ( )
inlinevirtual

Run the workitem.

Reimplemented in workflow::converge_item< T, SAFE_MATH >.


The documentation for this class was generated from the following file: