#[repr(C)]pub struct FloatImm { /* private fields */ }Implementations§
Source§impl FloatImm
impl FloatImm
Sourcepub fn from_dtype(
dtype: DLDataType,
value: f64,
loc: impl Into<Location>,
) -> Result<Self>
pub fn from_dtype( dtype: DLDataType, value: f64, loc: impl Into<Location>, ) -> Result<Self>
The floating-point constant value of type dtype, checked to fit it
(C++ FloatImm(PrimType(dtype), value, loc)).
Trait Implementations§
Source§impl AnyCompatible for FloatImm
impl AnyCompatible for FloatImm
Source§unsafe fn is_undefined(field: *const Self) -> bool
unsafe fn is_undefined(field: *const Self) -> bool
Whether
field, which holds a value of this type or all-zero bytes,
holds all-zero bytes that are no value of this type, as a null object
reference, a string of type index None or a zero device type: a field
that a creator left undefined for reflection to set, as C++ UnsafeInit
leaves a reference undefined (null). Unlike a C++ undefined reference,
it is no value; a nullable reference is Option<T>, whose None is a
defined value. Read moreSource§unsafe fn copy_to_any_view(src: &Self, data: &mut TVMFFIAny)
unsafe fn copy_to_any_view(src: &Self, data: &mut TVMFFIAny)
the value to copy to TVMFFIAny
unsafe fn check_any_strict(data: &TVMFFIAny) -> bool
Source§unsafe fn copy_from_any_view_after_check(data: &TVMFFIAny) -> Self
unsafe fn copy_from_any_view_after_check(data: &TVMFFIAny) -> Self
Copy value from TVMFFIAny after checking
caller must ensure that the value is compatible with the type
Source§unsafe fn move_to_any(src: Self, data: &mut TVMFFIAny)
unsafe fn move_to_any(src: Self, data: &mut TVMFFIAny)
consume the value to move to Any
Source§unsafe fn move_from_any_after_check(data: &mut TVMFFIAny) -> Self
unsafe fn move_from_any_after_check(data: &mut TVMFFIAny) -> Self
the value to move from TVMFFIAny
NOTE: pay very careful attention to avoid memory leak! Read more
Source§unsafe fn try_cast_from_any_view(data: &TVMFFIAny) -> Result<Self, ()>
unsafe fn try_cast_from_any_view(data: &TVMFFIAny) -> Result<Self, ()>
try to cast the value from AnyView
Source§fn get_mismatch_type_info(data: &TVMFFIAny) -> String
fn get_mismatch_type_info(data: &TVMFFIAny) -> String
Get the type key of a type when TryCastFromAnyView fails.
Source§fn type_schema() -> String
fn type_schema() -> String
The type schema of the type: the JSON object C++
TypeTraits<T>::TypeSchema writes, which the type schemas of functions
and fields embed. Read moreSource§impl<'a> ArgIntoRef for &'a FloatImm
impl<'a> ArgIntoRef for &'a FloatImm
Source§impl ArgIntoRef for FloatImm
impl ArgIntoRef for FloatImm
Source§impl Deref for FloatImm
impl Deref for FloatImm
Source§type Target = FloatImmObj
type Target = FloatImmObj
The resulting type after dereferencing.
Source§fn deref(&self) -> &FloatImmObj
fn deref(&self) -> &FloatImmObj
Dereferences the value.
Source§impl From<&FloatImm> for ExprResult
impl From<&FloatImm> for ExprResult
Source§impl From<FloatImm> for ExprResult
impl From<FloatImm> for ExprResult
Source§impl From<f32> for FloatImm
An f32 is a float32 constant, as C++ converts a float to a PrimExpr.
impl From<f32> for FloatImm
An f32 is a float32 constant, as C++ converts a float to a PrimExpr.
Source§impl From<f64> for FloatImm
An f64 is a float64 constant. (C++ converts a double held by an Any to float32, as
prim::convert does.)
impl From<f64> for FloatImm
An f64 is a float64 constant. (C++ converts a double held by an Any to float32, as
prim::convert does.)
Source§impl<'a> IntoArgHolder for &'a FloatImm
impl<'a> IntoArgHolder for &'a FloatImm
Source§impl IntoArgHolder for FloatImm
impl IntoArgHolder for FloatImm
Source§impl ObjectRefCore for FloatImm
impl ObjectRefCore for FloatImm
type ContainerType = <ObjectArc<FloatImmObj> as Deref>::Target
fn data(this: &Self) -> &ObjectArc<Self::ContainerType>
fn into_data(this: Self) -> ObjectArc<Self::ContainerType>
Source§unsafe fn from_data(data: ObjectArc<Self::ContainerType>) -> Self
unsafe fn from_data(data: ObjectArc<Self::ContainerType>) -> Self
Construct a reference view from an owning container handle. Read more
Source§fn same_as<Other>(&self, other: &Other) -> boolwhere
Other: ObjectRefCore,
fn same_as<Other>(&self, other: &Other) -> boolwhere
Other: ObjectRefCore,
Return whether two object references point to the same allocation.
Source§fn downcast_ref<T>(&self) -> Option<&T>where
T: ObjectCore,
fn downcast_ref<T>(&self) -> Option<&T>where
T: ObjectCore,
Source§impl PrimOps for FloatImm
impl PrimOps for FloatImm
Source§fn to_expr_result(&self) -> ExprResult
fn to_expr_result(&self) -> ExprResult
This expression as an
ExprResult (a reference-count increment).Source§fn less_equal(&self, rhs: impl Operand) -> ExprResult
fn less_equal(&self, rhs: impl Operand) -> ExprResult
C++
a <= b (le).Source§fn greater_equal(&self, rhs: impl Operand) -> ExprResult
fn greater_equal(&self, rhs: impl Operand) -> ExprResult
C++
a >= b (ge).Source§fn logical_and(&self, rhs: impl IntoExpr) -> ExprResult
fn logical_and(&self, rhs: impl IntoExpr) -> ExprResult
C++
a && b (logical_and).Source§fn logical_or(&self, rhs: impl IntoExpr) -> ExprResult
fn logical_or(&self, rhs: impl IntoExpr) -> ExprResult
C++
a || b (logical_or).Source§fn div(&self, rhs: impl Operand) -> ExprResult
fn div(&self, rhs: impl Operand) -> ExprResult
C++
div: a / b, truncating for integers.Source§fn truncdiv(&self, rhs: impl Operand) -> ExprResult
fn truncdiv(&self, rhs: impl Operand) -> ExprResult
C++
truncdiv.Source§fn truncmod(&self, rhs: impl Operand) -> ExprResult
fn truncmod(&self, rhs: impl Operand) -> ExprResult
C++
truncmod.Source§fn floordiv(&self, rhs: impl Operand) -> ExprResult
fn floordiv(&self, rhs: impl Operand) -> ExprResult
C++
floordiv.Source§fn floormod(&self, rhs: impl Operand) -> ExprResult
fn floormod(&self, rhs: impl Operand) -> ExprResult
C++
floormod.Source§fn indexdiv(&self, rhs: impl Operand) -> ExprResult
fn indexdiv(&self, rhs: impl Operand) -> ExprResult
C++
indexdiv.Source§fn indexmod(&self, rhs: impl Operand) -> ExprResult
fn indexmod(&self, rhs: impl Operand) -> ExprResult
C++
indexmod.Source§fn ceildiv(&self, rhs: impl Operand) -> ExprResult
fn ceildiv(&self, rhs: impl Operand) -> ExprResult
C++
ceildiv.Source§fn min(&self, rhs: impl Operand) -> ExprResult
fn min(&self, rhs: impl Operand) -> ExprResult
C++
min.Source§fn max(&self, rhs: impl Operand) -> ExprResult
fn max(&self, rhs: impl Operand) -> ExprResult
C++
max.Source§fn bitwise_not(&self) -> ExprResult
fn bitwise_not(&self) -> ExprResult
C++
~a (bitwise_not).Source§fn floor(&self) -> ExprResult
fn floor(&self) -> ExprResult
C++
floor.Source§fn ceil(&self) -> ExprResult
fn ceil(&self) -> ExprResult
C++
ceil.Source§fn round(&self) -> ExprResult
fn round(&self) -> ExprResult
C++
round.Source§fn nearbyint(&self) -> ExprResult
fn nearbyint(&self) -> ExprResult
C++
nearbyint.Source§fn trunc(&self) -> ExprResult
fn trunc(&self) -> ExprResult
C++
trunc.Source§fn abs(&self) -> ExprResult
fn abs(&self) -> ExprResult
C++
abs.Source§fn isnan(&self) -> ExprResult
fn isnan(&self) -> ExprResult
C++
isnan.Source§fn isinf(&self) -> ExprResult
fn isinf(&self) -> ExprResult
C++
isinf.Source§fn isfinite(&self) -> ExprResult
fn isfinite(&self) -> ExprResult
C++
isfinite.Source§fn likely(&self) -> ExprResult
fn likely(&self) -> ExprResult
C++
likely.Source§fn assume(&self) -> ExprResult
fn assume(&self) -> ExprResult
C++
assume.Source§fn clz(&self) -> ExprResult
fn clz(&self) -> ExprResult
C++
clz.Source§fn exp(&self) -> ExprResult
fn exp(&self) -> ExprResult
C++
exp.Source§fn exp2(&self) -> ExprResult
fn exp2(&self) -> ExprResult
C++
exp2.Source§fn exp10(&self) -> ExprResult
fn exp10(&self) -> ExprResult
C++
exp10.Source§fn erf(&self) -> ExprResult
fn erf(&self) -> ExprResult
C++
erf.Source§fn sigmoid(&self) -> ExprResult
fn sigmoid(&self) -> ExprResult
C++
sigmoid.Source§fn sqrt(&self) -> ExprResult
fn sqrt(&self) -> ExprResult
C++
sqrt.Source§fn rsqrt(&self) -> ExprResult
fn rsqrt(&self) -> ExprResult
C++
rsqrt.Source§fn log(&self) -> ExprResult
fn log(&self) -> ExprResult
C++
log.Source§fn log2(&self) -> ExprResult
fn log2(&self) -> ExprResult
C++
log2.Source§fn log10(&self) -> ExprResult
fn log10(&self) -> ExprResult
C++
log10.Source§fn log1p(&self) -> ExprResult
fn log1p(&self) -> ExprResult
C++
log1p.Source§fn popcount(&self) -> ExprResult
fn popcount(&self) -> ExprResult
C++
popcount.Source§fn tanh(&self) -> ExprResult
fn tanh(&self) -> ExprResult
C++
tanh.Source§fn tan(&self) -> ExprResult
fn tan(&self) -> ExprResult
C++
tan.Source§fn cos(&self) -> ExprResult
fn cos(&self) -> ExprResult
C++
cos.Source§fn cosh(&self) -> ExprResult
fn cosh(&self) -> ExprResult
C++
cosh.Source§fn sin(&self) -> ExprResult
fn sin(&self) -> ExprResult
C++
sin.Source§fn sinh(&self) -> ExprResult
fn sinh(&self) -> ExprResult
C++
sinh.Source§fn asin(&self) -> ExprResult
fn asin(&self) -> ExprResult
C++
asin.Source§fn acos(&self) -> ExprResult
fn acos(&self) -> ExprResult
C++
acos.Source§fn atan(&self) -> ExprResult
fn atan(&self) -> ExprResult
C++
atan.Source§fn acosh(&self) -> ExprResult
fn acosh(&self) -> ExprResult
C++
acosh.Source§fn asinh(&self) -> ExprResult
fn asinh(&self) -> ExprResult
C++
asinh.Source§fn atanh(&self) -> ExprResult
fn atanh(&self) -> ExprResult
C++
atanh.Source§fn if_then_else(&self, t: impl IntoExpr, f: impl IntoExpr) -> ExprResult
fn if_then_else(&self, t: impl IntoExpr, f: impl IntoExpr) -> ExprResult
Auto Trait Implementations§
impl Freeze for FloatImm
impl RefUnwindSafe for FloatImm
impl Send for FloatImm
impl Sync for FloatImm
impl Unpin for FloatImm
impl UnwindSafe for FloatImm
Blanket Implementations§
Source§impl<T> ArgType for Twhere
T: ObjectRefCore + AnyCompatible + 'static,
impl<T> ArgType for Twhere
T: ObjectRefCore + AnyCompatible + 'static,
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> ObjectRefCast for Twhere
T: ObjectRefCore + AnyCompatible,
impl<T> ObjectRefCast for Twhere
T: ObjectRefCore + AnyCompatible,
Source§fn try_cast<B>(self) -> Result<B, Error>where
B: ObjectRefCore + AnyCompatible,
fn try_cast<B>(self) -> Result<B, Error>where
B: ObjectRefCore + AnyCompatible,
Consume
self and rewrap the underlying object as B without copying.