(git:39fe4c4)
Loading...
Searching...
No Matches
offload_buffer.c File Reference
#include "offload_buffer.h"
#include "offload_library.h"
#include "offload_mempool.h"
#include "offload_runtime.h"
#include <assert.h>
#include <stdio.h>
#include <stdlib.h>

Go to the source code of this file.

Macros

#define OFFLOAD_BUFFER_MEMPOOL
 

Functions

static void offload_free_buffer_internal (offload_buffer *buffer)
 Internal routine to deallocate given buffer.
 
void offload_create_buffer (const int length, offload_buffer **buffer)
 Allocates 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)
 Returns a pointer to the host buffer (Fortran API).
 

Macro Definition Documentation

◆ OFFLOAD_BUFFER_MEMPOOL

#define OFFLOAD_BUFFER_MEMPOOL

Definition at line 17 of file offload_buffer.c.

Function Documentation

◆ offload_free_buffer_internal()

static void offload_free_buffer_internal ( offload_buffer buffer)
static

Internal routine to deallocate given buffer.

Author
Hans Pabst

Definition at line 24 of file offload_buffer.c.

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

◆ offload_create_buffer()

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

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

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:

◆ 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)

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

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

Author
Ole Schuett

Definition at line 113 of file offload_buffer.c.