StarPU Internal Handbook
topology.h
Go to the documentation of this file.
1 /* StarPU --- Runtime system for heterogeneous multicore architectures.
2  *
3  * Copyright (C) 2009-2021 Université de Bordeaux, CNRS (LaBRI UMR 5800), Inria
4  *
5  * StarPU is free software; you can redistribute it and/or modify
6  * it under the terms of the GNU Lesser General Public License as published by
7  * the Free Software Foundation; either version 2.1 of the License, or (at
8  * your option) any later version.
9  *
10  * StarPU is distributed in the hope that it will be useful, but
11  * WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
13  *
14  * See the GNU Lesser General Public License in COPYING.LGPL for more details.
15  */
16 
17 #ifndef __TOPOLOGY_H__
18 #define __TOPOLOGY_H__
19 
22 #include <starpu.h>
23 #include <common/config.h>
24 #include <common/list.h>
25 #include <common/fxt.h>
26 
28 
29 #ifndef STARPU_SIMGRID
30 #ifdef STARPU_HAVE_HWLOC
32 struct _starpu_hwloc_userdata
33 {
35  struct _starpu_worker_list *worker_list;
37  unsigned ngpus;
39  struct _starpu_worker *pu_worker;
40 };
41 #endif
42 #endif
43 
45 int _starpu_build_topology(struct _starpu_machine_config *config, int no_mp_config);
46 
49 
52 
55 
58 
61 
64 
65 #ifdef STARPU_HAVE_HWLOC
67 void _starpu_topology_filter(hwloc_topology_t topology);
68 #endif
69 
70 #define STARPU_NOWORKERID -1
71 #define STARPU_ACTIVETHREAD -2
72 #define STARPU_NONACTIVETHREAD -2
76 int _starpu_bind_thread_on_cpu(int cpuid, int workerid, const char *name);
77 
81 
82 struct _starpu_worker *_starpu_get_worker_from_driver(struct starpu_driver *d);
83 
84 int starpu_memory_nodes_get_numa_count(void);
85 int starpu_memory_nodes_numa_id_to_hwloclogid(unsigned id);
86 
88 int _starpu_task_data_get_node_on_node(struct starpu_task *task, unsigned index, unsigned target_node);
89 int _starpu_task_data_get_node_on_worker(struct starpu_task *task, unsigned index, unsigned worker);
90 
91 #endif // __TOPOLOGY_H__
Definition: workers.h:204
Definition: workers.h:359
Definition: workers.h:70
int workerid
Definition: workers.h:80
int _starpu_build_topology(struct _starpu_machine_config *config, int no_mp_config)
unsigned _starpu_get_nhyperthreads()
void _starpu_destroy_topology(struct _starpu_machine_config *config)
int _starpu_task_data_get_node_on_node(struct starpu_task *task, unsigned index, unsigned target_node)
int _starpu_bind_thread_on_cpu(int cpuid, int workerid, const char *name)
unsigned _starpu_topology_get_nnumanodes(struct _starpu_machine_config *config)
void _starpu_topology_filter(hwloc_topology_t topology)
unsigned _starpu_topology_get_nhwpu(struct _starpu_machine_config *config)
void _starpu_destroy_machine_config(struct _starpu_machine_config *config)
void _starpu_bind_thread_on_cpus(struct _starpu_combined_worker *combined_worker)
unsigned _starpu_topology_get_nhwcpu(struct _starpu_machine_config *config)