GenSVM
All Classes Files Functions Variables Enumerations Enumerator Macros Pages
Classes | Functions
gensvm_queue.h File Reference

Header file for gensvm_queue.c. More...

#include "gensvm_task.h"
Include dependency graph for gensvm_queue.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  GenQueue
 Simple task queue. More...
 

Functions

struct GenQueuegensvm_init_queue (void)
 Initialize a GenQueue structure. More...
 
void gensvm_free_queue (struct GenQueue *q)
 Free the GenQueue struct. More...
 
struct GenTaskget_next_task (struct GenQueue *q)
 Get new GenTask from GenQueue. More...
 

Detailed Description

Header file for gensvm_queue.c.

Author
G.J.J. van den Burg
Date
2013-08-01

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.

This file is part of GenSVM.

GenSVM is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

GenSVM is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with GenSVM. If not, see http://www.gnu.org/licenses/.

Definition in file gensvm_queue.h.

Function Documentation

◆ gensvm_free_queue()

void gensvm_free_queue ( struct GenQueue q)

Free the GenQueue struct.

Freeing the allocated memory of the GenQueue means freeing every GenTask struct and then freeing the Queue.

Parameters
[in]qGenQueue to be freed

Definition at line 59 of file gensvm_queue.c.

Here is the call graph for this function:

◆ gensvm_init_queue()

struct GenQueue* gensvm_init_queue ( void  )

Initialize a GenQueue structure.

A GenQueue structure is initialized and the default value for the parameters are set. A pointer to the initialized queue is returned.

Returns
initialized GenQueue

Definition at line 38 of file gensvm_queue.c.

◆ get_next_task()

struct GenTask* get_next_task ( struct GenQueue q)

Get new GenTask from GenQueue.

Return a pointer to the next GenTask in the GenQueue. If no GenTask instances are left, NULL is returned. The internal counter GenQueue::i is used for finding the next GenTask.

Parameters
[in]qGenQueue instance
Returns
pointer to next GenTask

Definition at line 82 of file gensvm_queue.c.