Loading...
Searching...
No Matches
starpu_stdlib.h
Go to the documentation of this file.
/* StarPU --- Runtime system for heterogeneous multicore architectures.
*
* Copyright (C) 2010-2022 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_STDLIB_H__
#define __STARPU_STDLIB_H__
#include <starpu.h>
#ifdef __cplusplus
extern "C" {
#endif
#define STARPU_MALLOC_PINNED ((1ULL) << 1)
#define STARPU_MALLOC_COUNT ((1ULL) << 2)
#define STARPU_MALLOC_NORECLAIM ((1ULL) << 3)
#define STARPU_MEMORY_WAIT ((1ULL) << 4)
#define STARPU_MEMORY_OVERFLOW ((1ULL) << 5)
#define STARPU_MALLOC_SIMULATION_FOLDED ((1ULL) << 6)
#define STARPU_MALLOC_SIMULATION_UNIQUE ((1ULL)<<7)
#define starpu_data_malloc_pinned_if_possible starpu_malloc
#define starpu_data_free_pinned_if_possible starpu_free
void starpu_malloc_set_align(size_t align);
int starpu_malloc(void **A, size_t dim);
int starpu_free(void *A) STARPU_DEPRECATED;
int starpu_malloc_flags(void **A, size_t dim, int flags);
int starpu_free_flags(void *A, size_t dim, int flags);
int starpu_free_noflag(void *A, size_t dim);
typedef int (*starpu_malloc_hook)(unsigned dst_node, void **A, size_t dim, int flags);
typedef int (*starpu_free_hook)(unsigned dst_node, void *A, size_t dim, int flags);
void starpu_malloc_set_hooks(starpu_malloc_hook malloc_hook, starpu_free_hook free_hook);
int starpu_memory_pin(void *addr, size_t size);
int starpu_memory_unpin(void *addr, size_t size);
starpu_ssize_t starpu_memory_get_total(unsigned node);
starpu_ssize_t starpu_memory_get_available(unsigned node);
size_t starpu_memory_get_used(unsigned node);
starpu_ssize_t starpu_memory_get_total_all_nodes(void);
starpu_ssize_t starpu_memory_get_available_all_nodes(void);
size_t starpu_memory_get_used_all_nodes(void);
int starpu_memory_allocate(unsigned node, size_t size, int flags);
void starpu_memory_deallocate(unsigned node, size_t size);
void starpu_memory_wait_available(unsigned node, size_t size);
void starpu_sleep(float nb_sec);
void starpu_usleep(float nb_micro_sec);
void starpu_energy_use(float joules);
double starpu_energy_used(void);
#ifdef __cplusplus
}
#endif
#endif /* __STARPU_STDLIB_H__ */
starpu_memory_get_available
starpu_ssize_t starpu_memory_get_available(unsigned node)
starpu_memory_get_available_all_nodes
starpu_ssize_t starpu_memory_get_available_all_nodes(void)
starpu_memory_get_used
size_t starpu_memory_get_used(unsigned node)
starpu_memory_unpin
int starpu_memory_unpin(void *addr, size_t size)
starpu_malloc
int starpu_malloc(void **A, size_t dim)
starpu_sleep
void starpu_sleep(float nb_sec)
starpu_malloc_set_hooks
void starpu_malloc_set_hooks(starpu_malloc_hook malloc_hook, starpu_free_hook free_hook)
starpu_malloc_set_align
void starpu_malloc_set_align(size_t align)
starpu_memory_get_total
starpu_ssize_t starpu_memory_get_total(unsigned node)
starpu_memory_pin
int starpu_memory_pin(void *addr, size_t size)
starpu_energy_use
void starpu_energy_use(float joules)
starpu_memory_wait_available
void starpu_memory_wait_available(unsigned node, size_t size)
starpu_memory_allocate
int starpu_memory_allocate(unsigned node, size_t size, int flags)
starpu_usleep
void starpu_usleep(float nb_micro_sec)
starpu_free
int starpu_free(void *A)
starpu_memory_deallocate
void starpu_memory_deallocate(unsigned node, size_t size)
starpu_memory_get_used_all_nodes
size_t starpu_memory_get_used_all_nodes(void)
starpu_memory_get_total_all_nodes
starpu_ssize_t starpu_memory_get_total_all_nodes(void)
starpu_free_noflag
int starpu_free_noflag(void *A, size_t dim)
starpu_free_flags
int starpu_free_flags(void *A, size_t dim, int flags)
starpu_energy_used
double starpu_energy_used(void)
starpu_malloc_flags
int starpu_malloc_flags(void **A, size_t dim, int flags)
starpu.h