StarPU Handbook
starpu_clusters.h
Go to the documentation of this file.
1 /* StarPU --- Runtime system for heterogeneous multicore architectures.
2  *
3  * Copyright (C) 2015,2017,2019 CNRS
4  * Copyright (C) 2015,2018 Université de Bordeaux
5  * Copyright (C) 2015,2017 Inria
6  *
7  * StarPU is free software; you can redistribute it and/or modify
8  * it under the terms of the GNU Lesser General Public License as published by
9  * the Free Software Foundation; either version 2.1 of the License, or (at
10  * your option) any later version.
11  *
12  * StarPU is distributed in the hope that it will be useful, but
13  * WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
15  *
16  * See the GNU Lesser General Public License in COPYING.LGPL for more details.
17  */
18 
19 #ifndef __STARPU_CLUSTERS_UTIL_H__
20 #define __STARPU_CLUSTERS_UTIL_H__
21 
22 #include <starpu_config.h>
23 
24 #ifdef STARPU_CLUSTER
25 #ifdef STARPU_HAVE_HWLOC
26 
27 #include <hwloc.h>
28 
29 #ifdef __cplusplus
30 extern "C"
31 {
32 #endif
33 
39 #define STARPU_CLUSTER_MIN_NB (1<<STARPU_MODE_SHIFT)
40 #define STARPU_CLUSTER_MAX_NB (2<<STARPU_MODE_SHIFT)
41 #define STARPU_CLUSTER_NB (3<<STARPU_MODE_SHIFT)
42 #define STARPU_CLUSTER_PREFERE_MIN (4<<STARPU_MODE_SHIFT)
43 #define STARPU_CLUSTER_KEEP_HOMOGENEOUS (5<<STARPU_MODE_SHIFT)
44 
45 #define STARPU_CLUSTER_POLICY_NAME (6<<STARPU_MODE_SHIFT)
46 #define STARPU_CLUSTER_POLICY_STRUCT (7<<STARPU_MODE_SHIFT)
47 #define STARPU_CLUSTER_CREATE_FUNC (8<<STARPU_MODE_SHIFT)
48 #define STARPU_CLUSTER_CREATE_FUNC_ARG (9<<STARPU_MODE_SHIFT)
49 #define STARPU_CLUSTER_TYPE (10<<STARPU_MODE_SHIFT)
50 #define STARPU_CLUSTER_AWAKE_WORKERS (11<<STARPU_MODE_SHIFT)
51 
52 #define STARPU_CLUSTER_PARTITION_ONE (12<<STARPU_MODE_SHIFT)
53 #define STARPU_CLUSTER_NEW (13<<STARPU_MODE_SHIFT)
54 #define STARPU_CLUSTER_NCORES (14<<STARPU_MODE_SHIFT)
55 
61 {
64 #ifdef STARPU_MKL
66 #endif
67 };
68 
69 struct starpu_cluster_machine;
70 
71 struct starpu_cluster_machine* starpu_cluster_machine(hwloc_obj_type_t cluster_level, ...);
72 int starpu_uncluster_machine(struct starpu_cluster_machine* clusters);
73 int starpu_cluster_print(struct starpu_cluster_machine* clusters);
74 
75 /* Prologue functions */
76 void starpu_openmp_prologue(void*);
77 #define starpu_intel_openmp_mkl_prologue starpu_openmp_prologue
78 #ifdef STARPU_MKL
79 void starpu_gnu_openmp_mkl_prologue(void*);
80 #endif /* STARPU_MKL */
81 
84 #ifdef __cplusplus
85 }
86 #endif
87 #endif
88 #endif
89 
90 #endif /* __STARPU_CLUSTERS_UTIL_H__ */
starpu_cluster_types
Definition: starpu_clusters.h:60
Definition: starpu_clusters.h:62
Definition: starpu_clusters.h:63
Definition: starpu_clusters.h:65