ForSyDe::SY::sdpscan< T0, T1, N > Class Template Reference

A data-parallel process constructor for a strict scan process with input and output array types. More...

#include <sy_process_constructors_strict.hpp>

Inheritance diagram for ForSyDe::SY::sdpscan< T0, T1, N >:
Collaboration diagram for ForSyDe::SY::sdpscan< T0, T1, N >:

Public Types

typedef std::function< void(T0 &, const T0 &, const T1 &)> functype
 Type of the function to be passed to the process constructor.
 

Public Member Functions

 sdpscan (const sc_module_name &_name, const functype &_func, const T0 &init_res)
 The constructor requires the module name. More...
 
std::string forsyde_kind () const
 Specifying from which process constructor is the module built.
 
- Public Member Functions inherited from ForSyDe::process
 process (sc_module_name _name)
 The constructor requires the module name. More...
 

Public Attributes

SY_in< std::array< T1, N > > iport1
 port for the input channel 1
 
SY_out< std::array< T0, N > > oport1
 port for the output channel
 

Additional Inherited Members

- Protected Member Functions inherited from ForSyDe::process
void end_of_simulation ()
 This hook is used to run the clean stage.
 

Detailed Description

template<typename T0, typename T1, std::size_t N>
class ForSyDe::SY::sdpscan< T0, T1, N >

A data-parallel process constructor for a strict scan process with input and output array types.

This process constructor implements the strict version of the well- known scan operation, common in data-parallel applications. For the special case of the addition operation, it is called all partial sums or sum-prefix in the literature.

Constructor & Destructor Documentation

template<typename T0, typename T1, std::size_t N>
ForSyDe::SY::sdpscan< T0, T1, N >::sdpscan ( const sc_module_name &  _name,
const functype _func,
const T0 &  init_res 
)
inline

The constructor requires the module name.

It creates an SC_THREAD which reads data from its input ports, applies the user-imlpemented function to them and writes the results using the output port

Parameters
_nameprocess name
_funcfunction to be passed
init_resinitial value for running result

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