|
@@ -1,6 +1,6 @@
|
|
|
/* StarPU --- Runtime system for heterogeneous multicore architectures.
|
|
|
*
|
|
|
- * Copyright (C) 2009-2013 Université de Bordeaux
|
|
|
+ * Copyright (C) 2009-2014 Université de Bordeaux
|
|
|
* Copyright (C) 2010, 2011, 2013 Centre National de la Recherche Scientifique
|
|
|
* Copyright (C) 2011, 2014 INRIA
|
|
|
*
|
|
@@ -78,13 +78,35 @@ int _starpu_task_submit_conversion_task(struct starpu_task *task,
|
|
|
void _starpu_task_check_deprecated_fields(struct starpu_task *task);
|
|
|
void _starpu_codelet_check_deprecated_fields(struct starpu_codelet *cl);
|
|
|
|
|
|
-starpu_cpu_func_t _starpu_task_get_cpu_nth_implementation(struct starpu_codelet *cl, unsigned nimpl);
|
|
|
-starpu_cuda_func_t _starpu_task_get_cuda_nth_implementation(struct starpu_codelet *cl, unsigned nimpl);
|
|
|
-starpu_opencl_func_t _starpu_task_get_opencl_nth_implementation(struct starpu_codelet *cl, unsigned nimpl);
|
|
|
-starpu_mic_func_t _starpu_task_get_mic_nth_implementation(struct starpu_codelet *cl, unsigned nimpl);
|
|
|
-starpu_scc_func_t _starpu_task_get_scc_nth_implementation(struct starpu_codelet *cl, unsigned nimpl);
|
|
|
-
|
|
|
-char *_starpu_task_get_cpu_name_nth_implementation(struct starpu_codelet *cl, unsigned nimpl);
|
|
|
+static inline starpu_cpu_func_t _starpu_task_get_cpu_nth_implementation(struct starpu_codelet *cl, unsigned nimpl)
|
|
|
+{
|
|
|
+ return cl->cpu_funcs[nimpl];
|
|
|
+}
|
|
|
+
|
|
|
+static inline starpu_cuda_func_t _starpu_task_get_cuda_nth_implementation(struct starpu_codelet *cl, unsigned nimpl)
|
|
|
+{
|
|
|
+ return cl->cuda_funcs[nimpl];
|
|
|
+}
|
|
|
+
|
|
|
+static inline starpu_opencl_func_t _starpu_task_get_opencl_nth_implementation(struct starpu_codelet *cl, unsigned nimpl)
|
|
|
+{
|
|
|
+ return cl->opencl_funcs[nimpl];
|
|
|
+}
|
|
|
+
|
|
|
+static inline starpu_mic_func_t _starpu_task_get_mic_nth_implementation(struct starpu_codelet *cl, unsigned nimpl)
|
|
|
+{
|
|
|
+ return cl->mic_funcs[nimpl];
|
|
|
+}
|
|
|
+
|
|
|
+static inline starpu_scc_func_t _starpu_task_get_scc_nth_implementation(struct starpu_codelet *cl, unsigned nimpl)
|
|
|
+{
|
|
|
+ return cl->scc_funcs[nimpl];
|
|
|
+}
|
|
|
+
|
|
|
+static inline char *_starpu_task_get_cpu_name_nth_implementation(struct starpu_codelet *cl, unsigned nimpl)
|
|
|
+{
|
|
|
+ return cl->cpu_funcs_name[nimpl];
|
|
|
+}
|
|
|
|
|
|
#define _STARPU_TASK_SET_INTERFACE(task, interface, i) do { if (task->dyn_handles) task->dyn_interfaces[i] = interface; else task->interfaces[i] = interface;} while(0)
|
|
|
#define _STARPU_TASK_GET_INTERFACES(task) ((task->dyn_handles) ? task->dyn_interfaces : task->interfaces)
|