tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

order.h (1191B)


      1 // Copyright 2023 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.
     15 
     16 // Tag arguments that determine the sort order. Used by both vqsort.h and the
     17 // VQSortStatic in vqsort-inl.h. Moved to a separate header so that the latter
     18 // can be used without pulling in the dllimport statements in vqsort.h.
     19 
     20 #ifndef HIGHWAY_HWY_CONTRIB_SORT_ORDER_H_
     21 #define HIGHWAY_HWY_CONTRIB_SORT_ORDER_H_
     22 
     23 namespace hwy {
     24 
     25 struct SortAscending {
     26  static constexpr bool IsAscending() { return true; }
     27 };
     28 struct SortDescending {
     29  static constexpr bool IsAscending() { return false; }
     30 };
     31 
     32 }  // namespace hwy
     33 
     34 #endif  // HIGHWAY_HWY_CONTRIB_SORT_ORDER_H_