TraceMaker
C++ API of the engine
Loading...
Searching...
No Matches
tmk Namespace Reference

Namespaces

namespace  advice
namespace  analysis
namespace  app
namespace  events
namespace  detail
namespace  crules
namespace  drc
namespace  geom
namespace  gpu
namespace  index
namespace  io
namespace  learn
namespace  model
namespace  passes
namespace  place
namespace  route
namespace  server
namespace  session
namespace  sexpr

Classes

struct  U32x4
struct  U32x2
class  RngStream
 A random stream identified by (seed, stage, item). More...

Typedefs

using Coord = std::int64_t
 Engine coordinate: signed 64-bit nanometres.

Functions

std::optional< double > parse_double (std::string_view s)
 Parses all of s as a decimal floating-point number, independent of the C locale; nullopt if it is not one or a character is left over.
TM_HD_INLINE constexpr U32x4 philox4x32_10 (U32x4 ctr, U32x2 key)
 One Philox4x32-10 block: 128 random bits for a 128-bit counter under a 64-bit key.
TM_HD_INLINE constexpr std::uint64_t splitmix64 (std::uint64_t x)
 SplitMix64 finaliser: a fast, well-mixed 64-bit hash, used to derive keys and for hashing ids.
Coord mm_to_nm (double mm)
 Converts millimetres to nanometres, rounding half away from zero (KiCad's parser behaviour).
TM_HD_INLINE double nm_to_mm (Coord nm)
std::string_view version ()
 TraceMaker version string, e.g. "0.1.0".

Variables

constexpr Coord kNmPerMm = 1'000'000
constexpr Coord kNmPerMil = 25'400

Typedef Documentation

◆ Coord

using tmk::Coord = std::int64_t

Engine coordinate: signed 64-bit nanometres.

KiCad's internal unit is also 1 nm, so file round-trips are exact. Millimetres appear only at I/O and UI boundaries.

Definition at line 12 of file units.hpp.

Function Documentation

◆ mm_to_nm()

Coord tmk::mm_to_nm ( double mm)
inline

Converts millimetres to nanometres, rounding half away from zero (KiCad's parser behaviour).

Definition at line 18 of file units.hpp.

◆ nm_to_mm()

TM_HD_INLINE double tmk::nm_to_mm ( Coord nm)

Definition at line 20 of file units.hpp.

◆ parse_double()

std::optional< double > tmk::parse_double ( std::string_view s)
inline

Parses all of s as a decimal floating-point number, independent of the C locale; nullopt if it is not one or a character is left over.

Apple's libc++ marks floating-point std::from_chars unavailable before macOS 26, so Apple platforms use the strtod_l path (D135).

Definition at line 57 of file parse_double.hpp.

◆ philox4x32_10()

TM_HD_INLINE constexpr U32x4 tmk::philox4x32_10 ( U32x4 ctr,
U32x2 key )
constexpr

One Philox4x32-10 block: 128 random bits for a 128-bit counter under a 64-bit key.

Definition at line 36 of file rng.hpp.

◆ splitmix64()

TM_HD_INLINE constexpr std::uint64_t tmk::splitmix64 ( std::uint64_t x)
constexpr

SplitMix64 finaliser: a fast, well-mixed 64-bit hash, used to derive keys and for hashing ids.

Definition at line 53 of file rng.hpp.

◆ version()

std::string_view tmk::version ( )

TraceMaker version string, e.g. "0.1.0".

Variable Documentation

◆ kNmPerMil

Coord tmk::kNmPerMil = 25'400
inlineconstexpr

Definition at line 15 of file units.hpp.

◆ kNmPerMm

Coord tmk::kNmPerMm = 1'000'000
inlineconstexpr

Definition at line 14 of file units.hpp.