class ngraph::Mask¶
each element in vector represents dimension and each element in set is an id of dimensions which contains zeros.
#include <mask_attribute.hpp>
class Mask:
public std::vector< std::set< uint64_t > >,
public std::enable_shared_from_this< Mask >
{
public:
// typedefs
typedef std::shared_ptr<Mask> Ptr;
// construction
Mask();
Mask(const ngraph::PartialShape& shape);
Mask(const size_t& size);
Mask(const size_t& size, const bool adjust_value);
Mask(const std::vector<value_type> val);
Mask(std::initializer_list<std::initializer_list<uint64_t>> list);
// methods
static const ::ov::DiscreteTypeInfo& get_type_info_static();
bool all_dims_are_empty() const;
std::vector<size_t> get_not_empty_dims();
bool is_shape_like() const;
void set_shape_like(bool flag);
void copy_value_from_mask(Mask \*const mask);
void copy_value_from_mask_reversed(Mask \*const mask);
void copy_value_from_mask_reversed_masked(
Mask \*const mask,
const std::set<int64_t>& idx_mask,
const bool invert_mask = false
);
Mask::Ptr intersect_masks_reversed(Mask \*const mask) const;
Mask::Ptr union_masks_reversed(Mask \*const mask) const;
void copy_and_slice_mask_from(
const ngraph::Mask \*const mask,
int64_t axis,
uint64_t split_start,
uint64_t split_end
);
bool add_callback(
const std::function<bool(Mask::Ptr)>& receive_callback,
Mask::Ptr mask
);
bool apply_callback(Mask::Ptr mask);
void invalidate();
void clean_dim_values();
void initialize_dependencies();
bool adjust_value() const;
};