Noodle
Loading...
Searching...
No Matches
noodle_buffer.cpp File Reference

Grow-only NoodleBuffer allocation helpers. More...

#include "noodle_buffer.h"
#include <stdlib.h>
Include dependency graph for noodle_buffer.cpp:

Functions

static float * noodle_buffer_alloc_float (size_t n_floats)
void noodle_buffer_init (NoodleBuffer *buf)
 Initialize a NoodleBuffer.
float * noodle_buffer_require (NoodleBuffer *buf, size_t required_floats)
 Ensure that a buffer can hold at least required_floats floats.
void noodle_buffer_free (NoodleBuffer *buf)
 Release a NoodleBuffer.
size_t noodle_buffer_capacity (const NoodleBuffer *buf)
 Return the buffer capacity in float elements.
size_t noodle_buffer_capacity_bytes (const NoodleBuffer *buf)
 Return the buffer capacity in bytes.

Detailed Description

Grow-only NoodleBuffer allocation helpers.

Function Documentation

◆ noodle_buffer_alloc_float()

float * noodle_buffer_alloc_float ( size_t n_floats)
static