Loading...
Searching...
No Matches
starpu_scheduler_toolbox.h
Go to the documentation of this file.
/* StarPU --- Runtime system for heterogeneous multicore architectures.
*
* Copyright (C) 2008-2023 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.
*/
#ifndef __STARPU_SCHEDULER_TOOLBOX_FIFO_QUEUES_H__
#define __STARPU_SCHEDULER_TOOLBOX_FIFO_QUEUES_H__
#include <starpu.h>
#include <starpu_scheduler.h>
#ifdef __cplusplus
extern "C" {
#endif
typedef struct starpu_st_fifo_taskq *starpu_st_fifo_taskq_t;
starpu_st_fifo_taskq_t starpu_st_fifo_taskq_create(void) STARPU_ATTRIBUTE_MALLOC;
void starpu_st_fifo_taskq_init(starpu_st_fifo_taskq_t fifo);
void starpu_st_fifo_taskq_destroy(starpu_st_fifo_taskq_t fifo);
int starpu_st_fifo_taskq_empty(starpu_st_fifo_taskq_t fifo);
double starpu_st_fifo_taskq_get_exp_len_prev_task_list(starpu_st_fifo_taskq_t fifo_queue, struct starpu_task *task, int workerid, int nimpl, int *fifo_ntasks);
unsigned starpu_st_fifo_ntasks_get(starpu_st_fifo_taskq_t fifo);
void starpu_st_fifo_ntasks_inc(starpu_st_fifo_taskq_t fifo, int n);
unsigned *starpu_st_fifo_ntasks_per_priority_get(starpu_st_fifo_taskq_t fifo);
unsigned starpu_st_fifo_nprocessed_get(starpu_st_fifo_taskq_t fifo);
void starpu_st_fifo_nprocessed_inc(starpu_st_fifo_taskq_t fifo, int n);
double starpu_st_fifo_exp_start_get(starpu_st_fifo_taskq_t fifo);
void starpu_st_fifo_exp_start_set(starpu_st_fifo_taskq_t fifo, double exp_start);
double starpu_st_fifo_exp_end_get(starpu_st_fifo_taskq_t fifo);
void starpu_st_fifo_exp_end_set(starpu_st_fifo_taskq_t fifo, double exp_end);
double starpu_st_fifo_exp_len_get(starpu_st_fifo_taskq_t fifo);
void starpu_st_fifo_exp_len_set(starpu_st_fifo_taskq_t fifo, double exp_len);
void starpu_st_fifo_exp_len_inc(starpu_st_fifo_taskq_t fifo, double exp_len);
double *starpu_st_fifo_exp_len_per_priority_get(starpu_st_fifo_taskq_t fifo);
double starpu_st_fifo_pipeline_len_get(starpu_st_fifo_taskq_t fifo);
void starpu_st_fifo_pipeline_len_set(starpu_st_fifo_taskq_t fifo, double pipeline_len);
void starpu_st_fifo_pipeline_len_inc(starpu_st_fifo_taskq_t fifo, double pipeline_len);
int starpu_st_fifo_taskq_push_sorted_task(starpu_st_fifo_taskq_t fifo_queue, struct starpu_task *task);
int starpu_st_fifo_taskq_push_task(starpu_st_fifo_taskq_t fifo, struct starpu_task *task);
int starpu_st_fifo_taskq_push_back_task(starpu_st_fifo_taskq_t fifo_queue, struct starpu_task *task);
int starpu_st_fifo_taskq_pop_this_task(starpu_st_fifo_taskq_t fifo_queue, int workerid, struct starpu_task *task);
struct starpu_task *starpu_st_fifo_taskq_pop_task(starpu_st_fifo_taskq_t fifo, int workerid);
struct starpu_task *starpu_st_fifo_taskq_pop_local_task(starpu_st_fifo_taskq_t fifo);
struct starpu_task *starpu_st_fifo_taskq_pop_first_ready_task(starpu_st_fifo_taskq_t fifo_queue, unsigned workerid, int num_priorities);
typedef struct starpu_st_prio_deque *starpu_st_prio_deque_t;
void starpu_st_prio_deque_init(starpu_st_prio_deque_t pdeque);
void starpu_st_prio_deque_destroy(starpu_st_prio_deque_t pdeque);
int starpu_st_prio_deque_is_empty(starpu_st_prio_deque_t pdeque);
int starpu_st_prio_deque_push_back_task(starpu_st_prio_deque_t pdeque, struct starpu_task *task);
int starpu_st_prio_deque_push_front_task(starpu_st_prio_deque_t pdeque, struct starpu_task *task);
struct starpu_task *starpu_st_prio_deque_pop_task_for_worker(starpu_st_prio_deque_t pdeque, int workerid, struct starpu_task **skipped);
struct starpu_task *starpu_st_prio_deque_deque_task_for_worker(starpu_st_prio_deque_t pdeque, int workerid, struct starpu_task **skipped);
struct starpu_task *starpu_st_prio_deque_deque_first_ready_task(starpu_st_prio_deque_t pdeque, unsigned workerid);
struct starpu_task *starpu_st_prio_deque_pop_task(starpu_st_prio_deque_t pdeque);
struct starpu_task *starpu_st_prio_deque_highest_task(starpu_st_prio_deque_t pdeque);
struct starpu_task *starpu_st_prio_deque_pop_back_task(starpu_st_prio_deque_t pdeque);
int starpu_st_prio_deque_pop_this_task(starpu_st_prio_deque_t pdeque, int workerid, struct starpu_task *task);
void starpu_st_prio_deque_erase(starpu_st_prio_deque_t pdeque, struct starpu_task *task);
int starpu_st_normalize_prio(int priority, int num_priorities, unsigned sched_ctx_id);
int starpu_st_non_ready_buffers_count(struct starpu_task *task, unsigned worker);
void starpu_st_non_ready_buffers_size(struct starpu_task *task, unsigned worker, size_t *non_readyp, size_t *non_loadingp, size_t *non_allocatedp);
#ifdef __cplusplus
}
#endif
#endif /* __STARPU_SCHEDULER_TOOLBOX_FIFO_QUEUES_H__ */
starpu_task::workerid
unsigned workerid
Definition starpu_task.h:1227
starpu_task::priority
int priority
Definition starpu_task.h:1291
starpu_task
Definition starpu_task.h:688
starpu_st_fifo_exp_start_get
double starpu_st_fifo_exp_start_get(starpu_st_fifo_taskq_t fifo)
starpu_st_fifo_exp_end_get
double starpu_st_fifo_exp_end_get(starpu_st_fifo_taskq_t fifo)
starpu_st_prio_deque_is_empty
int starpu_st_prio_deque_is_empty(starpu_st_prio_deque_t pdeque)
starpu_st_prio_deque_init
void starpu_st_prio_deque_init(starpu_st_prio_deque_t pdeque)
starpu_st_fifo_exp_len_set
void starpu_st_fifo_exp_len_set(starpu_st_fifo_taskq_t fifo, double exp_len)
starpu_st_prio_deque_pop_task_for_worker
struct starpu_task * starpu_st_prio_deque_pop_task_for_worker(starpu_st_prio_deque_t pdeque, int workerid, struct starpu_task **skipped)
starpu_st_fifo_pipeline_len_inc
void starpu_st_fifo_pipeline_len_inc(starpu_st_fifo_taskq_t fifo, double pipeline_len)
starpu_st_fifo_pipeline_len_get
double starpu_st_fifo_pipeline_len_get(starpu_st_fifo_taskq_t fifo)
starpu_st_prio_deque_t
struct starpu_st_prio_deque * starpu_st_prio_deque_t
Definition starpu_scheduler_toolbox.h:130
starpu_st_fifo_exp_len_inc
void starpu_st_fifo_exp_len_inc(starpu_st_fifo_taskq_t fifo, double exp_len)
starpu_st_fifo_taskq_pop_first_ready_task
struct starpu_task * starpu_st_fifo_taskq_pop_first_ready_task(starpu_st_fifo_taskq_t fifo_queue, unsigned workerid, int num_priorities)
starpu_st_prio_deque_push_front_task
int starpu_st_prio_deque_push_front_task(starpu_st_prio_deque_t pdeque, struct starpu_task *task)
starpu_st_fifo_ntasks_get
unsigned starpu_st_fifo_ntasks_get(starpu_st_fifo_taskq_t fifo)
starpu_st_fifo_taskq_create
starpu_st_fifo_taskq_t starpu_st_fifo_taskq_create(void) STARPU_ATTRIBUTE_MALLOC
starpu_st_fifo_exp_start_set
void starpu_st_fifo_exp_start_set(starpu_st_fifo_taskq_t fifo, double exp_start)
starpu_st_fifo_taskq_t
struct starpu_st_fifo_taskq * starpu_st_fifo_taskq_t
Definition starpu_scheduler_toolbox.h:44
starpu_st_fifo_pipeline_len_set
void starpu_st_fifo_pipeline_len_set(starpu_st_fifo_taskq_t fifo, double pipeline_len)
starpu_st_fifo_exp_end_set
void starpu_st_fifo_exp_end_set(starpu_st_fifo_taskq_t fifo, double exp_end)
starpu_st_fifo_exp_len_per_priority_get
double * starpu_st_fifo_exp_len_per_priority_get(starpu_st_fifo_taskq_t fifo)
starpu_st_fifo_ntasks_per_priority_get
unsigned * starpu_st_fifo_ntasks_per_priority_get(starpu_st_fifo_taskq_t fifo)
starpu_st_prio_deque_deque_task_for_worker
struct starpu_task * starpu_st_prio_deque_deque_task_for_worker(starpu_st_prio_deque_t pdeque, int workerid, struct starpu_task **skipped)
starpu_st_fifo_nprocessed_inc
void starpu_st_fifo_nprocessed_inc(starpu_st_fifo_taskq_t fifo, int n)
starpu_st_fifo_taskq_pop_local_task
struct starpu_task * starpu_st_fifo_taskq_pop_local_task(starpu_st_fifo_taskq_t fifo)
starpu_st_fifo_nprocessed_get
unsigned starpu_st_fifo_nprocessed_get(starpu_st_fifo_taskq_t fifo)
starpu_st_fifo_ntasks_inc
void starpu_st_fifo_ntasks_inc(starpu_st_fifo_taskq_t fifo, int n)
starpu_st_fifo_exp_len_get
double starpu_st_fifo_exp_len_get(starpu_st_fifo_taskq_t fifo)
STARPU_ATTRIBUTE_MALLOC
#define STARPU_ATTRIBUTE_MALLOC
Definition starpu_util.h:129
starpu.h
starpu_scheduler.h