19 #ifndef _libint2_src_lib_libint_vectorppc_h_ 20 #define _libint2_src_lib_libint_vectorppc_h_ 22 #include <libint2/type_traits.h> 25 #if defined(__clang__) && defined(__bgq__) 26 # include <qpxintrin.h> 29 #ifdef __VECTOR4DOUBLE__ 31 namespace libint2 {
namespace simd {
65 T a[4]; a[0] = a0; a[1] = a1; a[2] = a2; a[3] = a3;
84 operator double()
const {
85 double d0 = vec_extract(d, 0);
89 void convert(
double(&a)[4])
const {
99 c.d = vec_mul(_a.d, b.d);
106 c.d = vec_mul(a.d, _b.d);
116 c.d = vec_mul(_a.d, b.d);
127 c.d = vec_mul(a.d, _b.d);
134 c.d = vec_mul(a.d, b.d);
140 c.d = vec_add(a.d, b.d);
146 c.d = vec_sub(a.d, b.d);
152 c.d = vec_swdiv(a.d, b.d);
158 d.d = vec_madd(a.d, b.d, c.d);
163 d.d = vec_msub(a.d, b.d, c.d);
177 static const bool value =
true;
182 typedef double value_type;
183 static const size_t extent = 4;
193 #if (defined(__xlC__) || defined(__clang__)) && (defined(__bgp__) || defined(__blrts__)) 196 # include <builtins.h> 198 #if defined(__clang__) 199 # include <fp2intrin.h> 202 namespace libint2 {
namespace simd {
222 T a01[2]; a01[0] = a; a01[1] = a;
237 T a[2]; a[0] = a0; a[1] = a1;
242 T a01[2]; a01[0] = a; a01[1] = a;
257 operator double()
const {
258 double d0 = __creal(d);
262 void convert(
double(&a)[2])
const {
270 c.d = __fxpmul(b.d, a);
276 c.d = __fxpmul(a.d, b);
285 c.d = __fxpmul(b.d, (
double)a);
295 c.d = __fxpmul(a.d, (
double)b);
302 c.d = __fpmul(a.d, b.d);
308 c.d = __fpadd(a.d, b.d);
314 c.d = __fpsub(a.d, b.d);
326 d.d = __fpmadd(a.d, b.d, c.d);
331 d.d = __fpmsub(a.d, b.d, c.d);
345 static const bool value =
true;
350 typedef double value_type;
351 static const size_t extent = 2;
360 #endif // header guard Z fma_minus(X x, Y y, Z z)
Definition: intrinsic_operations.h:36
VectorFP2Double(T(&a)[2])
creates a vector of values initialized by an ordinary static-sized array
Definition: vector_ppc.h:229
Definition: type_traits.h:30
Defaults definitions for various parameters assumed by Libint.
Definition: algebra.cc:23
VectorQPXDouble(T a)
Initializes all elements to the same value.
Definition: vector_ppc.h:50
SafePtr< CTimeEntity< typename ProductType< T, U >::result > > operator*(const SafePtr< CTimeEntity< T > > &A, const SafePtr< CTimeEntity< U > > &B)
Creates product A*B.
Definition: entity.h:277
VectorFP2Double()
creates a vector of default-initialized values.
Definition: vector_ppc.h:216
Z fma_plus(X x, Y y, Z z)
Definition: intrinsic_operations.h:30
VectorQPXDouble(T a0, T a1, T a2, T a3)
creates a vector of values initialized by an ordinary static-sized array
Definition: vector_ppc.h:64
VectorQPXDouble(T(&a)[4])
creates a vector of values initialized by an ordinary static-sized array
Definition: vector_ppc.h:57
SIMD vector of 4 double-precision floating-point real numbers, operations on which use QPX instructio...
Definition: vector_ppc.h:37
VectorQPXDouble()
creates a vector of default-initialized values.
Definition: vector_ppc.h:45
SIMD vector of 2 double-precision floating-point real numbers, operations on which use FP2 (Double Hu...
Definition: vector_ppc.h:208
Definition: type_traits.h:25
VectorFP2Double(T a)
Initializes all elements to the same value.
Definition: vector_ppc.h:221
VectorFP2Double(T a0, T a1)
creates a vector of values initialized by an ordinary static-sized array
Definition: vector_ppc.h:236