#include <init.hpp>
Inheritance diagram for q3::execution::gpu::GPUExecutionPolicy:Public Member Functions | |
| GPUExecutionPolicy (std::shared_ptr< device::GPUDeviceBackend > device_backend) | |
| void | add_scaled_vector (int number_of_elements, ComplexValue scaling_factor, const ComplexValue *vector_x, ComplexValue *vector_y) const override |
| void | allgather_within_group (const Real *local_data, int local_count, Real *full_data, int) const override |
| const device::GPUDeviceBackend & | device_backend () const |
| ComplexValue | dot_product (int number_of_elements, const ComplexValue *vector_x, const ComplexValue *vector_y) const override |
| int | global_number_of_elements (int local_number_of_elements) const override |
| int | group_rank_index () const override |
| int | group_size () const override |
| bool | is_root () const override |
| Real | norm (int number_of_elements, const ComplexValue *vector_x) const override |
| int | number_of_processes () const override |
| void | reduce_within_group (ComplexValue *, int) const override |
| void | reduce_within_group (Real *, int) const override |
Public Member Functions inherited from q3::execution::ExecutionPolicy | |
| virtual | ~ExecutionPolicy ()=default |
| virtual void | allgather_across_bands (ComplexValue *, const int *, const int *) const |
| virtual int | band_distribution_rank_index () const |
| virtual int | band_distribution_size () const |
| virtual void | broadcast_across_bands (ComplexValue *, int) const |
| virtual void | broadcast_across_bands (int *, int) const |
| Integer overload, for the counts that decide collective sizes. | |
| virtual void | broadcast_across_bands (Real *, int) const |
| Real overload, for eigenvalues – the numbers convergence decisions are made from. | |
| virtual void | broadcast_from_group_root (ComplexValue *, int) const |
| virtual void | broadcast_from_group_root (Real *, int) const |
| virtual void | reduce_across_bands (Real *, int) const |
| virtual void | reduce_group_distributed_result (ComplexValue *, int) const |
Protected Attributes | |
| std::shared_ptr< device::GPUDeviceBackend > | device_backend_ |
Additional Inherited Members | |
Public Types inherited from q3::execution::ExecutionPolicy | |
| using | ComplexValue = Complex |
|
inlineexplicit |
Construct a GPU execution policy.
| device_backend | Shared pointer to the GPU device backend. Must not be null. |
Definition at line 43 of file init.hpp.
References device_backend_.
|
inlineoverridevirtual |
Scaled vector addition on GPU-resident data: vector_y += scaling_factor * vector_x.
Intentionally unwired: the GPU compute paths call GPUBLAS directly on device buffers instead of going through this generic policy interface. Throws if reached.
Implements q3::execution::ExecutionPolicy.
Reimplemented in q3::execution::PlanewaveGPUExecutionPolicy.
|
inlineoverridevirtual |
Allgather rank-local slab data into a full-size buffer on every rank.
Gathers each group rank's contiguous local slice into a contiguous full array on every rank (concatenated in rank order). No-op when group_size == 1.
| local_data | Rank-local slab data. |
| local_count | Number of real elements in the local slab. |
| full_data | Output: full-grid data (all slabs concatenated). |
| total_count | Total number of real elements across all ranks. |
Implements q3::execution::ExecutionPolicy.
|
inline |
Access the underlying GPU device backend.
Definition at line 137 of file init.hpp.
References device_backend_.
|
inlineoverridevirtual |
Compute the inner product x† · y on GPU-resident data.
Intentionally unwired: the GPU compute paths (hamiltonian applicator, subspace manager) call GPUBLAS directly on device buffers instead of going through this generic policy interface. Throws if reached.
Implements q3::execution::ExecutionPolicy.
Reimplemented in q3::execution::PlanewaveGPUExecutionPolicy.
|
inlineoverridevirtual |
Sum a rank-local element count across the process group.
Distributed vector algorithms use this to distinguish the local slab length from the dimension of the complete vector space.
Implements q3::execution::ExecutionPolicy.
|
inlineoverridevirtual |
Index of this process within its process group.
0 in serial mode. NOT necessarily 0 when group_size() == 1: a group whose data distribution was disabled at run time (see MPIExecutionPolicy::disable_group_distribution) reports group_size() == 1 while keeping its pool-local rank index, because the pool identity is still needed. Use group_size() <= 1 to ask "is my data replicated"; use group_rank_index() == 0 only to pick one representative per pool.
Implements q3::execution::ExecutionPolicy.
|
inlineoverridevirtual |
Number of processes in this process group. Always 1 in serial mode or when each group contains a single process.
Implements q3::execution::ExecutionPolicy.
|
inlineoverridevirtual |
GPU execution is always single-process (no MPI in this policy).
Implements q3::execution::ExecutionPolicy.
|
inlineoverridevirtual |
Euclidean norm on GPU-resident data.
Intentionally unwired: the GPU compute paths call GPUBLAS directly on device buffers instead of going through this generic policy interface. Throws if reached.
Implements q3::execution::ExecutionPolicy.
Reimplemented in q3::execution::PlanewaveGPUExecutionPolicy.
|
inlineoverridevirtual |
Number of processes in the complete execution topology.
Implements q3::execution::ExecutionPolicy.
|
inlineoverridevirtual |
Allreduce an array of complex values within the process group.
Used after ZGEMM-based inner products over the distributed vector dimension (e.g., subspace matrices, orthogonalization overlaps) when coefficient vectors are distributed across group ranks. No-op when group_size == 1.
| data | In-out array of complex values. |
| number_of_elements | Number of complex elements to reduce. |
Implements q3::execution::ExecutionPolicy.
|
inlineoverridevirtual |
Allreduce an array of real values within the process group.
Same as the complex variant but for real-valued arrays.
| data | In-out array of real values. |
| number_of_elements | Number of real elements to reduce. |
Implements q3::execution::ExecutionPolicy.
|
protected |
Definition at line 142 of file init.hpp.
Referenced by GPUExecutionPolicy(), and device_backend().