Neko 1.99.6
A portable framework for high-order spectral element flow simulations
Loading...
Searching...
No Matches
buffer.c File Reference
#include <stdlib.h>
#include <device/device_config.h>
#include <device/opencl/check.h>
#include <device/opencl/buffer.h>
Include dependency graph for buffer.c:

Go to the source code of this file.

Functions

void opencl_buffer_reserve (opencl_buffer_t *buf, size_t size)
 
void opencl_buffer_free_all (void)
 

Variables

static opencl_buffer_tbuffer_registry = NULL
 

Function Documentation

◆ opencl_buffer_free_all()

void opencl_buffer_free_all ( void  )

Free all registered buffers and reset them to an empty state

Definition at line 69 of file buffer.c.

Here is the call graph for this function:

◆ opencl_buffer_reserve()

void opencl_buffer_reserve ( opencl_buffer_t buf,
size_t  size 
)

Ensure that a buffer holds at least size bytes on both the host and the device side, growing it if necessary

Definition at line 46 of file buffer.c.

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

Variable Documentation

◆ buffer_registry

opencl_buffer_t* buffer_registry = NULL
static

Registry of all reserved device buffers

Definition at line 44 of file buffer.c.