Giter VIP home page Giter VIP logo

p3a's Introduction

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

p3a's People

Contributors

bgranzow avatar cjobrie avatar ibaned avatar lxmota avatar tjfulle avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

p3a's Issues

symmetric3x3 missing ops

symmetric3x3 is missing some operations common to its use as the container for a second order tensor:

  • isotropic_part
  • deviatoric_part
  • determinant
  • inverse
  • symmetric3x3 * symmetric3x3

dimension of isotropic_part

symmetric3x3::isotropic_part has auto d = trace(a) / T(3.0) which results in a unitless quantity. It should be simply auto d = trace(a) / 3.0 or similar

Missing functions

  • += and -= for adimensional_quantity<T>
  • exponentiate(adimensional_quantity<T>);
  • l2_norm(symmetric3x3<A>);

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.