summaryrefslogtreecommitdiff
path: root/gcell/src/lib/runtime/gc_job_manager.h
diff options
context:
space:
mode:
authoreb2008-04-22 22:24:16 +0000
committereb2008-04-22 22:24:16 +0000
commitb9ba2711addfc9057c136b520afc9e121ec19be9 (patch)
tree059e93ef559bb837c9ca46549688c86d2e153f1c /gcell/src/lib/runtime/gc_job_manager.h
parent2ae538ed6a5d18615fb9eea280d861ed3a8600e5 (diff)
downloadgnuradio-b9ba2711addfc9057c136b520afc9e121ec19be9.tar.gz
gnuradio-b9ba2711addfc9057c136b520afc9e121ec19be9.tar.bz2
gnuradio-b9ba2711addfc9057c136b520afc9e121ec19be9.zip
Merged eb/gcell -r8215:8243 into trunk. This adds gr-gcell, the GNU
Radio interface to the Cell Broadband Engine. git-svn-id: http://gnuradio.org/svn/gnuradio/trunk@8244 221aa14e-8319-0410-a670-987f0aec2ac5
Diffstat (limited to 'gcell/src/lib/runtime/gc_job_manager.h')
-rw-r--r--gcell/src/lib/runtime/gc_job_manager.h27
1 files changed, 24 insertions, 3 deletions
diff --git a/gcell/src/lib/runtime/gc_job_manager.h b/gcell/src/lib/runtime/gc_job_manager.h
index aa30dc24b..67abce7ed 100644
--- a/gcell/src/lib/runtime/gc_job_manager.h
+++ b/gcell/src/lib/runtime/gc_job_manager.h
@@ -33,6 +33,7 @@
class gc_job_manager;
typedef boost::shared_ptr<gc_job_manager> gc_job_manager_sptr;
typedef boost::shared_ptr<spe_program_handle_t> spe_program_handle_sptr;
+typedef boost::shared_ptr<gc_job_desc> gc_job_desc_sptr;
/*!
* \brief Return a boost::shared_ptr to an spe_program_handle_t
@@ -86,10 +87,19 @@ struct gc_jm_options {
gc_jm_options() :
max_jobs(0), max_client_threads(0), nspes(0),
- gang_schedule(true), use_affinity(false),
+ gang_schedule(false), use_affinity(false),
enable_logging(false), log2_nlog_entries(12)
{
}
+
+ gc_jm_options(spe_program_handle_sptr program_handle_,
+ unsigned int nspes_ = 0) :
+ max_jobs(0), max_client_threads(0), nspes(nspes_),
+ gang_schedule(false), use_affinity(false),
+ enable_logging(false), log2_nlog_entries(12),
+ program_handle(program_handle_)
+ {
+ }
};
enum gc_wait_mode {
@@ -236,6 +246,11 @@ public:
*/
virtual std::vector<std::string> proc_names() = 0;
+ virtual void set_debug(int debug);
+ virtual int debug();
+
+ /* ----- static methods ----- */
+
/*!
* \brief Set the singleton gc_job_manager instance.
* \param mgr is the job manager instance.
@@ -256,9 +271,15 @@ public:
*/
static gc_job_manager_sptr singleton();
+ /*!
+ * \brief return a boost::shared_ptr to a job descriptor.
+ */
+ static gc_job_desc_sptr make_jd_sptr(gc_job_manager_sptr mgr, gc_job_desc *jd);
- virtual void set_debug(int debug);
- virtual int debug();
+ /*!
+ * \brief allocate a job descriptor and return a boost::shared_ptr to it.
+ */
+ static gc_job_desc_sptr alloc_job_desc(gc_job_manager_sptr mgr);
};