(git:374b731)
Loading...
Searching...
No Matches
offload_library.h File Reference
#include <stddef.h>

Go to the source code of this file.

Functions

void offload_init (void)
 Initalize 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)
 

Function Documentation

◆ offload_init()

void offload_init ( void  )

Initalize runtime.

Author
Rocco Meli

Initalize runtime.

Author
Rocco Meli

Definition at line 52 of file offload_library.c.

◆ offload_get_device_count()

int offload_get_device_count ( void  )

Returns the number of available devices.

Author
Ole Schuett

Definition at line 71 of file offload_library.c.

◆ offload_set_chosen_device()

void offload_set_chosen_device ( int  device_id)

Selects the chosen device to be used.

Author
Ole Schuett

Definition at line 87 of file offload_library.c.

◆ offload_get_chosen_device()

int offload_get_chosen_device ( void  )

Returns the chosen device.

Author
Ole Schuett

Definition at line 93 of file offload_library.c.

◆ offload_activate_chosen_device()

void offload_activate_chosen_device ( void  )

Activates the device selected via offload_set_chosen_device()

Author
Ole Schuett

Definition at line 99 of file offload_library.c.

Here is the caller graph for this function:

◆ offload_timeset()

void offload_timeset ( const char *  message)

Starts a timing range.

Author
Ole Schuett

Definition at line 113 of file offload_library.c.

Here is the call graph for this function:

◆ offload_timestop()

void offload_timestop ( void  )

Ends a timing range.

Author
Ole Schuett

Definition at line 143 of file offload_library.c.

◆ offload_mem_info()

void offload_mem_info ( size_t *  free,
size_t *  total 
)

Gets free and total device memory.

Author
Ole Schuett

Definition at line 157 of file offload_library.c.

◆ offload_host_malloc()

int offload_host_malloc ( void **  ptr__,
const size_t  size__ 
)

Allocate pinned memory (or simple malloc when there is no gpu)

Definition at line 169 of file offload_library.c.

◆ offload_host_free()

int offload_host_free ( void *  ptr__)

free pinned memory (or simple free when there is no gpu)

Definition at line 179 of file offload_library.c.