GNU Radio 3.4.0 C++ API
gc_job_manager_impl Class Reference

Concrete class that manages SPE jobs. More...

#include <gc_job_manager_impl.h>

Inheritance diagram for gc_job_manager_impl:

List of all members.

Public Member Functions

void event_handler_loop ()
void job_completer_loop ()
virtual ~gc_job_manager_impl ()
virtual bool shutdown ()
virtual int nspes () const
 Return number of SPE's currently allocated to job manager.
virtual gc_job_descalloc_job_desc ()
 Return a pointer to a properly aligned job descriptor, or zero if none are available.
virtual void free_job_desc (gc_job_desc *jd)
virtual bool submit_job (gc_job_desc *jd)
 Submit a job for asynchronous processing on an SPE.
virtual bool wait_job (gc_job_desc *jd)
 Wait for job to complete.
virtual int wait_jobs (unsigned int njobs, gc_job_desc *jd[], bool done[], gc_wait_mode mode)
 wait for 1 or more jobs to complete.
virtual int ea_args_maxsize ()
virtual gc_proc_id_t lookup_proc (const std::string &name)
virtual std::vector< std::string > proc_names ()

Friends

gc_job_manager_sptr gc_make_job_manager (const gc_jm_options *options)

Detailed Description

Concrete class that manages SPE jobs.

This class contains all the implementation details.


Constructor & Destructor Documentation

virtual gc_job_manager_impl::~gc_job_manager_impl ( ) [virtual]

Member Function Documentation

virtual gc_job_desc* gc_job_manager_impl::alloc_job_desc ( ) [virtual]

Return a pointer to a properly aligned job descriptor, or zero if none are available.

Implements gc_job_manager.

virtual int gc_job_manager_impl::ea_args_maxsize ( ) [virtual]

Return the maximum number of bytes of EA arguments that may be copied to or from the SPE in a single job. The limit applies independently to the "get" and "put" args.

See also:
gc_job_desc_t, gc_job_ea_args_t

Implements gc_job_manager.

void gc_job_manager_impl::event_handler_loop ( )
virtual void gc_job_manager_impl::free_job_desc ( gc_job_desc jd) [virtual]

Implements gc_job_manager.

void gc_job_manager_impl::job_completer_loop ( )
virtual gc_proc_id_t gc_job_manager_impl::lookup_proc ( const std::string &  proc_name) [virtual]

Return gc_proc_id_t associated with spu procedure proc_name if one exists, otherwise throws gc_unknown_proc.

Implements gc_job_manager.

virtual int gc_job_manager_impl::nspes ( ) const [virtual]

Return number of SPE's currently allocated to job manager.

Implements gc_job_manager.

virtual std::vector<std::string> gc_job_manager_impl::proc_names ( ) [virtual]

Return a vector of all known spu procedure names.

Implements gc_job_manager.

virtual bool gc_job_manager_impl::shutdown ( ) [virtual]

Stop accepting new jobs. Wait for existing jobs to complete. Return all managed SPE's to the system.

Implements gc_job_manager.

virtual bool gc_job_manager_impl::submit_job ( gc_job_desc jd) [virtual]

Submit a job for asynchronous processing on an SPE.

Parameters:
[in]jdpointer to job description

The caller must not read or write the job description or any of the memory associated with any indirect arguments until after calling wait_job.

Returns:
true iff the job was successfully enqueued. If submit_job returns false, check jd->status for additional info.

Implements gc_job_manager.

virtual bool gc_job_manager_impl::wait_job ( gc_job_desc jd) [virtual]

Wait for job to complete.

A thread may only wait for jobs which it submitted.

Returns:
true if sucessful, else false.

Implements gc_job_manager.

virtual int gc_job_manager_impl::wait_jobs ( unsigned int  njobs,
gc_job_desc jd[],
bool  done[],
gc_wait_mode  mode 
) [virtual]

wait for 1 or more jobs to complete.

Parameters:
[in]njobsis the length of arrays jd and done.
[in]jdare the jobs that are to be waited for.
[out]doneindicates whether the corresponding job is complete.
[in]modeindicates whether to wait for ALL or ANY of the jobs in jd to complete.

A thread may only wait for jobs which it submitted.

Returns:
number of jobs completed, or -1 if error.

Implements gc_job_manager.


Friends And Related Function Documentation

gc_job_manager_sptr gc_make_job_manager ( const gc_jm_options options) [friend]

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