starpu.h
Go to the documentation of this file.
/* StarPU --- Runtime system for heterogeneous multicore architectures.
*
* Copyright (C) 2009-2020 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 __STARPU_H__
#define __STARPU_H__
#include <stdlib.h>
#ifndef _MSC_VER
#include <stdint.h>
#else
#include <windows.h>
typedef unsigned char uint8_t;
typedef unsigned short uint16_t;
typedef unsigned int uint32_t;
typedef unsigned long long uint64_t;
typedef UINT_PTR uintptr_t;
typedef char int8_t;
typedef short int16_t;
typedef int int32_t;
typedef long long int64_t;
typedef INT_PTR intptr_t;
#endif
#include <starpu_config.h>
#ifdef STARPU_HAVE_WINDOWS
#include <windows.h>
#endif
#if defined(STARPU_USE_OPENCL) && !defined(__CUDACC__)
#include <starpu_opencl.h>
#endif
#include <starpu_thread.h>
#include <starpu_thread_util.h>
#include <starpu_util.h>
#include <starpu_data.h>
#include <starpu_helper.h>
#include <starpu_disk.h>
#include <starpu_data_interfaces.h>
#include <starpu_data_filters.h>
#include <starpu_stdlib.h>
#include <starpu_task_bundle.h>
#include <starpu_task_dep.h>
#include <starpu_task.h>
#include <starpu_worker.h>
#include <starpu_perfmodel.h>
#include <starpu_worker.h>
#ifndef BUILDING_STARPU
#include <starpu_task_list.h>
#endif
#include <starpu_task_util.h>
#include <starpu_scheduler.h>
#include <starpu_sched_ctx.h>
#include <starpu_expert.h>
#include <starpu_rand.h>
#include <starpu_cuda.h>
#include <starpu_cublas.h>
#include <starpu_cusparse.h>
#include <starpu_bound.h>
#include <starpu_hash.h>
#include <starpu_profiling.h>
#include <starpu_fxt.h>
#include <starpu_driver.h>
#include <starpu_tree.h>
#include <starpu_openmp.h>
#include <starpu_simgrid_wrap.h>
#include <starpu_bitmap.h>
#include <starpu_clusters.h>
#ifdef __cplusplus
extern "C"
{
#endif
struct starpu_conf
{
int magic;
int will_use_mpi;
const char *sched_policy_name;
struct starpu_sched_policy *sched_policy;
void (*sched_policy_init)(unsigned);
int precedence_over_environment_variables;
int ncpus;
int reserve_ncpus;
int ncuda;
int nopencl;
int nmic;
int nmpi_ms;
unsigned use_explicit_workers_bindid;
unsigned workers_bindid[STARPU_NMAXWORKERS];
unsigned use_explicit_workers_cuda_gpuid;
unsigned workers_cuda_gpuid[STARPU_NMAXWORKERS];
unsigned use_explicit_workers_opencl_gpuid;
unsigned workers_opencl_gpuid[STARPU_NMAXWORKERS];
unsigned use_explicit_workers_mic_deviceid;
unsigned workers_mic_deviceid[STARPU_NMAXWORKERS];
unsigned use_explicit_workers_mpi_ms_deviceid;
unsigned workers_mpi_ms_deviceid[STARPU_NMAXWORKERS];
int bus_calibrate;
int calibrate;
int single_combined_worker;
char *mic_sink_program_path;
int disable_asynchronous_copy;
int disable_asynchronous_cuda_copy;
int disable_asynchronous_opencl_copy;
int disable_asynchronous_mic_copy;
int disable_asynchronous_mpi_ms_copy;
unsigned *cuda_opengl_interoperability;
unsigned n_cuda_opengl_interoperability;
struct starpu_driver *not_launched_drivers;
unsigned n_not_launched_drivers;
uint64_t trace_buffer_size;
int global_sched_ctx_min_priority;
int global_sched_ctx_max_priority;
#ifdef STARPU_WORKER_CALLBACKS
void (*callback_worker_going_to_sleep)(unsigned workerid);
void (*callback_worker_waking_up)(unsigned workerid);
#endif
int catch_signals;
unsigned driver_spinning_backoff_min;
unsigned driver_spinning_backoff_max;
};
int starpu_conf_init(struct starpu_conf *conf);
int starpu_init(struct starpu_conf *conf) STARPU_WARN_UNUSED_RESULT;
int starpu_initialize(struct starpu_conf *user_conf, int *argc, char ***argv);
int starpu_is_initialized(void);
void starpu_wait_initialized(void);
void starpu_shutdown(void);
void starpu_pause(void);
void starpu_resume(void);
#define STARPU_THREAD_ACTIVE (1 << 0)
unsigned starpu_get_next_bindid(unsigned flags, unsigned *preferred, unsigned npreferred);
int starpu_bind_thread_on(int cpuid, unsigned flags, const char *name);
void starpu_topology_print(FILE *f);
int starpu_asynchronous_copy_disabled(void);
int starpu_asynchronous_cuda_copy_disabled(void);
int starpu_asynchronous_opencl_copy_disabled(void);
int starpu_asynchronous_mic_copy_disabled(void);
int starpu_asynchronous_mpi_ms_copy_disabled(void);
void starpu_display_stats(void);
void starpu_get_version(int *major, int *minor, int *release);
#ifdef __cplusplus
}
#endif
#include "starpu_deprecated_api.h"
#endif /* __STARPU_H__ */
starpu_conf::use_explicit_workers_mic_deviceid
unsigned use_explicit_workers_mic_deviceid
Definition: starpu.h:254
starpu_conf::magic
int magic
Definition: starpu.h:109
starpu_conf::driver_spinning_backoff_max
unsigned driver_spinning_backoff_max
Definition: starpu.h:465
starpu_conf::single_combined_worker
int single_combined_worker
Definition: starpu.h:315
starpu_conf::workers_bindid
unsigned workers_bindid[STARPU_NMAXWORKERS]
Definition: starpu.h:207
starpu_conf::disable_asynchronous_mic_copy
int disable_asynchronous_mic_copy
Definition: starpu.h:382
starpu_conf::use_explicit_workers_cuda_gpuid
unsigned use_explicit_workers_cuda_gpuid
Definition: starpu.h:218
starpu_conf::disable_asynchronous_cuda_copy
int disable_asynchronous_cuda_copy
Definition: starpu.h:352
starpu_conf::disable_asynchronous_copy
int disable_asynchronous_copy
Definition: starpu.h:339
starpu_conf::trace_buffer_size
uint64_t trace_buffer_size
Definition: starpu.h:434
starpu_conf::use_explicit_workers_opencl_gpuid
unsigned use_explicit_workers_opencl_gpuid
Definition: starpu.h:236
starpu_conf::use_explicit_workers_mpi_ms_deviceid
unsigned use_explicit_workers_mpi_ms_deviceid
Definition: starpu.h:271
starpu_conf::n_cuda_opengl_interoperability
unsigned n_cuda_opengl_interoperability
Definition: starpu.h:410
starpu_conf::sched_policy_name
const char * sched_policy_name
Definition: starpu.h:122
starpu_conf::workers_mic_deviceid
unsigned workers_mic_deviceid[STARPU_NMAXWORKERS]
Definition: starpu.h:261
starpu_conf::nmic
int nmic
Definition: starpu.h:178
starpu_conf::driver_spinning_backoff_min
unsigned driver_spinning_backoff_min
Definition: starpu.h:460
starpu_conf::disable_asynchronous_mpi_ms_copy
int disable_asynchronous_mpi_ms_copy
Definition: starpu.h:395
starpu_conf::mic_sink_program_path
char * mic_sink_program_path
Definition: starpu.h:323
starpu_conf::will_use_mpi
int will_use_mpi
Definition: starpu.h:115
starpu_conf::workers_opencl_gpuid
unsigned workers_opencl_gpuid[STARPU_NMAXWORKERS]
Definition: starpu.h:243
starpu_conf::ncpus
int ncpus
Definition: starpu.h:148
starpu_conf::precedence_over_environment_variables
int precedence_over_environment_variables
Definition: starpu.h:141
starpu_conf::bus_calibrate
int bus_calibrate
Definition: starpu.h:288
starpu_conf::reserve_ncpus
int reserve_ncpus
Definition: starpu.h:155
starpu_conf::nopencl
int nopencl
Definition: starpu.h:171
starpu_conf::calibrate
int calibrate
Definition: starpu.h:300
starpu_conf::workers_mpi_ms_deviceid
unsigned workers_mpi_ms_deviceid[STARPU_NMAXWORKERS]
Definition: starpu.h:279
starpu_conf::sched_policy
struct starpu_sched_policy * sched_policy
Definition: starpu.h:129
starpu_conf::cuda_opengl_interoperability
unsigned * cuda_opengl_interoperability
Definition: starpu.h:405
starpu_conf::catch_signals
int catch_signals
Definition: starpu.h:455
starpu_conf::n_not_launched_drivers
unsigned n_not_launched_drivers
Definition: starpu.h:425
starpu_conf::nmpi_ms
int nmpi_ms
Definition: starpu.h:186
starpu_conf::workers_cuda_gpuid
unsigned workers_cuda_gpuid[STARPU_NMAXWORKERS]
Definition: starpu.h:225
starpu_conf::ncuda
int ncuda
Definition: starpu.h:163
starpu_conf::disable_asynchronous_opencl_copy
int disable_asynchronous_opencl_copy
Definition: starpu.h:369
starpu_conf::not_launched_drivers
struct starpu_driver * not_launched_drivers
Definition: starpu.h:417
starpu_conf::use_explicit_workers_bindid
unsigned use_explicit_workers_bindid
Definition: starpu.h:196
starpu_topology_print
void starpu_topology_print(FILE *f)
starpu_asynchronous_copy_disabled
int starpu_asynchronous_copy_disabled(void)
starpu_shutdown
void starpu_shutdown(void)
starpu_is_initialized
int starpu_is_initialized(void)
starpu_get_next_bindid
unsigned starpu_get_next_bindid(unsigned flags, unsigned *preferred, unsigned npreferred)
starpu_conf_init
int starpu_conf_init(struct starpu_conf *conf)
starpu_pause
void starpu_pause(void)
starpu_asynchronous_opencl_copy_disabled
int starpu_asynchronous_opencl_copy_disabled(void)
starpu_asynchronous_cuda_copy_disabled
int starpu_asynchronous_cuda_copy_disabled(void)
starpu_init
int starpu_init(struct starpu_conf *conf) STARPU_WARN_UNUSED_RESULT
starpu_initialize
int starpu_initialize(struct starpu_conf *user_conf, int *argc, char ***argv)
starpu_asynchronous_mic_copy_disabled
int starpu_asynchronous_mic_copy_disabled(void)
starpu_resume
void starpu_resume(void)
starpu_asynchronous_mpi_ms_copy_disabled
int starpu_asynchronous_mpi_ms_copy_disabled(void)
starpu_wait_initialized
void starpu_wait_initialized(void)
starpu_bind_thread_on
int starpu_bind_thread_on(int cpuid, unsigned flags, const char *name)
starpu_conf
Definition: starpu.h:103
starpu_driver
Definition: starpu_driver.h:39
starpu_sched_policy
Definition: starpu_scheduler.h:83
starpu_get_version
void starpu_get_version(int *major, int *minor, int *release)
STARPU_NMAXWORKERS
#define STARPU_NMAXWORKERS
Definition: starpu_config.h:226
starpu_bitmap.h
starpu_bound.h
starpu_clusters.h
starpu_config.h
starpu_cublas.h
starpu_cuda.h
starpu_cusparse.h
starpu_data.h
starpu_data_filters.h
starpu_data_interfaces.h
starpu_deprecated_api.h
starpu_disk.h
starpu_driver.h
starpu_expert.h
starpu_fxt.h
starpu_hash.h
starpu_helper.h
starpu_opencl.h
starpu_openmp.h
starpu_perfmodel.h
starpu_profiling.h
starpu_rand.h
starpu_sched_ctx.h
starpu_scheduler.h
starpu_simgrid_wrap.h
starpu_stdlib.h
starpu_task.h
starpu_task_bundle.h
starpu_task_dep.h
starpu_task_list.h
starpu_task_util.h
starpu_thread.h
starpu_thread_util.h
starpu_tree.h
starpu_util.h
starpu_worker.h