drake  1.0.0
src/stream.c File Reference
#include <stdio.h>
#include <stdarg.h>
#include <unistd.h>
#include <errno.h>
#include <fcntl.h>
#include <time.h>
#include <math.h>
#include <malloc.h>
#include <pthread.h>
#include <string.h>
#include <stdlib.h>
#include <execinfo.h>
#include <signal.h>
#include <sys/resource.h>
#include <sys/time.h>
#include <drake/schedule.h>
#include <pelib/integer.h>
#include <drake/task.h>
#include <drake/link.h>
#include <drake/cross_link.h>
#include <drake/processor.h>
#include <drake/mapping.h>
#include <drake/platform.h>
#include <drake/stream.h>
#include <pelib/monitor.h>
Include dependency graph for stream.c:

Go to the source code of this file.

Defines

#define debug(var)   printf("[%s:%s:%d:P%zu] %s = \"%s\"\n", __FILE__, __FUNCTION__, __LINE__, drake_platform_core_id(), #var, var); fflush(NULL)
#define debug_addr(var)   printf("[%s:%s:%d:P%zu] %s = \"%p\"\n", __FILE__, __FUNCTION__, __LINE__, drake_platform_core_id(), #var, var); fflush(NULL)
#define debug_int(var)   printf("[%s:%s:%d:P%zu] %s = \"%d\"\n", __FILE__, __FUNCTION__, __LINE__, drake_platform_core_id(), #var, var); fflush(NULL)
#define debug_uint(var)   printf("[%s:%s:%d:P%zu] %s = \"%u\"\n", __FILE__, __FUNCTION__, __LINE__, drake_platform_core_id(), #var, var); fflush(NULL)
#define debug_luint(var)   printf("[%s:%s:%d:P%zu] %s = \"%lu\"\n", __FILE__, __FUNCTION__, __LINE__, drake_platform_core_id(), #var, var); fflush(NULL)
#define debug_size_t(var)   printf("[%s:%s:%d:P%zu] %s = \"%zu\"\n", __FILE__, __FUNCTION__, __LINE__, drake_platform_core_id(), #var, var); fflush(NULL)
#define link_name_to_int(name)   strcmp((name), "left") == 0 || strcmp((name), "output") == 0 ? 0 : 1

Functions

drake_stream_t drake_stream_create_explicit (void(*schedule_init)(drake_schedule_t *), void(*schedule_destroy)(drake_schedule_t *), void *(*task_function)(size_t id, task_status_t status), drake_platform_t pt)
int drake_stream_init (drake_stream_t *stream, void *aux)
int drake_stream_destroy (drake_stream_t *stream)
int drake_stream_run (drake_stream_t *stream)

Define Documentation

#define debug (   var)    printf("[%s:%s:%d:P%zu] %s = \"%s\"\n", __FILE__, __FUNCTION__, __LINE__, drake_platform_core_id(), #var, var); fflush(NULL)

Definition at line 60 of file stream.c.

#define debug_addr (   var)    printf("[%s:%s:%d:P%zu] %s = \"%p\"\n", __FILE__, __FUNCTION__, __LINE__, drake_platform_core_id(), #var, var); fflush(NULL)

Definition at line 61 of file stream.c.

#define debug_int (   var)    printf("[%s:%s:%d:P%zu] %s = \"%d\"\n", __FILE__, __FUNCTION__, __LINE__, drake_platform_core_id(), #var, var); fflush(NULL)

Definition at line 62 of file stream.c.

#define debug_luint (   var)    printf("[%s:%s:%d:P%zu] %s = \"%lu\"\n", __FILE__, __FUNCTION__, __LINE__, drake_platform_core_id(), #var, var); fflush(NULL)

Definition at line 64 of file stream.c.

#define debug_size_t (   var)    printf("[%s:%s:%d:P%zu] %s = \"%zu\"\n", __FILE__, __FUNCTION__, __LINE__, drake_platform_core_id(), #var, var); fflush(NULL)

Definition at line 65 of file stream.c.

#define debug_uint (   var)    printf("[%s:%s:%d:P%zu] %s = \"%u\"\n", __FILE__, __FUNCTION__, __LINE__, drake_platform_core_id(), #var, var); fflush(NULL)

Definition at line 63 of file stream.c.

#define link_name_to_int (   name)    strcmp((name), "left") == 0 || strcmp((name), "output") == 0 ? 0 : 1

Definition at line 73 of file stream.c.


Function Documentation

drake_stream_t drake_stream_create_explicit ( void(*)(drake_schedule_t *)  schedule_init,
void(*)(drake_schedule_t *)  schedule_destroy,
void *(*)(size_t id, task_status_t status)  task_function,
drake_platform_t  pt 
)

Definition at line 974 of file stream.c.

Destroys the stream and frees its associated memory

Definition at line 1067 of file stream.c.

int drake_stream_init ( drake_stream_t stream,
void *  arg 
)

Initialises a stream already created. Runs the init() method of each of its tasks

Parameters:
streamStream to be initialized
argMemory address that holds arguments to transmit to task initialization function

Definition at line 1038 of file stream.c.

Run the streaming application

Definition at line 1099 of file stream.c.