pub struct MemRefType<'c> { /* private fields */ }Expand description
A mem-ref type.
Implementations§
Source§impl<'c> MemRefType<'c>
impl<'c> MemRefType<'c>
Sourcepub fn new(
type: Type<'c>,
dimensions: &[i64],
layout: Option<Attribute<'c>>,
memory_space: Option<Attribute<'c>>,
) -> Self
pub fn new( type: Type<'c>, dimensions: &[i64], layout: Option<Attribute<'c>>, memory_space: Option<Attribute<'c>>, ) -> Self
Creates a mem-ref type.
Sourcepub fn checked(
location: Location<'c>,
type: Type<'c>,
dimensions: &[u64],
layout: Attribute<'c>,
memory_space: Attribute<'c>,
) -> Option<Self>
pub fn checked( location: Location<'c>, type: Type<'c>, dimensions: &[u64], layout: Attribute<'c>, memory_space: Attribute<'c>, ) -> Option<Self>
Creates a mem-ref type with diagnostics.
Sourcepub fn contiguous(
element_type: Type<'c>,
dimensions: &[i64],
memory_space: Option<Attribute<'c>>,
) -> Self
pub fn contiguous( element_type: Type<'c>, dimensions: &[i64], memory_space: Option<Attribute<'c>>, ) -> Self
Creates a contiguous mem-ref type (identity layout).
Sourcepub fn contiguous_checked(
location: Location<'c>,
element_type: Type<'c>,
dimensions: &[i64],
memory_space: Option<Attribute<'c>>,
) -> Option<Self>
pub fn contiguous_checked( location: Location<'c>, element_type: Type<'c>, dimensions: &[i64], memory_space: Option<Attribute<'c>>, ) -> Option<Self>
Creates a contiguous mem-ref type with diagnostics.
Sourcepub fn strides_and_offset(&self) -> (Vec<i64>, i64)
pub fn strides_and_offset(&self) -> (Vec<i64>, i64)
Returns the strides and offset of the mem-ref type.
Returns a tuple of (strides, offset) where strides has length equal
to the rank.
Sourcepub fn affine_map(&self) -> AffineMap<'c>
pub fn affine_map(&self) -> AffineMap<'c>
Returns an affine map.
Sourcepub fn memory_space(&self) -> Option<Attribute<'c>>
pub fn memory_space(&self) -> Option<Attribute<'c>>
Returns a memory space.
Trait Implementations§
Source§impl<'c> Clone for MemRefType<'c>
impl<'c> Clone for MemRefType<'c>
Source§fn clone(&self) -> MemRefType<'c>
fn clone(&self) -> MemRefType<'c>
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 moreSource§impl<'c> Debug for MemRefType<'c>
impl<'c> Debug for MemRefType<'c>
Source§impl<'c> Display for MemRefType<'c>
impl<'c> Display for MemRefType<'c>
Source§impl<'c> From<MemRefType<'c>> for Type<'c>
impl<'c> From<MemRefType<'c>> for Type<'c>
Source§fn from(value: MemRefType<'c>) -> Self
fn from(value: MemRefType<'c>) -> Self
Converts to this type from the input type.
Source§impl<'c> Hash for MemRefType<'c>
impl<'c> Hash for MemRefType<'c>
Source§impl<'c> ShapedTypeLike<'c> for MemRefType<'c>
impl<'c> ShapedTypeLike<'c> for MemRefType<'c>
Source§fn has_static_shape(&self) -> bool
fn has_static_shape(&self) -> bool
Checks if a type has a static shape (all dimensions are static).
Source§fn is_dynamic_stride_or_offset(value: i64) -> bool
fn is_dynamic_stride_or_offset(value: i64) -> bool
Checks if a value represents a dynamic stride or offset.
Source§fn is_static_stride_or_offset(value: i64) -> bool
fn is_static_stride_or_offset(value: i64) -> bool
Checks if a value represents a static stride or offset.
Source§fn dynamic_stride_or_offset() -> i64
fn dynamic_stride_or_offset() -> i64
Returns the sentinel value for a dynamic stride or offset.
Source§impl<'c> TryFrom<Type<'c>> for MemRefType<'c>
impl<'c> TryFrom<Type<'c>> for MemRefType<'c>
Source§impl<'c> TypeLike<'c> for MemRefType<'c>
impl<'c> TypeLike<'c> for MemRefType<'c>
Source§fn context(&self) -> ContextRef<'c>
fn context(&self) -> ContextRef<'c>
Returns a context.
Source§fn is_any_quantized_type(&self) -> bool
fn is_any_quantized_type(&self) -> bool
Returns
true if a type is any quantized type.Source§fn is_calibrated_quantized_type(&self) -> bool
fn is_calibrated_quantized_type(&self) -> bool
Returns
true if a type is calibrated quantized type.Source§fn is_complex(&self) -> bool
fn is_complex(&self) -> bool
Returns
true if a type is complex.Source§fn is_float_4_e_2_m_1_fn(&self) -> bool
fn is_float_4_e_2_m_1_fn(&self) -> bool
Returns
true if a type is float 4 e 2 m 1 fn.Source§fn is_float_6_e_2_m_3_fn(&self) -> bool
fn is_float_6_e_2_m_3_fn(&self) -> bool
Returns
true if a type is float 6 e 2 m 3 fn.Source§fn is_float_6_e_3_m_2_fn(&self) -> bool
fn is_float_6_e_3_m_2_fn(&self) -> bool
Returns
true if a type is float 6 e 3 m 2 fn.Source§fn is_float8e3m4(&self) -> bool
fn is_float8e3m4(&self) -> bool
Returns
true if a type is float8e3m4.Source§fn is_float8e4m3(&self) -> bool
fn is_float8e4m3(&self) -> bool
Returns
true if a type is float8e4m3.Source§fn is_float8e4m3_b_11_fnuz(&self) -> bool
fn is_float8e4m3_b_11_fnuz(&self) -> bool
Returns
true if a type is float8e4m3 b 11 fnuz.Source§fn is_float8e4m3fn(&self) -> bool
fn is_float8e4m3fn(&self) -> bool
Returns
true if a type is float8e4m3fn.Source§fn is_float8e4m3fnuz(&self) -> bool
fn is_float8e4m3fnuz(&self) -> bool
Returns
true if a type is float8e4m3fnuz.Source§fn is_float8e5m2(&self) -> bool
fn is_float8e5m2(&self) -> bool
Returns
true if a type is float8e5m2.Source§fn is_float8e5m2fnuz(&self) -> bool
fn is_float8e5m2fnuz(&self) -> bool
Returns
true if a type is float8e5m2fnuz.Source§fn is_float8e8m0fnu(&self) -> bool
fn is_float8e8m0fnu(&self) -> bool
Returns
true if a type is float8e8m0fnu.Source§fn is_function(&self) -> bool
fn is_function(&self) -> bool
Returns
true if a type is function.Source§fn is_gpu_async_token_type(&self) -> bool
fn is_gpu_async_token_type(&self) -> bool
Returns
true if a type is gpu async token type.Source§fn is_integer(&self) -> bool
fn is_integer(&self) -> bool
Returns
true if a type is integer.Source§fn is_llvm_pointer_type(&self) -> bool
fn is_llvm_pointer_type(&self) -> bool
Returns
true if a type is llvm pointer type.Source§fn is_llvm_struct_type(&self) -> bool
fn is_llvm_struct_type(&self) -> bool
Returns
true if a type is llvm struct type.Source§fn is_mem_ref(&self) -> bool
fn is_mem_ref(&self) -> bool
Returns
true if a type is mem ref.Source§fn is_nvgpu_tensor_map_descriptor_type(&self) -> bool
fn is_nvgpu_tensor_map_descriptor_type(&self) -> bool
Returns
true if a type is nvgpu tensor map descriptor type.Source§fn is_pdl_attribute_type(&self) -> bool
fn is_pdl_attribute_type(&self) -> bool
Returns
true if a type is pdl attribute type.Source§fn is_pdl_operation_type(&self) -> bool
fn is_pdl_operation_type(&self) -> bool
Returns
true if a type is pdl operation type.Source§fn is_pdl_range_type(&self) -> bool
fn is_pdl_range_type(&self) -> bool
Returns
true if a type is pdl range type.Source§fn is_pdl_type(&self) -> bool
fn is_pdl_type(&self) -> bool
Returns
true if a type is pdl type.Source§fn is_pdl_type_type(&self) -> bool
fn is_pdl_type_type(&self) -> bool
Returns
true if a type is pdl type type.Source§fn is_pdl_value_type(&self) -> bool
fn is_pdl_value_type(&self) -> bool
Returns
true if a type is pdl value type.Source§fn is_quantized_type(&self) -> bool
fn is_quantized_type(&self) -> bool
Returns
true if a type is quantized type.Source§fn is_ranked_tensor(&self) -> bool
fn is_ranked_tensor(&self) -> bool
Returns
true if a type is ranked tensor.Source§fn is_transform_any_op_type(&self) -> bool
fn is_transform_any_op_type(&self) -> bool
Returns
true if a type is transform any op type.Source§fn is_transform_any_param_type(&self) -> bool
fn is_transform_any_param_type(&self) -> bool
Returns
true if a type is transform any param type.Source§fn is_transform_any_value_type(&self) -> bool
fn is_transform_any_value_type(&self) -> bool
Returns
true if a type is transform any value type.Source§fn is_transform_operation_type(&self) -> bool
fn is_transform_operation_type(&self) -> bool
Returns
true if a type is transform operation type.Source§fn is_transform_param_type(&self) -> bool
fn is_transform_param_type(&self) -> bool
Returns
true if a type is transform param type.Source§fn is_uniform_quantized_per_axis_type(&self) -> bool
fn is_uniform_quantized_per_axis_type(&self) -> bool
Returns
true if a type is uniform quantized per axis type.Source§fn is_uniform_quantized_type(&self) -> bool
fn is_uniform_quantized_type(&self) -> bool
Returns
true if a type is uniform quantized type.Source§fn is_unranked_mem_ref(&self) -> bool
fn is_unranked_mem_ref(&self) -> bool
Returns
true if a type is unranked mem ref.Source§fn is_unranked_tensor(&self) -> bool
fn is_unranked_tensor(&self) -> bool
Returns
true if a type is unranked tensor.impl<'c> Copy for MemRefType<'c>
Auto Trait Implementations§
impl<'c> Freeze for MemRefType<'c>
impl<'c> RefUnwindSafe for MemRefType<'c>
impl<'c> !Send for MemRefType<'c>
impl<'c> !Sync for MemRefType<'c>
impl<'c> Unpin for MemRefType<'c>
impl<'c> UnwindSafe for MemRefType<'c>
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