Loading...
Searching...
No Matches
tags.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
*
* 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 __TAGS_H__
#define __TAGS_H__
#include <starpu.h>
#include <common/config.h>
#include <common/starpu_spinlock.h>
#include <core/dependencies/cg.h>
#pragma GCC visibility push(hidden)
#define _STARPU_TAG_SIZE (sizeof(starpu_tag_t)*8)
enum _starpu_tag_state
{
STARPU_INVALID_STATE,
STARPU_ASSOCIATED,
STARPU_BLOCKED,
STARPU_READY,
// useless ...
// /** the task has been submitted to the scheduler */
// STARPU_SCHEDULED,
STARPU_DONE
};
struct _starpu_job;
struct _starpu_tag
{
struct _starpu_spinlock lock;
starpu_tag_t id;
enum _starpu_tag_state state;
struct _starpu_cg_list tag_successors;
struct _starpu_job *job;
unsigned is_assigned;
unsigned is_submitted;
};
void _starpu_init_tags(void);
void _starpu_notify_tag_dependencies(struct _starpu_tag *tag);
void _starpu_notify_job_start_tag_dependencies(struct _starpu_tag *tag, _starpu_notify_job_start_data *data);
void _starpu_tag_declare(starpu_tag_t id, struct _starpu_job *job);
void _starpu_tag_set_ready(struct _starpu_tag *tag);
void _starpu_tag_clear(void);
#pragma GCC visibility pop
#endif // __TAGS_H__
cg.h
_starpu_cg_list
Definition cg.h:45
starpu_spinlock.h
_starpu_spinlock
Definition starpu_spinlock.h:82
_starpu_job
Definition jobs.h:74
_starpu_job::tag
struct _starpu_tag * tag
Definition jobs.h:102
_starpu_tag_set_ready
void _starpu_tag_set_ready(struct _starpu_tag *tag)
_starpu_tag::lock
struct _starpu_spinlock lock
Definition tags.h:55
_starpu_tag_state
_starpu_tag_state
Definition tags.h:32
STARPU_DONE
@ STARPU_DONE
Definition tags.h:45
STARPU_READY
@ STARPU_READY
Definition tags.h:40
STARPU_BLOCKED
@ STARPU_BLOCKED
Definition tags.h:38
STARPU_INVALID_STATE
@ STARPU_INVALID_STATE
Definition tags.h:34
STARPU_ASSOCIATED
@ STARPU_ASSOCIATED
Definition tags.h:36
_starpu_tag::id
starpu_tag_t id
Definition tags.h:57
_starpu_tag::job
struct _starpu_job * job
Definition tags.h:63
_starpu_tag
Definition tags.h:51