这是indexloc提供的服务,不要输入任何密码
Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions hwy/ops/arm_sve-inl.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// Copyright 2021 Google LLC
// Copyright 2025 Arm Limited and/or its affiliates <open-source-office@arm.com>
// SPDX-License-Identifier: Apache-2.0
//
// Licensed under the Apache License, Version 2.0 (the "License");
Expand Down Expand Up @@ -389,8 +390,17 @@ HWY_API svbool_t PFalse() { return svpfalse_b(); }
//
// This is used in functions that load/store memory; other functions (e.g.
// arithmetic) can ignore d and use PTrue instead.
//
// Always use FirstN(N) for HWY_TARGET == HWY_SVE2_128 to avoid vector length
// information loss when using PTrue(d) predicates in memory intrinsics.
//
// SVE2_256 is untested due to unavailable hardware and cannot assume
// equal minimum and maximum vector lengths as SVE2_128 can.
template <class D>
svbool_t MakeMask(D d) {
#if (HWY_TARGET == HWY_SVE2_128)
return FirstN(d, Lanes(d));
#endif
return IsFull(d) ? PTrue(d) : FirstN(d, Lanes(d));
}

Expand Down