pub struct VerificationSuite {
pub name: String,
pub cases: Vec<VerificationCase>,
}Expand description
A suite of GPU vs CPU verification tests.
Fields§
§name: StringName of the suite.
cases: Vec<VerificationCase>Individual test cases.
Implementations§
Source§impl VerificationSuite
impl VerificationSuite
Sourcepub fn add_u8_case(
&mut self,
name: impl Into<String>,
gpu_output: &[u8],
cpu_output: &[u8],
metric: ToleranceMetric,
)
pub fn add_u8_case( &mut self, name: impl Into<String>, gpu_output: &[u8], cpu_output: &[u8], metric: ToleranceMetric, )
Add a test case comparing two u8 buffers.
Sourcepub fn add_f32_case(
&mut self,
name: impl Into<String>,
gpu_output: &[f32],
cpu_output: &[f32],
metric: ToleranceMetric,
)
pub fn add_f32_case( &mut self, name: impl Into<String>, gpu_output: &[f32], cpu_output: &[f32], metric: ToleranceMetric, )
Add a test case comparing two f32 buffers.
Sourcepub fn case_count(&self) -> usize
pub fn case_count(&self) -> usize
Number of test cases.
Sourcepub fn passed_count(&self) -> usize
pub fn passed_count(&self) -> usize
Number of passing test cases.
Sourcepub fn failed_count(&self) -> usize
pub fn failed_count(&self) -> usize
Number of failing test cases.
Sourcepub fn all_passed(&self) -> bool
pub fn all_passed(&self) -> bool
Whether all test cases passed.
Sourcepub fn failures(&self) -> Vec<&VerificationCase>
pub fn failures(&self) -> Vec<&VerificationCase>
Get all failing cases.
Trait Implementations§
Source§impl Clone for VerificationSuite
impl Clone for VerificationSuite
Source§fn clone(&self) -> VerificationSuite
fn clone(&self) -> VerificationSuite
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for VerificationSuite
impl RefUnwindSafe for VerificationSuite
impl Send for VerificationSuite
impl Sync for VerificationSuite
impl Unpin for VerificationSuite
impl UnsafeUnpin for VerificationSuite
impl UnwindSafe for VerificationSuite
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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>
Converts
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>
Converts
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 more