StarPU Internal Handbook
Loading...
Searching...
No Matches
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
41
43 unsigned nprocessed;
44
46 double exp_start;
49 double exp_end;
50 double exp_len;
52 double pipeline_len;
53};
54
55struct _starpu_fifo_taskq*_starpu_create_fifo(void) STARPU_ATTRIBUTE_MALLOC;
56void _starpu_destroy_fifo(struct _starpu_fifo_taskq *fifo);
57
58int _starpu_fifo_empty(struct _starpu_fifo_taskq *fifo);
59
60double _starpu_fifo_get_exp_len_prev_task_list(struct _starpu_fifo_taskq *fifo_queue, struct starpu_task *task,
61 int workerid, int nimpl, int *fifo_ntasks);
62
63int _starpu_fifo_push_sorted_task(struct _starpu_fifo_taskq *fifo_queue, struct starpu_task *task);
64
65int _starpu_fifo_push_task(struct _starpu_fifo_taskq *fifo, struct starpu_task *task);
66int _starpu_fifo_push_back_task(struct _starpu_fifo_taskq *fifo_queue, struct starpu_task *task);
67
68int _starpu_fifo_pop_this_task(struct _starpu_fifo_taskq *fifo_queue, int workerid, struct starpu_task *task);
69struct starpu_task *_starpu_fifo_pop_task(struct _starpu_fifo_taskq *fifo, int workerid);
70struct starpu_task *_starpu_fifo_pop_local_task(struct _starpu_fifo_taskq *fifo);
71struct starpu_task *_starpu_fifo_pop_every_task(struct _starpu_fifo_taskq *fifo, int workerid);
72int _starpu_normalize_prio(int priority, int num_priorities, unsigned sched_ctx_id);
73int _starpu_count_non_ready_buffers(struct starpu_task *task, unsigned worker);
74size_t _starpu_size_non_ready_buffers(struct starpu_task *task, unsigned worker);
75struct starpu_task *_starpu_fifo_pop_first_ready_task(struct _starpu_fifo_taskq *fifo_queue, unsigned workerid, int num_priorities);
76
77#endif // __FIFO_QUEUES_H__
double exp_len
Definition: fifo_queues.h:50
unsigned * ntasks_per_priority
Definition: fifo_queues.h:40
double exp_start
Definition: fifo_queues.h:46
unsigned nprocessed
Definition: fifo_queues.h:43
double * exp_len_per_priority
Definition: fifo_queues.h:51
double exp_end
Definition: fifo_queues.h:49
unsigned ntasks
Definition: fifo_queues.h:34
unsigned pipeline_ntasks
Definition: fifo_queues.h:37
double pipeline_len
Definition: fifo_queues.h:52
struct starpu_task_list taskq
Definition: fifo_queues.h:31
Definition: fifo_queues.h:29