Skip to content

Commit

Permalink
Documented the api, and flushed out more of the matrix mult module.
Browse files Browse the repository at this point in the history
  • Loading branch information
Nikhil Samith Bysani committed Jan 12, 2009
1 parent 52a5651 commit 58eedcd
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 4 deletions.
11 changes: 11 additions & 0 deletions src/base/bang-module-api.h
Expand Up @@ -75,8 +75,19 @@ void BANG_assert_authority(int id);
*/
BANG_job* BANG_request_job(int id, char blocking);

/**
* \param job The finished job.
*
* \brief Sends the job to the peer. If the peer is you,
* it will send it to your callback method.
*/
int BANG_finished_request(BANG_job job);

/**
* \param The peer to send your the job to.
*
* \brief Sends a job to a peer.
*/
void BANG_send_job(int id, BANG_job job);

/**
Expand Down
26 changes: 22 additions & 4 deletions src/modules/matrix-mult-module.c
Expand Up @@ -12,7 +12,18 @@

const char BANG_module_name[] = "matrix multiplication";
const unsigned char BANG_module_version[] = {0,0,1};

/**
* Our id
*/
static int id;
/**
* Our 'window' to the user.
*/
static GtkWidget *window;
/**
* The label to to our 'window'.
*/
static GtkWidget *label;

static BANG_api api;

Expand Down Expand Up @@ -64,11 +75,12 @@ static matrix_multi_job extract_multi_job(BANG_job job) {
}

void GUI_init(GtkWidget **page, GtkWidget **page_label) {
fprintf(stderr,"run...\n");
*page_label = gtk_label_new("Module of Matrix Multiplication");
*page = gtk_vbox_new(FALSE,0);
gtk_widget_show(*page_label);
gtk_widget_show(*page);

/* The user can't interact with us until the module is running. */
window = *page;
label = *page_label;
}


Expand All @@ -86,4 +98,10 @@ BANG_callbacks BANG_module_init(BANG_api get_api) {
}

void BANG_module_run() {
/* This should not change, however ids are only avialable when the program is run. */
id = api.BANG_get_my_id();


gtk_widget_show(window);
gtk_widget_show(label);
}

0 comments on commit 58eedcd

Please sign in to comment.