Loading...
Searching...
No Matches
q3::execution::gpu::device::CudaGPUDeviceBackend Class Reference
+ Inheritance diagram for q3::execution::gpu::device::CudaGPUDeviceBackend:

Public Member Functions

 CudaGPUDeviceBackend ()
 
void * allocate_unified (size_t size_bytes) override
 
void deallocate (void *pointer) override
 
std::string device_name () const override
 
bool supports_double_precision () const override
 
void synchronize () override
 
size_t total_memory_bytes () const override
 
- Public Member Functions inherited from q3::execution::gpu::device::GPUDeviceBackend
virtual ~GPUDeviceBackend ()=default
 

Detailed Description

Definition at line 36 of file cuda.cpp.

Constructor & Destructor Documentation

◆ CudaGPUDeviceBackend()

q3::execution::gpu::device::CudaGPUDeviceBackend::CudaGPUDeviceBackend ( )
inline

Construct and initialize the CUDA device backend.

Selects device 0 and queries its properties.

Definition at line 43 of file cuda.cpp.

Member Function Documentation

◆ allocate_unified()

void * q3::execution::gpu::device::CudaGPUDeviceBackend::allocate_unified ( size_t  size_bytes)
inlineoverridevirtual

Allocate unified (managed) memory via cudaMallocManaged().

Managed memory is accessible from both host and device with automatic page migration. This simplifies the programming model at the cost of some potential performance overhead compared to explicit transfers.

Implements q3::execution::gpu::device::GPUDeviceBackend.

Definition at line 77 of file cuda.cpp.

◆ deallocate()

void q3::execution::gpu::device::CudaGPUDeviceBackend::deallocate ( void *  pointer)
inlineoverridevirtual

Deallocate memory previously allocated via allocate_unified().

Implements q3::execution::gpu::device::GPUDeviceBackend.

Definition at line 86 of file cuda.cpp.

◆ device_name()

std::string q3::execution::gpu::device::CudaGPUDeviceBackend::device_name ( ) const
inlineoverridevirtual

Human-readable name of the CUDA device (e.g., "NVIDIA A100").

Implements q3::execution::gpu::device::GPUDeviceBackend.

Definition at line 52 of file cuda.cpp.

◆ supports_double_precision()

bool q3::execution::gpu::device::CudaGPUDeviceBackend::supports_double_precision ( ) const
inlineoverridevirtual

CUDA GPUs support native FP64 compute on all supported architectures.

Implements q3::execution::gpu::device::GPUDeviceBackend.

Definition at line 66 of file cuda.cpp.

◆ synchronize()

void q3::execution::gpu::device::CudaGPUDeviceBackend::synchronize ( )
inlineoverridevirtual

Block until all pending GPU operations have completed.

Implements q3::execution::gpu::device::GPUDeviceBackend.

Definition at line 93 of file cuda.cpp.

◆ total_memory_bytes()

size_t q3::execution::gpu::device::CudaGPUDeviceBackend::total_memory_bytes ( ) const
inlineoverridevirtual

Total device global memory in bytes.

Implements q3::execution::gpu::device::GPUDeviceBackend.

Definition at line 59 of file cuda.cpp.


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