Mallard 0.8.0
Unstructured, GPU accelerated, high-order finite volume CFD solver
Mallard website
Loading...
Searching...
No Matches
GrowingBuffer Class Reference

Device memory at a fixed address whose backing grows as it fills: a reserved virtual address range with physical pages mapped on demand (CUDA virtual memory management). A table whose final size is known only once it is complete can then go to the device piece by piece, without being staged whole on the host or copied when it grows. Only CUDA builds have it (supported()). More...

#include <growing_buffer.h>

Public Member Functions

 GrowingBuffer (size_t max_bytes)
 Reserve addresses for up to max_bytes; nothing is mapped yet.
 
 ~GrowingBuffer ()
 
 GrowingBuffer (const GrowingBuffer &)=delete
 
GrowingBuffer & operator= (const GrowingBuffer &)=delete
 
void ensure (size_t bytes)
 Map pages so that the first bytes are backed by device memory.
 
void * data () const
 

Static Public Member Functions

static bool supported ()
 

Detailed Description

Device memory at a fixed address whose backing grows as it fills: a reserved virtual address range with physical pages mapped on demand (CUDA virtual memory management). A table whose final size is known only once it is complete can then go to the device piece by piece, without being staged whole on the host or copied when it grows. Only CUDA builds have it (supported()).

Constructor & Destructor Documentation

◆ GrowingBuffer() [1/2]

GrowingBuffer::GrowingBuffer ( size_t  max_bytes)
explicit

Reserve addresses for up to max_bytes; nothing is mapped yet.

◆ ~GrowingBuffer()

GrowingBuffer::~GrowingBuffer ( )

◆ GrowingBuffer() [2/2]

GrowingBuffer::GrowingBuffer ( const GrowingBuffer &  )
delete

Member Function Documentation

◆ data()

void * GrowingBuffer::data ( ) const
inline

◆ ensure()

void GrowingBuffer::ensure ( size_t  bytes)

Map pages so that the first bytes are backed by device memory.

◆ operator=()

GrowingBuffer & GrowingBuffer::operator= ( const GrowingBuffer &  )
delete

◆ supported()

bool GrowingBuffer::supported ( )
static

The documentation for this class was generated from the following files: