Backed out 2 changesets (bug 903746) for causing non-unified build bustages on nsIPri...
[gecko.git] / third_party / highway / hwy / per_target.cc
blob2ebae93f35c129bd1453bd19f9b57a2f29c9329b
1 // Copyright 2022 Google LLC
2 // SPDX-License-Identifier: Apache-2.0
3 //
4 // Licensed under the Apache License, Version 2.0 (the "License");
5 // you may not use this file except in compliance with the License.
6 // You may obtain a copy of the License at
7 //
8 // http://www.apache.org/licenses/LICENSE-2.0
9 //
10 // Unless required by applicable law or agreed to in writing, software
11 // distributed under the License is distributed on an "AS IS" BASIS,
12 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 // See the License for the specific language governing permissions and
14 // limitations under the License.
16 #include "hwy/per_target.h"
18 #undef HWY_TARGET_INCLUDE
19 #define HWY_TARGET_INCLUDE "hwy/per_target.cc"
20 #include "hwy/foreach_target.h" // IWYU pragma: keep
21 #include "hwy/highway.h"
23 HWY_BEFORE_NAMESPACE();
24 namespace hwy {
25 namespace HWY_NAMESPACE {
26 size_t GetVectorBytes() { return Lanes(ScalableTag<uint8_t>()); }
27 // NOLINTNEXTLINE(google-readability-namespace-comments)
28 } // namespace HWY_NAMESPACE
30 } // namespace hwy
31 HWY_AFTER_NAMESPACE();
33 #if HWY_ONCE
34 namespace hwy {
35 namespace {
36 HWY_EXPORT(GetVectorBytes); // Local function.
37 } // namespace
39 size_t VectorBytes() { return HWY_DYNAMIC_DISPATCH(GetVectorBytes)(); }
41 } // namespace hwy
42 #endif // HWY_ONCE