My Project
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Static Protected Attributes | Friends | List of all members
raft::kernel Class Referenceabstract
Inheritance diagram for raft::kernel:
raft::parallel_k

Public Member Functions

 kernel ()
 
 kernel (void *const ptr, const std::size_t nbytes)
 
virtual raft::kstatus run ()=0
 
virtual raft::kernelclone ()
 
std::size_t get_id ()
 

Static Public Member Functions

template<class T , class... Args>
static kernelmake (Args &&...params)
 

Protected Member Functions

virtual std::size_t addPort ()
 
virtual void lock ()
 
virtual void unlock ()
 

Protected Attributes

Port input = { this }
 
Port output = { this }
 

Static Protected Attributes

static std::size_t kernel_count
 

Friends

class ::MapBase
 
class ::Map
 
class ::Schedule
 
class ::GraphTools
 
class ::kernel_container
 
class ::basic_parallel
 

Constructor & Destructor Documentation

kernel::kernel ( )

default constructor

default

kernel::kernel ( void *const  ptr,
const std::size_t  nbytes 
)

in-place allocation

existing memory

Member Function Documentation

virtual raft::kernel* raft::kernel::clone ( )
inlinevirtual

clone - used for parallelization of kernels, if necessary sub-kernels should include an appropriate copy constructor so all class member variables can be set.

Parameters
other,T&- reference to object to be cloned
Returns
kernel* - takes base type, however is same as allocated by copy constructor for T.
void kernel::lock ( )
protectedvirtual

does nothing, just need a base impl

virtual raft::kstatus raft::kernel::run ( )
pure virtual

run - function to be extended for the actual execution. Code can be executed outside of the run function, i.e., with any function call, however the scheduler will only call the run function so it must initiate any follow-on behavior desired by the user.

void kernel::unlock ( )
protectedvirtual

does nothing, just need a base impl

Member Data Documentation

Port raft::kernel::input = { this }
protected

PORTS - input and output, use these to interact with the outside world.

std::size_t kernel::kernel_count
staticprotected

NOTE: doesn't need to be atomic since only one thread will have responsibility to to create new compute kernels.


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