fifo_queues.h
Go to the documentation of this file.
/* StarPU --- Runtime system for heterogeneous multicore architectures.
*
* Copyright (C) 2008-2021 Université de Bordeaux, CNRS (LaBRI UMR 5800), Inria
* Copyright (C) 2016 Uppsala University
*
* StarPU is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation; either version 2.1 of the License, or (at
* your option) any later version.
*
* StarPU 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 Lesser General Public License in COPYING.LGPL for more details.
*/
/* FIFO queues, ready for use by schedulers */
#ifndef __FIFO_QUEUES_H__
#define __FIFO_QUEUES_H__
#include <starpu.h>
#include <core/task.h>
struct _starpu_fifo_taskq
{
struct starpu_task_list taskq;
unsigned ntasks;
unsigned *ntasks_per_priority;
unsigned nprocessed;
double exp_start;
double exp_end;
double exp_len;
double *exp_len_per_priority;
double pipeline_len;
};
struct _starpu_fifo_taskq*_starpu_create_fifo(void) STARPU_ATTRIBUTE_MALLOC;
void _starpu_destroy_fifo(struct _starpu_fifo_taskq *fifo);
int _starpu_fifo_empty(struct _starpu_fifo_taskq *fifo);
double _starpu_fifo_get_exp_len_prev_task_list(struct _starpu_fifo_taskq *fifo_queue, struct starpu_task *task,
int workerid, int nimpl, int *fifo_ntasks);
int _starpu_fifo_push_sorted_task(struct _starpu_fifo_taskq *fifo_queue, struct starpu_task *task);
int _starpu_fifo_push_task(struct _starpu_fifo_taskq *fifo, struct starpu_task *task);
int _starpu_fifo_push_back_task(struct _starpu_fifo_taskq *fifo_queue, struct starpu_task *task);
int _starpu_fifo_pop_this_task(struct _starpu_fifo_taskq *fifo_queue, int workerid, struct starpu_task *task);
struct starpu_task *_starpu_fifo_pop_task(struct _starpu_fifo_taskq *fifo, int workerid);
struct starpu_task *_starpu_fifo_pop_local_task(struct _starpu_fifo_taskq *fifo);
struct starpu_task *_starpu_fifo_pop_every_task(struct _starpu_fifo_taskq *fifo, int workerid);
int _starpu_normalize_prio(int priority, int num_priorities, unsigned sched_ctx_id);
int _starpu_count_non_ready_buffers(struct starpu_task *task, unsigned worker);
size_t _starpu_size_non_ready_buffers(struct starpu_task *task, unsigned worker);
struct starpu_task *_starpu_fifo_pop_first_ready_task(struct _starpu_fifo_taskq *fifo_queue, unsigned workerid, int num_priorities);
#endif // __FIFO_QUEUES_H__
_starpu_fifo_taskq::exp_len
double exp_len
Definition: fifo_queues.h:47
_starpu_fifo_taskq::ntasks_per_priority
unsigned * ntasks_per_priority
Definition: fifo_queues.h:37
_starpu_fifo_taskq::exp_start
double exp_start
Definition: fifo_queues.h:43
_starpu_fifo_taskq::nprocessed
unsigned nprocessed
Definition: fifo_queues.h:40
_starpu_fifo_taskq::exp_len_per_priority
double * exp_len_per_priority
Definition: fifo_queues.h:48
_starpu_fifo_taskq::exp_end
double exp_end
Definition: fifo_queues.h:46
_starpu_fifo_taskq::ntasks
unsigned ntasks
Definition: fifo_queues.h:34
_starpu_fifo_taskq::pipeline_len
double pipeline_len
Definition: fifo_queues.h:49
_starpu_fifo_taskq::taskq
struct starpu_task_list taskq
Definition: fifo_queues.h:31
_starpu_fifo_taskq
Definition: fifo_queues.h:29
task.h