StarPU Handbook - StarPU Language Bindings
|
Macros | |
#define | STARPU_MIN(a, b) |
#define | STARPU_MAX(a, b) |
#define | STARPU_POISON_PTR |
#define | starpu_getenv_string_var_default(s, ss, d) |
#define | starpu_getenv_size_default(s, d) |
#define | starpu_getenv_number(s) |
#define | starpu_getenv_number_default(s, d) |
#define | starpu_getenv_float_default(s, d) |
Functions | |
char * | starpu_getenv (const char *str) |
int | starpu_get_env_string_var_default (const char *str, const char *strings[], int defvalue) |
int | starpu_get_env_size_default (const char *str, int defval) |
static __starpu_inline int | starpu_get_env_number (const char *str) |
static __starpu_inline int | starpu_get_env_number_default (const char *str, int defval) |
static __starpu_inline float | starpu_get_env_float_default (const char *str, float defval) |
void | starpu_execute_on_each_worker (void(*func)(void *), void *arg, uint32_t where) |
void | starpu_execute_on_each_worker_ex (void(*func)(void *), void *arg, uint32_t where, const char *name) |
void | starpu_execute_on_specific_workers (void(*func)(void *), void *arg, unsigned num_workers, unsigned *workers, const char *name) |
double | starpu_timing_now (void) |
int | starpu_data_cpy (starpu_data_handle_t dst_handle, starpu_data_handle_t src_handle, int asynchronous, void(*callback_func)(void *), void *callback_arg) |
int | starpu_data_cpy_priority (starpu_data_handle_t dst_handle, starpu_data_handle_t src_handle, int asynchronous, void(*callback_func)(void *), void *callback_arg, int priority) |
int | starpu_data_dup_ro (starpu_data_handle_t *dst_handle, starpu_data_handle_t src_handle, int asynchronous) |
void | starpu_display_bindings (void) |
int | starpu_get_pu_os_index (unsigned logical_index) |
long | starpu_get_memory_location_bitmap (void *ptr, size_t size) |
hwloc_topology_t | starpu_get_hwloc_topology (void) |
Variables | |
int | _starpu_silent |
#define STARPU_MIN | ( | a, | |
b | |||
) |
Return the min of the two parameters.
#define STARPU_MAX | ( | a, | |
b | |||
) |
Return the max of the two parameters.
#define STARPU_POISON_PTR |
Define a value which can be used to mark pointers as invalid values.
#define starpu_getenv_string_var_default | ( | s, | |
ss, | |||
d | |||
) |
#define starpu_getenv_size_default | ( | s, | |
d | |||
) |
Same as starpu_get_env_size_default()
#define starpu_getenv_number | ( | s | ) |
Same as starpu_get_env_number()
#define starpu_getenv_number_default | ( | s, | |
d | |||
) |
Same as starpu_get_env_number_default()
#define starpu_getenv_float_default | ( | s, | |
d | |||
) |
Same as starpu_get_env_float_default()
char * starpu_getenv | ( | const char * | str | ) |
Retrieve the value of an environment variable. See ExecutionConfigurationThroughEnvironmentVariables for more details.
int starpu_get_env_string_var_default | ( | const char * | str, |
const char * | strings[], | ||
int | defvalue | ||
) |
If the environment variable str
is defined and its value is contained in the array strings
, return the array position. Raise an error if the environment variable str
is defined with a value not in strings
Return defvalue
if the environment variable str
is not defined. See ExecutionConfigurationThroughEnvironmentVariables for more details.
int starpu_get_env_size_default | ( | const char * | str, |
int | defval | ||
) |
If the environment variable str
is defined with a well-defined size value, return the value as a size in bytes. Expected size qualifiers are b, B, k, K, m, M, g, G. The default qualifier is K. If the environment variable str
is not defined or is empty, return defval
Raise an error if the value of the environment variable str
is not well-defined. See ExecutionConfigurationThroughEnvironmentVariables for more details.
|
static |
Return the integer value of the environment variable named str
. Return 0 otherwise (the variable does not exist or has a non-integer value).
void starpu_execute_on_each_worker | ( | void(*)(void *) | func, |
void * | arg, | ||
uint32_t | where | ||
) |
Execute the given function func
on a subset of workers. When calling this method, the offloaded function func
is executed by every StarPU worker that are eligible to execute the function. The argument arg
is passed to the offloaded function. The argument where
specifies on which types of processing units the function should be executed. Similarly to the field starpu_codelet::where, it is possible to specify that the function should be executed on every CUDA device and every CPU by passing STARPU_CPU|STARPU_CUDA. This function blocks until func
has been executed on every appropriate processing units, and thus may not be called from a callback function for instance. See HowToInitializeAComputationLibraryOnceForEachWorker for more details.
void starpu_execute_on_each_worker_ex | ( | void(*)(void *) | func, |
void * | arg, | ||
uint32_t | where, | ||
const char * | name | ||
) |
Same as starpu_execute_on_each_worker(), except that the task name is specified in the argument name
. See HowToInitializeAComputationLibraryOnceForEachWorker for more details.
void starpu_execute_on_specific_workers | ( | void(*)(void *) | func, |
void * | arg, | ||
unsigned | num_workers, | ||
unsigned * | workers, | ||
const char * | name | ||
) |
Call func
(arg
) on every worker in the workers
array. num_workers
indicates the number of workers in this array. This function is synchronous, but the different workers may execute the function in parallel. See HowToInitializeAComputationLibraryOnceForEachWorker for more details.
double starpu_timing_now | ( | void | ) |
Return the current date in micro-seconds. See Preparing for more details.
int starpu_data_cpy | ( | starpu_data_handle_t | dst_handle, |
starpu_data_handle_t | src_handle, | ||
int | asynchronous, | ||
void(*)(void *) | callback_func, | ||
void * | callback_arg | ||
) |
Copy the content of src_handle
into dst_handle
. The parameter asynchronous
indicates whether the function should block or not. In the case of an asynchronous call, it is possible to synchronize with the termination of this operation either by the means of implicit dependencies (if enabled) or by calling starpu_task_wait_for_all(). If callback_func
is not NULL
, this callback function is executed after the handle has been copied, and it is given the pointer callback_arg
as argument. See DataHandlesHelpers for more details.
int starpu_data_cpy_priority | ( | starpu_data_handle_t | dst_handle, |
starpu_data_handle_t | src_handle, | ||
int | asynchronous, | ||
void(*)(void *) | callback_func, | ||
void * | callback_arg, | ||
int | priority | ||
) |
Like starpu_data_cpy(), copy the content of src_handle
into dst_handle
, but additionally take a priority
parameter to sort it among the whole task graph. See DataHandlesHelpers for more details.
int starpu_data_dup_ro | ( | starpu_data_handle_t * | dst_handle, |
starpu_data_handle_t | src_handle, | ||
int | asynchronous | ||
) |
Create a copy of src_handle
, and return a new handle in dst_handle
, which is to be used only for read accesses. This allows StarPU to optimize it by not actually copying the data whenever possible (e.g. it may possibly simply return src_handle itself). The parameter asynchronous
indicates whether the function should block or not. In the case of an asynchronous call, it is possible to synchronize with the termination of this operation either by the means of implicit dependencies (if enabled) or by calling starpu_task_wait_for_all(). If callback_func
is not NULL
, this callback function is executed after the handle has been copied, and it is given the pointer callback_arg
as argument. See DataHandlesHelpers for more details.
void starpu_display_bindings | ( | void | ) |
Call hwloc-ps to display binding of each processus and thread running on the machine.
Use the environment variable STARPU_DISPLAY_BINDINGS to automatically call this function at the beginning of the execution of StarPU. See MiscellaneousAndDebug for more details.
int starpu_get_pu_os_index | ( | unsigned | logical_index | ) |
If hwloc
is used, convert the given logical_index
of a PU to the OS index of this PU. If hwloc
is not used, return logical_index
. See HardwareTopology for more details.
long starpu_get_memory_location_bitmap | ( | void * | ptr, |
size_t | size | ||
) |
Return a bitmap representing logical indexes of NUMA nodes where the buffer targeted by ptr
is allocated. An error is notified by a negative result. See HardwareTopology for more details.
hwloc_topology_t starpu_get_hwloc_topology | ( | void | ) |
Get the hwloc topology used by StarPU. One can use this pointer to get information about topology, but not to change settings related to topology. See HardwareTopology for more details.