![]() |
(git:e68414f)
|
#include "offload_library.h"#include "offload_runtime.h"#include <assert.h>#include <stdint.h>#include <stdio.h>#include <stdlib.h>#include <string.h>Go to the source code of this file.
Functions | |
| void | offload_init (void) |
| Initialize runtime. | |
| int | offload_get_device_count (void) |
| Returns the number of available devices. | |
| void | offload_set_chosen_device (int device_id) |
| Selects the chosen device to be used. | |
| int | offload_get_chosen_device (void) |
| Returns the chosen device. | |
| void | offload_activate_chosen_device (void) |
| Activates the device selected via offload_set_chosen_device() | |
| void | offload_timeset (const char *message) |
| Starts a timing range. | |
| void | offload_timestop (void) |
| Ends a timing range. | |
| void | offload_mem_info (size_t *free, size_t *total) |
| Gets free and total device memory. | |
| int | offload_host_malloc (void **ptr__, const size_t size__) |
| Allocate pinned memory (or simple malloc when there is no gpu) | |
| int | offload_host_free (void *ptr__) |
| free pinned memory (or simple free when there is no gpu) | |
Variables | |
| static int | chosen_device_id = -1 |
| const uint32_t | colormap [] |
| void offload_init | ( | void | ) |
| int offload_get_device_count | ( | void | ) |
Returns the number of available devices.
Definition at line 70 of file offload_library.c.
| void offload_set_chosen_device | ( | int | device_id | ) |
Selects the chosen device to be used.
Definition at line 86 of file offload_library.c.
| int offload_get_chosen_device | ( | void | ) |
Returns the chosen device.
Definition at line 92 of file offload_library.c.
| void offload_activate_chosen_device | ( | void | ) |
Activates the device selected via offload_set_chosen_device()
Definition at line 98 of file offload_library.c.
| void offload_timeset | ( | const char * | message | ) |
Starts a timing range.
Definition at line 112 of file offload_library.c.
| void offload_timestop | ( | void | ) |
Ends a timing range.
Definition at line 142 of file offload_library.c.
| void offload_mem_info | ( | size_t * | free, |
| size_t * | total | ||
| ) |
Gets free and total device memory.
Definition at line 156 of file offload_library.c.
| int offload_host_malloc | ( | void ** | ptr__, |
| const size_t | size__ | ||
| ) |
Allocate pinned memory (or simple malloc when there is no gpu)
Definition at line 168 of file offload_library.c.
| int offload_host_free | ( | void * | ptr__ | ) |
free pinned memory (or simple free when there is no gpu)
Definition at line 178 of file offload_library.c.
|
static |
Definition at line 30 of file offload_library.c.
| const uint32_t colormap[] |
Definition at line 32 of file offload_library.c.