#include <buffer.hpp>
Public Member Functions | |
| GPUDeviceBuffer (const GPUDeviceBuffer &)=delete | |
| GPUDeviceBuffer (GPUDeviceBuffer &&other) noexcept | |
| GPUDeviceBuffer (size_t element_count, std::shared_ptr< GPUDeviceBackend > backend) | |
| ~GPUDeviceBuffer () | |
| const T * | data () const noexcept |
| T * | data () noexcept |
| GPUDeviceBuffer & | operator= (const GPUDeviceBuffer &)=delete |
| GPUDeviceBuffer & | operator= (GPUDeviceBuffer &&other) noexcept |
| size_t | size () const noexcept |
| size_t | size_bytes () const noexcept |
Definition at line 37 of file buffer.hpp.
|
inline |
Construct a buffer of the given number of elements.
| element_count | Number of elements of type T to allocate. If zero, no allocation is performed and data() returns nullptr. |
| backend | Shared pointer to the GPU device backend. Must not be null. |
| std::runtime_error | If allocation fails (e.g., out of GPU memory). |
Definition at line 48 of file buffer.hpp.
|
delete |
|
inlinenoexcept |
Move constructor. Transfers ownership of the allocation. The source buffer is left in a valid but empty state.
Definition at line 66 of file buffer.hpp.
|
inline |
Definition at line 90 of file buffer.hpp.
|
inlinenoexcept |
Raw const pointer to the underlying unified memory.
Definition at line 105 of file buffer.hpp.
|
inlinenoexcept |
Raw pointer to the underlying unified memory. Returns nullptr if the buffer was zero-sized or moved-from.
Definition at line 98 of file buffer.hpp.
Referenced by q3::GPUPlanewaveHamiltonianApplicator::apply_batch(), q3::GPUPlanewaveHamiltonianApplicator::apply_batch_single_precision(), q3::GPUPlanewaveSubspaceManager::apply_preconditioner(), q3::GPUDavidsonWorkspace::band_scratch(), q3::GPUDavidsonWorkspace::band_scratch(), q3::GPUDavidsonWorkspace::basis_vectors(), q3::GPUDavidsonWorkspace::basis_vectors(), q3::GPUPlanewaveSubspaceManager::build_correction_vectors(), q3::GPUPlanewaveSubspaceManager::collapse_subspace(), q3::GPUDavidsonWorkspace::eigenvalues_device(), q3::GPUDavidsonWorkspace::eigenvalues_device(), q3::GPUPlanewaveSubspaceManager::extract_eigenvectors(), q3::GPUDavidsonWorkspace::hamiltonian_basis_vectors(), q3::GPUDavidsonWorkspace::hamiltonian_basis_vectors(), q3::GPUPlanewaveSubspaceManager::orthogonalize_batch(), q3::GPUDavidsonWorkspace::overlap_basis_vectors(), q3::GPUDavidsonWorkspace::overlap_basis_vectors(), q3::GPUPlanewaveHamiltonianApplicator::prepare_kpoint(), q3::GPUDavidsonWorkspace::resize(), q3::GPUDavidsonWorkspace::subspace_hamiltonian(), q3::GPUDavidsonWorkspace::subspace_hamiltonian(), q3::GPUDavidsonWorkspace::subspace_overlap(), q3::GPUDavidsonWorkspace::subspace_overlap(), q3::GPUDavidsonWorkspace::sync_to_device(), q3::GPUPlanewaveHamiltonianApplicator::update_potential(), and q3::GPUPlanewaveSubspaceManager::update_subspace_matrices().
|
delete |
|
inlinenoexcept |
Move assignment operator. Releases the current allocation (if any) before taking ownership of the source's allocation.
Definition at line 78 of file buffer.hpp.
|
inlinenoexcept |
Number of elements of type T in this buffer.
Definition at line 112 of file buffer.hpp.
Referenced by q3::GPUPlanewaveHamiltonianApplicator::apply_batch(), q3::GPUPlanewaveHamiltonianApplicator::apply_batch_single_precision(), and q3::GPUDavidsonWorkspace::resize().
|
inlinenoexcept |
Total size of the allocation in bytes.
Definition at line 119 of file buffer.hpp.