diff options
Diffstat (limited to 'include/gensvm_queue.h')
| -rw-r--r-- | include/gensvm_queue.h | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/include/gensvm_queue.h b/include/gensvm_queue.h new file mode 100644 index 0000000..e8d26d6 --- /dev/null +++ b/include/gensvm_queue.h @@ -0,0 +1,40 @@ +/** + * @file gensvm_queue.h + * @author Gertjan van den Burg + * @date August, 2013 + * @brief Header file for gensvm_queue.c + * + * @details + * The grid search for the optimal parameters is done through a queue. + * This file contains struct definitions for this queue. Function declarations + * for initializing and freeing the queue are also included. + * + */ + +#ifndef GENSVM_QUEUE_H +#define GENSVM_QUEUE_H + +#include "gensvm_task.h" + +/** + * @brief Simple task queue. + * + * This struct is basically just an array of pointers to Task instances, + * with a length and an index of the current task. + * + * @param **tasks array of pointers to Task structs + * @param N size of task array + * @param i index used for keeping track of the queue + */ +struct GenQueue { + struct GenTask **tasks; + long N; + long i; +}; + +// function declarations +struct GenQueue *gensvm_init_queue(); +void gensvm_free_queue(struct GenQueue *q); +struct GenTask *get_next_task(struct GenQueue *q); + +#endif |
