Skip to content

Latest commit

 

History

History
19 lines (14 loc) · 1.61 KB

README.md

File metadata and controls

19 lines (14 loc) · 1.61 KB

Portably Performant Physical Algebra

This is a C++17 library that is meant to support High Performance Computing physics applications. P3A is meant primarily to help structured grid applications perform well on Intel CPUs, NVIDIA GPUs, and AMD GPUs, but can be used for other applications and can be extended for other hardware. P3A provides several "layers" of helpful tools:

  1. A p3a::dynamic_array class that is very similar to std::vector, except for an ExecutionPolicy template argument that helps it work on GPUs.
  2. A few algorithms modeled after C++17's parallel algorithms library such as p3a::for_each, p3a::transform_reduce, and p3a::copy. These include non-standard overloads for iterating over 3D grids.
  3. A set of tensor algebra types such as p3a::symmetric3x3, p3a::vector3, and p3a::matrix3x3, with relevant mathematical operator overloads and load/store helpers.
  4. A p3a::quantity<Unit, T, ...> scalar type that adds compile-time units checking and conversion
  5. A set of SIMD scalar types p3a::simd<T, Abi> that directly call CPU vector intrinsics. Currently this is limited to one for Intel AVX-512 and one that is just a scalar.

The ideal design for an application using P3A is to implement a physics code as a series of loops which perform outer loop vectorization, while keeping the C++ source code readable by using tensor types with overloaded mathematical operators.

P3A depends on Kokkos for its parallel algorithms, and MPICPP for its MPI interface.

At Sandia, P3A is SCR 2619.0