(git:c641773)
Loading...
Searching...
No Matches
offload_buffer.h File Reference
#include <stddef.h>

Go to the source code of this file.

Data Structures

struct  offload_buffer
 Internal representation of a buffer. More...

Functions

void offload_create_buffer (const int length, offload_buffer **buffer)
 Allocate a buffer (NULL or valid) with the given number of elements.
void offload_free_buffer (offload_buffer *buffer)
 Deallocate given buffer.
double * offload_get_buffer_host_pointer (offload_buffer *buffer)
 Return a pointer to the host buffer (Fortran API).
double * offload_get_buffer_device_pointer (offload_buffer *buffer)
 Return a pointer to the device buffer (Fortran API).
void offload_buffer_h2d (offload_buffer *buffer, const int length)
 Copy data from host to device (Fortran API).
void offload_buffer_d2h (offload_buffer *buffer, const int length)
 Copy data from device to host (Fortran API).

Function Documentation

◆ offload_create_buffer()

void offload_create_buffer ( const int length,
offload_buffer ** buffer )

Allocate a buffer (NULL or valid) with the given number of elements.

Author
Ole Schuett

Allocate a buffer (NULL or valid) with the given number of elements.

Author
Ole Schuett and Hans Pabst

Definition at line 52 of file offload_buffer.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ offload_free_buffer()

void offload_free_buffer ( offload_buffer * buffer)

Deallocate given buffer.

Author
Ole Schuett

Definition at line 102 of file offload_buffer.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ offload_get_buffer_host_pointer()

double * offload_get_buffer_host_pointer ( offload_buffer * buffer)

Return a pointer to the host buffer (Fortran API).

Author
Ole Schuett

Return a pointer to the host buffer (Fortran API).

Author
Ole Schuett

Definition at line 113 of file offload_buffer.c.

◆ offload_get_buffer_device_pointer()

double * offload_get_buffer_device_pointer ( offload_buffer * buffer)

Return a pointer to the device buffer (Fortran API).

Author
Samal Bibek

Return a pointer to the device buffer (Fortran API).

Author
Samal Bibek

Definition at line 122 of file offload_buffer.c.

◆ offload_buffer_h2d()

void offload_buffer_h2d ( offload_buffer * buffer,
const int length )

Copy data from host to device (Fortran API).

Author
Samal Bibek

Definition at line 131 of file offload_buffer.c.

◆ offload_buffer_d2h()

void offload_buffer_d2h ( offload_buffer * buffer,
const int length )

Copy data from device to host (Fortran API).

Author
Samal Bibek

Definition at line 148 of file offload_buffer.c.