From 044dc5a93c33d7aa4c9c98a626890c16446a56fc Mon Sep 17 00:00:00 2001 From: Gertjan van den Burg Date: Mon, 16 May 2016 18:47:09 +0200 Subject: major refactor of the code --- include/gensvm_queue.h | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 include/gensvm_queue.h (limited to 'include/gensvm_queue.h') 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 -- cgit v1.2.3