-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into chiphogg/cmake-ci#304
- Loading branch information
Showing
12 changed files
with
201 additions
and
70 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,6 +14,7 @@ | |
|
||
#pragma once | ||
|
||
#include "au/fwd.hh" | ||
#include "au/packs.hh" | ||
#include "au/power_aliases.hh" | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,168 @@ | ||
// Copyright 2024 Aurora Operations, Inc. | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
|
||
#pragma once | ||
|
||
#include <cstdint> | ||
|
||
namespace au { | ||
|
||
struct Zero; | ||
|
||
template <typename... BPs> | ||
struct Dimension; | ||
|
||
template <typename... BPs> | ||
struct Magnitude; | ||
|
||
template <typename UnitT> | ||
struct QuantityMaker; | ||
|
||
template <typename Unit> | ||
struct SingularNameFor; | ||
|
||
template <typename UnitT> | ||
struct QuantityPointMaker; | ||
|
||
template <typename UnitT, typename RepT> | ||
class Quantity; | ||
|
||
// | ||
// Quantity aliases to set a particular Rep. | ||
// | ||
// This presents a less cumbersome interface for end users. | ||
// | ||
template <typename UnitT> | ||
using QuantityD = Quantity<UnitT, double>; | ||
template <typename UnitT> | ||
using QuantityF = Quantity<UnitT, float>; | ||
template <typename UnitT> | ||
using QuantityI = Quantity<UnitT, int>; | ||
template <typename UnitT> | ||
using QuantityU = Quantity<UnitT, unsigned int>; | ||
template <typename UnitT> | ||
using QuantityI32 = Quantity<UnitT, int32_t>; | ||
template <typename UnitT> | ||
using QuantityU32 = Quantity<UnitT, uint32_t>; | ||
template <typename UnitT> | ||
using QuantityI64 = Quantity<UnitT, int64_t>; | ||
template <typename UnitT> | ||
using QuantityU64 = Quantity<UnitT, uint64_t>; | ||
|
||
template <typename T> | ||
struct CorrespondingQuantity; | ||
|
||
template <typename UnitT, typename RepT> | ||
class QuantityPoint; | ||
|
||
// | ||
// QuantityPoint aliases to set a particular Rep. | ||
// | ||
// This presents a less cumbersome interface for end users. | ||
// | ||
template <typename UnitT> | ||
using QuantityPointD = QuantityPoint<UnitT, double>; | ||
template <typename UnitT> | ||
using QuantityPointF = QuantityPoint<UnitT, float>; | ||
template <typename UnitT> | ||
using QuantityPointI = QuantityPoint<UnitT, int>; | ||
template <typename UnitT> | ||
using QuantityPointU = QuantityPoint<UnitT, unsigned int>; | ||
template <typename UnitT> | ||
using QuantityPointI32 = QuantityPoint<UnitT, int32_t>; | ||
template <typename UnitT> | ||
using QuantityPointU32 = QuantityPoint<UnitT, uint32_t>; | ||
template <typename UnitT> | ||
using QuantityPointI64 = QuantityPoint<UnitT, int64_t>; | ||
template <typename UnitT> | ||
using QuantityPointU64 = QuantityPoint<UnitT, uint64_t>; | ||
|
||
template <typename Unit> | ||
struct Constant; | ||
|
||
template <typename Unit> | ||
struct SymbolFor; | ||
|
||
template <template <class U> class Prefix> | ||
struct PrefixApplier; | ||
|
||
// SI Prefixes. | ||
template <typename U> | ||
struct Quetta; | ||
template <typename U> | ||
struct Ronna; | ||
template <typename U> | ||
struct Yotta; | ||
template <typename U> | ||
struct Zetta; | ||
template <typename U> | ||
struct Exa; | ||
template <typename U> | ||
struct Peta; | ||
template <typename U> | ||
struct Tera; | ||
template <typename U> | ||
struct Giga; | ||
template <typename U> | ||
struct Mega; | ||
template <typename U> | ||
struct Kilo; | ||
template <typename U> | ||
struct Hecto; | ||
template <typename U> | ||
struct Deka; | ||
template <typename U> | ||
struct Deci; | ||
template <typename U> | ||
struct Centi; | ||
template <typename U> | ||
struct Milli; | ||
template <typename U> | ||
struct Micro; | ||
template <typename U> | ||
struct Nano; | ||
template <typename U> | ||
struct Pico; | ||
template <typename U> | ||
struct Femto; | ||
template <typename U> | ||
struct Atto; | ||
template <typename U> | ||
struct Zepto; | ||
template <typename U> | ||
struct Yocto; | ||
template <typename U> | ||
struct Ronto; | ||
template <typename U> | ||
struct Quecto; | ||
|
||
// Binary Prefixes. | ||
template <typename U> | ||
struct Yobi; | ||
template <typename U> | ||
struct Zebi; | ||
template <typename U> | ||
struct Exbi; | ||
template <typename U> | ||
struct Pebi; | ||
template <typename U> | ||
struct Tebi; | ||
template <typename U> | ||
struct Gibi; | ||
template <typename U> | ||
struct Mebi; | ||
template <typename U> | ||
struct Kibi; | ||
|
||
} // namespace au |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.