Skip to content
Steven Munroe edited this page Nov 30, 2018 · 22 revisions

Welcome to the pveclib wiki!

This is the landing page for the POWER Vector Library (pveclib for short).

A library of useful vector functions for POWER. This library fills in the gap between the instructions defined in the POWER Instruction Set Architecture (PowerISA) and higher level library APIs. The intent is to improve the productivity of application developers who need to optimize their applications or dependent libraries for POWER. Rationale

The C/C++ language compilers (that support PowerISA) may implement vector intrinsic functions (compiler built-ins as embodied by altivec.h). These vector intrinsics offer an alternative to assembler programming, but do little to reduce the complexity of the underlying PowerISA. Higher level vector intrinsic operations are needed to improve productivity and encourage developers to optimize their applications for PowerISA. Another key goal is to smooth over the complexity of the evolving PowerISA and compiler support.

POWER Vector Library Goals

Obviously many useful operations can be constructed from existing PowerISA operations and GCC <altivec.h> built-ins but the implementation may not be obvious. The optimum sequence will vary across the PowerISA levels as new instructions are added. And finally the compiler's built-in support for new PowerISA instructions evolves with the compiler's release cycle.

So the goal of this project is to provide well crafted implementations of useful vector and large number operations.

  • Provide equivalent functions across versions of the PowerISA. This includes some of the most useful vector instructions added to POWER9 (PowerISA 3.0B). Many of these operations can be implemented as inline function in a few vector instructions on earlier PowerISA versions.
  • Provide equivalent functions across versions of the compiler. For example built-ins provided in later versions of the compiler can be implemented as inline functions with inline asm in earlier compiler versions.
  • Provide complete arithmetic operations across supported C types. For example multiply modulo and even/odd for char, short, int, long, and __int128. Another example inline versions for POSIX floating-point classification (isinf, isnan, isfininte, ...) functions across float, double, and __float128.
  • Provide complete extended arithmetic (carry / extend / multiple high) operations across supported C types. For example add / subtract with carry and extend for int, long, and __int128.
  • Provide higher order functions not provided directly by the PowerISA. For example vector SIMD implementation for ASCII __isalpha, etc. As another example full __int128 implementations of Count Leading Zeros, Population Count, Shift left/right immediate, and integer divide (or multiplicative inverse).
  • Such implementations should be small enough to inline and allow the compiler opportunity to apply common optimization techniques.

Current status

Under active development, almost version 1.0.

  • Operations Implemented: 283
  • POWER9 Specific cases: 76
  • POWER8 Specific cases: 83
  • GCC version specific cases: 31
  • Endian Specific cases: 75

The active documentation can be found here: POWER Vector Library Manual and POWER Vector Library Manual PDF This is the temporary home until we get to official 1.0.0 release.

Clone this wiki locally