[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Commit-gnuradio] r8230 - in gnuradio/branches/developers/eb/gcell: gcel
From: |
eb |
Subject: |
[Commit-gnuradio] r8230 - in gnuradio/branches/developers/eb/gcell: gcell/src/lib/runtime gr-gcell/src |
Date: |
Sun, 20 Apr 2008 02:30:48 -0600 (MDT) |
Author: eb
Date: 2008-04-20 02:30:46 -0600 (Sun, 20 Apr 2008)
New Revision: 8230
Added:
gnuradio/branches/developers/eb/gcell/gr-gcell/src/gc_job_manager.i
Modified:
gnuradio/branches/developers/eb/gcell/gcell/src/lib/runtime/gc_job_manager.h
gnuradio/branches/developers/eb/gcell/gr-gcell/src/gcell.i
gnuradio/branches/developers/eb/gcell/gr-gcell/src/qa_fft.py
Log:
gr-gcell work-in-progress
Modified:
gnuradio/branches/developers/eb/gcell/gcell/src/lib/runtime/gc_job_manager.h
===================================================================
---
gnuradio/branches/developers/eb/gcell/gcell/src/lib/runtime/gc_job_manager.h
2008-04-20 07:26:38 UTC (rev 8229)
+++
gnuradio/branches/developers/eb/gcell/gcell/src/lib/runtime/gc_job_manager.h
2008-04-20 08:30:46 UTC (rev 8230)
@@ -87,10 +87,19 @@
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 {
Added: gnuradio/branches/developers/eb/gcell/gr-gcell/src/gc_job_manager.i
===================================================================
--- gnuradio/branches/developers/eb/gcell/gr-gcell/src/gc_job_manager.i
(rev 0)
+++ gnuradio/branches/developers/eb/gcell/gr-gcell/src/gc_job_manager.i
2008-04-20 08:30:46 UTC (rev 8230)
@@ -0,0 +1,75 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2008 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+struct spe_program_handle_t;
+typedef boost::shared_ptr<spe_program_handle_t> spe_program_handle_sptr;
+%template(spe_program_handle_sptr) boost::shared_ptr<spe_program_handle_t>;
+
+class gc_job_manager;
+typedef boost::shared_ptr<gc_job_manager> gc_job_manager_sptr;
+%template(gc_job_manager_sptr) boost::shared_ptr<gc_job_manager>;
+
+
+%rename(program_handle_from_filename) gc_program_handle_from_filename;
+spe_program_handle_sptr
+gc_program_handle_from_filename(const std::string &filename);
+
+%rename(program_handle_from_address) gc_program_handle_from_address;
+spe_program_handle_sptr
+gc_program_handle_from_address(spe_program_handle_t *handle);
+
+
+%rename(jm_options) gc_jm_options;
+struct gc_jm_options {
+ unsigned int max_jobs; // max # of job descriptors in system
+ unsigned int max_client_threads; // max # of client threads of job manager
+ unsigned int nspes; // how many SPEs shall we use? 0 -> all of
them
+ bool gang_schedule; // shall we gang schedule?
+ bool use_affinity; // shall we try for affinity (FIXME not
implmented)
+ bool enable_logging; // shall we log SPE events?
+ uint32_t log2_nlog_entries; // log2 of number of log entries
(default is 12 == 4k)
+ spe_program_handle_sptr program_handle; // program to load into SPEs
+
+ 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_)
+ {
+ }
+};
+
+%rename(job_manager) gc_make_job_manager;
+gc_job_manager_sptr
+gc_make_job_manager(const gc_jm_options *options);
+
+%inline {
+ void set_singleton(gc_job_manager_sptr mgr)
+ {
+ gc_job_manager::set_singleton(mgr);
+ }
+
+ gc_job_manager_sptr singleton()
+ {
+ return gc_job_manager::singleton();
+ }
+}
Modified: gnuradio/branches/developers/eb/gcell/gr-gcell/src/gcell.i
===================================================================
--- gnuradio/branches/developers/eb/gcell/gr-gcell/src/gcell.i 2008-04-20
07:26:38 UTC (rev 8229)
+++ gnuradio/branches/developers/eb/gcell/gr-gcell/src/gcell.i 2008-04-20
08:30:46 UTC (rev 8230)
@@ -21,14 +21,17 @@
%feature("autodoc","1");
-%include "exception.i"
+//%include "exception.i"
%import "gnuradio.i" // the common stuff
%{
#include "gnuradio_swig_bug_workaround.h" // mandatory bug fix
-#include <stdexcept>
+//#include <stdexcept>
+#include <gc_job_manager.h>
#include <gcell_fft_vcc.h>
+
%}
+%include "gc_job_manager.i"
%include "gcell_fft_vcc.i"
Modified: gnuradio/branches/developers/eb/gcell/gr-gcell/src/qa_fft.py
===================================================================
--- gnuradio/branches/developers/eb/gcell/gr-gcell/src/qa_fft.py
2008-04-20 07:26:38 UTC (rev 8229)
+++ gnuradio/branches/developers/eb/gcell/gr-gcell/src/qa_fft.py
2008-04-20 08:30:46 UTC (rev 8230)
@@ -33,7 +33,10 @@
class test_fft_filter(gr_unittest.TestCase):
def setUp(self):
- pass
+ ph =
gcell.program_handle_from_filename("../../gcell/src/lib/spu/gcell_all")
+ opts = gcell.jm_options(ph, 1)
+ self.mgr = gcell.job_manager(opts)
+ gcell.set_singleton(self.mgr)
def tearDown(self):
pass
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Commit-gnuradio] r8230 - in gnuradio/branches/developers/eb/gcell: gcell/src/lib/runtime gr-gcell/src,
eb <=