StarPU Internal Handbook
fifo_queues.h
Go to the documentation of this file.
1/* StarPU --- Runtime system for heterogeneous multicore architectures.
2 *
3 * Copyright (C) 2008-2021 Université de Bordeaux, CNRS (LaBRI UMR 5800), Inria
4 * Copyright (C) 2016 Uppsala University
5 *
6 * StarPU is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU Lesser General Public License as published by
8 * the Free Software Foundation; either version 2.1 of the License, or (at
9 * your option) any later version.
10 *
11 * StarPU is distributed in the hope that it will be useful, but
12 * WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
14 *
15 * See the GNU Lesser General Public License in COPYING.LGPL for more details.
16 */
17
18/* FIFO queues, ready for use by schedulers */
19
20#ifndef __FIFO_QUEUES_H__
21#define __FIFO_QUEUES_H__
22
25#include <starpu.h>
26#include <core/task.h>
27
29{
31 struct starpu_task_list taskq;
32
34 unsigned ntasks;
35
38
40 unsigned nprocessed;
41
43 double exp_start;
46 double exp_end;
47 double exp_len;
49 double pipeline_len;
50};
51
52struct _starpu_fifo_taskq*_starpu_create_fifo(void) STARPU_ATTRIBUTE_MALLOC;
53void _starpu_destroy_fifo(struct _starpu_fifo_taskq *fifo);
54
55int _starpu_fifo_empty(struct _starpu_fifo_taskq *fifo);
56
57double _starpu_fifo_get_exp_len_prev_task_list(struct _starpu_fifo_taskq *fifo_queue, struct starpu_task *task,
58 int workerid, int nimpl, int *fifo_ntasks);
59
60int _starpu_fifo_push_sorted_task(struct _starpu_fifo_taskq *fifo_queue, struct starpu_task *task);
61
62int _starpu_fifo_push_task(struct _starpu_fifo_taskq *fifo, struct starpu_task *task);
63int _starpu_fifo_push_back_task(struct _starpu_fifo_taskq *fifo_queue, struct starpu_task *task);
64
65int _starpu_fifo_pop_this_task(struct _starpu_fifo_taskq *fifo_queue, int workerid, struct starpu_task *task);
66struct starpu_task *_starpu_fifo_pop_task(struct _starpu_fifo_taskq *fifo, int workerid);
67struct starpu_task *_starpu_fifo_pop_local_task(struct _starpu_fifo_taskq *fifo);
68struct starpu_task *_starpu_fifo_pop_every_task(struct _starpu_fifo_taskq *fifo, int workerid);
69int _starpu_normalize_prio(int priority, int num_priorities, unsigned sched_ctx_id);
70int _starpu_count_non_ready_buffers(struct starpu_task *task, unsigned worker);
71size_t _starpu_size_non_ready_buffers(struct starpu_task *task, unsigned worker);
72struct starpu_task *_starpu_fifo_pop_first_ready_task(struct _starpu_fifo_taskq *fifo_queue, unsigned workerid, int num_priorities);
73
74#endif // __FIFO_QUEUES_H__
double exp_len
Definition: fifo_queues.h:47
unsigned * ntasks_per_priority
Definition: fifo_queues.h:37
double exp_start
Definition: fifo_queues.h:43
unsigned nprocessed
Definition: fifo_queues.h:40
double * exp_len_per_priority
Definition: fifo_queues.h:48
double exp_end
Definition: fifo_queues.h:46
unsigned ntasks
Definition: fifo_queues.h:34
double pipeline_len
Definition: fifo_queues.h:49
struct starpu_task_list taskq
Definition: fifo_queues.h:31
Definition: fifo_queues.h:29