Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

Modify mask operators to remove explicit mask where it isn't needed

Đang mở
#13 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
50/100
Loại issue
Tái cấu trúc
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
cpp
Lĩnh vực
performance

Hướng nghiên cứu

Locate the mask operators that currently call from_builtin, along with the from_raw and from_prechecked_builtin entry points. Determine which operations preserve valid mask bits without extra masking, update only those conversions, and verify that operators such as complement still remove unwanted bits.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

enhancement

The compact mask is a plain integer, which may be bigger than the bits actually being masked (e.g., 64-bit value for a mask of 40 bits).

The operators call from_builtin to convert the output of the operation to a mask, and in doing so this explicitly masks off the unwanted bits of the mask to make sure that the extraneous bits don't have some unintended side-effect. For example, calling ~ will set some of the out-of-bound bits to 1, which can introduce subtle issues.

But some operators are guaranteed to produce a valid output provided the inputs are valid. For example, given two masks of 40 bits each, their internal values will not contain any bits beyond position 40. Performing an AND will produce an output which also is limited to 40 bits. In such a case, rather than calling from_builtin, an alternative from_raw (or from_prechecked_builtin) could be called which omits the extra AND operation to mask off unwanted bits. This would be opt-in - only operators known to generate valid bits would call this.

Ngôn ngữ chính
C++
Star
5
Fork
2
Merge trung bình
1 ngày 11 giờ
Pull request đã merge (30 ngày)
20

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của intel/xvec

Tất cả issue của intel/xvec

Issue tương tự

Thêm issue về C++

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.