Skip to main content
Log in

Mojo struct

AndMask

@register_passable(trivial) struct AndMask[T: MHAMask, S: MHAMask, //, lhs: T, rhs: S]

Mask that's the AND of two masks.

Implemented traits

AnyType, Copyable, ExplicitlyCopyable, MHAMask, Movable, UnknownDestructibility

Aliases

apply_log2e_after_mask

alias apply_log2e_after_mask = get_vtable_entry(:trait<@nn::@mha_mask::@MHAMask> T, "apply_log2e_after_mask") if get_vtable_entry(:trait<@nn::@mha_mask::@MHAMask> T, "apply_log2e_after_mask") else get_vtable_entry(:trait<@nn::@mha_mask::@MHAMask> S, "apply_log2e_after_mask")

mask_out_of_bound

alias mask_out_of_bound = get_vtable_entry(:trait<@nn::@mha_mask::@MHAMask> T, "mask_out_of_bound") if get_vtable_entry(:trait<@nn::@mha_mask::@MHAMask> T, "mask_out_of_bound") else get_vtable_entry(:trait<@nn::@mha_mask::@MHAMask> S, "mask_out_of_bound")

mask_safe_out_of_bounds

alias mask_safe_out_of_bounds = get_vtable_entry(:trait<@nn::@mha_mask::@MHAMask> S, "mask_safe_out_of_bounds") if get_vtable_entry(:trait<@nn::@mha_mask::@MHAMask> T, "mask_safe_out_of_bounds") else get_vtable_entry(:trait<@nn::@mha_mask::@MHAMask> T, "mask_safe_out_of_bounds")

Methods

mask

mask[type: DType, width: Int, //, *, element_type: DType = uint32](self, coord: IndexList[4, element_type=element_type], score_vec: SIMD[type, width]) -> SIMD[type, width]

status

status[*, element_type: DType = uint32](self, tile_offset: IndexList[2, element_type=element_type], tile_size: IndexList[2, element_type=element_type]) -> TileMaskStatus