blob: e8d26d650d5e21287cf82815343f53f2f6550c47 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
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
|