Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
wjr-z committed Jan 17, 2024
1 parent 5bee26c commit f7a79d8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/wjr/math/set.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ WJR_INTRINSIC_CONSTEXPR_E void set_n(T *dst, type_identity_t<T> val, size_t n) {
}

if (WJR_BUILTIN_CONSTANT_P(val) && broadcast<uint8_t, T>(val) == val) {
if (WJR_UNLIKELY(n >= 2048)) {
if (WJR_UNLIKELY(n >= 2048 / sizeof(T))) {
::memset(dst, static_cast<uint8_t>(val), n * sizeof(T));
return;
}
Expand Down

0 comments on commit f7a79d8

Please sign in to comment.