High Performance C++
Mathematics · Abstraction · Computation
A technical reference for modern C++, mathematical foundations, generic programming, and performance-oriented computation. Entries are organised by subject rather than by language revision, and each is developed from a formal statement through to a measured implementation.
Method
Every entry follows the same derivation. A subject is admitted only when it can be carried the whole way along it.
- AbstractionThe mathematical object and the structure it carries.
- SpecificationIts operations, laws and admissible domain, stated formally.
- Type / conceptThe C++ encoding of that specification as a constrained interface.
- ImplementationA generic algorithm written against the concept, not a type.
- ComplexityOperation counts and working set under a stated cost model.
- Hardware mappingLayout, locality, vector width, and the parallel decomposition.
- MeasurementTimings against a declared machine, compiler and method.
Contents
Modern C++
The language as a medium for stating abstractions exactly: templates, concepts, constraints, and computation performed during translation.
Language · Templates · Generic programming · Concepts · Constraints · Metaprogramming · Compile-time programming · constexpr / consteval · Standard library
Mathematics
The structures that generic components are written against (algebraic, analytic and probabilistic) stated in the form used later as concept requirements.
Algebra · Linear algebra · Analysis · Numerical analysis · Optimization · Probability · Computational mathematics
High Performance
Cost models above the asymptotic one: memory hierarchy, data layout, vector execution, and the machine models that concurrency is written against.
Computational complexity · Memory · Cache locality · Data layout · SIMD · Vectorization · Parallelism · Concurrency · GPU computing
Scientific Computing
Numerical kernels developed to the point of implementation: factorizations, sparse structure, quadrature, evolution equations and differentiation.
Numerical linear algebra · Sparse computation · Numerical integration · Differential equations · Partial differential equations · Automatic differentiation · Optimization
Formal C++
Types read as sets with operations, concepts as predicates over those types, and the semantic obligations that the type system does not check.
Types as abstractions · Concepts as predicates · Constraints · Semantic requirements · Type-level programming · Compile-time reasoning · Correctness
Supporting material
- ExamplesComplete derivations, each carried from a mathematical statement to a measured implementation.
- BenchmarksMeasurement method, reported hardware, and results for the kernels developed in the reference.
- Essays and NotesLonger arguments about abstraction, cost and correctness that do not belong in a reference entry.