Struct CUDAEnvironmentDirectedGraphBuffers::Buffer

Nested Relationships

This struct is a nested type of Class CUDAEnvironmentDirectedGraphBuffers.

Struct Documentation

struct Buffer

Public Types

enum Ready

Values:

enumerator None
enumerator Host
enumerator Device
enumerator Both

Public Functions

inline void swap()

Swap the device buffers

void updateHostBuffer(size_type edge_count, cudaStream_t stream) const

If host buffer is not ready, copy from device buffer

Public Members

size_t element_size

Size of an individual element

void *d_ptr = nullptr

Pointer to buffer in device memory (if allocated)

void *d_ptr_swap = nullptr

Pointer to buffer swap space in device memory (if allocated)

void *h_ptr = nullptr

Pointer to buffer in host memory (if allocated)

mutable Ready ready = None

Which buffers are ready