21#ifndef _libint2_src_lib_libint_vectorppc_h_
22#define _libint2_src_lib_libint_vectorppc_h_
24#include <libint2/util/type_traits.h>
27#if defined(__clang__) && defined(__bgq__)
31#ifdef __VECTOR4DOUBLE__
87 operator double()
const {
88 double d0 = vec_extract(d, 0);
92 void convert(
double (&a)[4])
const { vec_st(d, 0, &a[0]); }
96inline VectorQPXDouble
operator*(
double a, VectorQPXDouble b) {
98 VectorQPXDouble _a(a);
99 c.d = vec_mul(_a.d, b.d);
103inline VectorQPXDouble
operator*(VectorQPXDouble a,
double b) {
105 VectorQPXDouble _b(b);
106 c.d = vec_mul(a.d, _b.d);
110inline VectorQPXDouble
operator*(
int a, VectorQPXDouble b) {
115 VectorQPXDouble _a((
double)a);
116 c.d = vec_mul(_a.d, b.d);
121inline VectorQPXDouble
operator*(VectorQPXDouble a,
int b) {
126 VectorQPXDouble _b((
double)b);
127 c.d = vec_mul(a.d, _b.d);
132inline VectorQPXDouble
operator*(VectorQPXDouble a, VectorQPXDouble b) {
134 c.d = vec_mul(a.d, b.d);
138inline VectorQPXDouble operator+(VectorQPXDouble a, VectorQPXDouble b) {
140 c.d = vec_add(a.d, b.d);
144inline VectorQPXDouble operator-(VectorQPXDouble a, VectorQPXDouble b) {
146 c.d = vec_sub(a.d, b.d);
150inline VectorQPXDouble operator/(VectorQPXDouble a, VectorQPXDouble b) {
152 c.d = vec_swdiv(a.d, b.d);
156inline VectorQPXDouble
fma_plus(VectorQPXDouble a, VectorQPXDouble b,
159 d.d = vec_madd(a.d, b.d, c.d);
162inline VectorQPXDouble
fma_minus(VectorQPXDouble a, VectorQPXDouble b,
165 d.d = vec_msub(a.d, b.d, c.d);
180 static const bool value =
true;
185 typedef double scalar_type;
186 static const size_t extent = 4;
197#if (defined(__xlC__) || defined(__clang__)) && \
198 (defined(__bgp__) || defined(__blrts__))
203#if defined(__clang__)
204#include <fp2intrin.h>
267 operator double()
const {
268 double d0 = __creal(d);
272 void convert(
double (&a)[2])
const { __stfpd(&a[0], d); }
276inline VectorFP2Double
operator*(
double a, VectorFP2Double b) {
278 c.d = __fxpmul(b.d, a);
282inline VectorFP2Double
operator*(VectorFP2Double a,
double b) {
284 c.d = __fxpmul(a.d, b);
288inline VectorFP2Double
operator*(
int a, VectorFP2Double b) {
293 c.d = __fxpmul(b.d, (
double)a);
298inline VectorFP2Double
operator*(VectorFP2Double a,
int b) {
303 c.d = __fxpmul(a.d, (
double)b);
308inline VectorFP2Double
operator*(VectorFP2Double a, VectorFP2Double b) {
310 c.d = __fpmul(a.d, b.d);
314inline VectorFP2Double operator+(VectorFP2Double a, VectorFP2Double b) {
316 c.d = __fpadd(a.d, b.d);
320inline VectorFP2Double operator-(VectorFP2Double a, VectorFP2Double b) {
322 c.d = __fpsub(a.d, b.d);
332inline VectorFP2Double
fma_plus(VectorFP2Double a, VectorFP2Double b,
335 d.d = __fpmadd(a.d, b.d, c.d);
338inline VectorFP2Double
fma_minus(VectorFP2Double a, VectorFP2Double b,
341 d.d = __fpmsub(a.d, b.d, c.d);
356 static const bool value =
true;
361 typedef double scalar_type;
362 static const size_t extent = 2;
Defaults definitions for various parameters assumed by Libint.
Definition algebra.cc:24
auto fma_plus(X x, Y y, Z z) -> decltype(x *y+z)
Definition intrinsic_operations.h:37
std::shared_ptr< CTimeEntity< typename ProductType< T, U >::result > > operator*(const std::shared_ptr< CTimeEntity< T > > &A, const std::shared_ptr< CTimeEntity< U > > &B)
Creates product A*B.
Definition entity.h:302
auto fma_minus(X x, Y y, Z z) -> decltype(x *y - z)
Definition intrinsic_operations.h:43
Definition type_traits.h:29
SIMD vector of 2 double-precision floating-point real numbers, operations on which use FP2 (Double Hu...
Definition vector_ppc.h:215
VectorFP2Double()
creates a vector of default-initialized values.
Definition vector_ppc.h:222
VectorFP2Double(T a0, T a1)
creates a vector of values initialized by an ordinary static-sized array
Definition vector_ppc.h:242
VectorFP2Double(T a)
Initializes all elements to the same value.
Definition vector_ppc.h:227
VectorFP2Double(T(&a)[2])
creates a vector of values initialized by an ordinary static-sized array
Definition vector_ppc.h:237
SIMD vector of 4 double-precision floating-point real numbers, operations on which use QPX instructio...
Definition vector_ppc.h:41
VectorQPXDouble()
creates a vector of default-initialized values.
Definition vector_ppc.h:48
VectorQPXDouble(T a)
Initializes all elements to the same value.
Definition vector_ppc.h:53
VectorQPXDouble(T(&a)[4])
creates a vector of values initialized by an ordinary static-sized array
Definition vector_ppc.h:58
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:63
Definition type_traits.h:34