Пример #1
0
int main(int argc, char **argv)
{
	timer_init();

    ((void) argc);
    
    total = 0;
    
    rank = atoi(argv[0]);
    
    open_noc_connectors();
	
    getwork();

	start = timer_get();
    friendly_numbers();
	end = timer_get();

    syncNumbers();

	total = timer_diff(start, end);
	data_send(outfd, &total, sizeof(uint64_t));

    /* Close channels. */
    mppa_close(infd);
    mppa_close(outfd);

    mppa_exit(0);
    return (0);
}
Пример #2
0
/*
 * Closes NoC connectors.
 */
void close_noc_connectors(void)
{
	/* Close channels. */
	mppa_close(sync_fd);
	mppa_close(infd);
	mppa_close(outfd);
}
Пример #3
0
/*
 * Close NoC connectors.
 */
void close_noc_connectors(void)
{
	int i;
	
	/* Close channels. */
	for (i = 0; i < nclusters; i++)
	{
		mppa_close(outfd[i]);
		mppa_close(infd[i]);
	}
	
	/* Close sync. */
	mppa_close(sync_fd);
}
Пример #4
0
void mppa_close_portal (portal_t *portal) {
	assert(mppa_close(portal->file_descriptor) != -1);
	free (portal);
}
Пример #5
0
void mppa_close_rqueue(rqueue_t *rqueue) {
	assert(mppa_close (rqueue->file_descriptor) != -1);
	free (rqueue);
}
Пример #6
0
void mppa_close_barrier (barrier_t *barrier) {
	assert(mppa_close(barrier->sync_fd_master) != -1);
	assert(mppa_close(barrier->sync_fd_slave) != -1);
	free(barrier);
}
Пример #7
0
void mppa_close_channel (channel_t *channel) {
	assert(mppa_close(channel->file_descriptor) != -1);
	free (channel);	
}