pub struct AMDOpenCLSimulator { /* private fields */ }Expand description
AMD GPU-optimized quantum simulator using OpenCL.
In this build there is no OpenCL runtime, so this type cannot be
constructed (see AMDOpenCLSimulator::new). The type and its associated
kernel-source templates are retained for callers that link a real OpenCL
toolchain elsewhere.
Implementations§
Source§impl AMDOpenCLSimulator
impl AMDOpenCLSimulator
Sourcepub fn new(_config: OpenCLConfig) -> Result<Self>
pub fn new(_config: OpenCLConfig) -> Result<Self>
Create a new AMD OpenCL simulator.
HONEST AVAILABILITY GATE: this build links no OpenCL/AMD ROCm
runtime, so AMD device discovery and GPU kernel dispatch are impossible.
Constructing a working simulator here would require fabricating device
discovery and kernel timings, so we fail loudly instead.
Sourcepub const fn get_device_info(&self) -> Option<&OpenCLDevice>
pub const fn get_device_info(&self) -> Option<&OpenCLDevice>
Get device information (only present with a real runtime).
Sourcepub const fn get_kernels(&self) -> &HashMap<String, OpenCLKernel>
pub const fn get_kernels(&self) -> &HashMap<String, OpenCLKernel>
Get the compiled kernel-source templates.
Sourcepub const fn get_stats(&self) -> &OpenCLStats
pub const fn get_stats(&self) -> &OpenCLStats
Get performance statistics.
Sourcepub const fn config(&self) -> &OpenCLConfig
pub const fn config(&self) -> &OpenCLConfig
Get the backend configuration.
Sourcepub fn kernel_source_templates(
config: &OpenCLConfig,
) -> HashMap<String, OpenCLKernel>
pub fn kernel_source_templates( config: &OpenCLConfig, ) -> HashMap<String, OpenCLKernel>
Build the standard set of quantum OpenCL kernel source templates.
Returns the kernels as text only; nothing here compiles or executes on a
device. Exposed as an associated function so the templates remain
reachable/inspectable even though Self::new cannot succeed in this
build.
Sourcepub fn build_options_for(config: &OpenCLConfig) -> String
pub fn build_options_for(config: &OpenCLConfig) -> String
Build OpenCL kernel-compilation options for the given configuration.
Auto Trait Implementations§
impl Freeze for AMDOpenCLSimulator
impl RefUnwindSafe for AMDOpenCLSimulator
impl Send for AMDOpenCLSimulator
impl Sync for AMDOpenCLSimulator
impl Unpin for AMDOpenCLSimulator
impl UnsafeUnpin for AMDOpenCLSimulator
impl UnwindSafe for AMDOpenCLSimulator
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Pointable for T
impl<T> Pointable for T
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.