33 #ifndef MADNESS_TENSOR_ALIGNED_H__INCLUDED
34 #define MADNESS_TENSOR_ALIGNED_H__INCLUDED
53 void aligned_zero(
long n,
T*
a) {
56 std::memset((
void *) a, 0, n*
sizeof(
T));
60 for (
long i=0; i<n4; i+=4,a+=4) {
66 for (
long i=0; i<rem; ++i) *a++ = 0;
70 template <
typename T,
typename Q>
76 for (
long i=0; i<n4; i+=4,a+=4,b+=4) {
82 for (
long i=0; i<rem; ++i) *a++ += s * *b++;
85 template <
typename T,
typename Q>
91 for (
long i=0; i<n4; i+=4,a+=4,b+=4) {
97 for (
long i=0; i<rem; ++i) *a++ += *b++;
100 template <
typename T,
typename Q>
106 for (
long i=0; i<n4; i+=4,a+=4,b+=4) {
112 for (
long i=0; i<rem; ++i) *a++ -= *b++;
116 #endif // MADNESS_TENSOR_ALIGNED_H__INCLUDED
void aligned_add(long n, double *restrict a, const double *restrict b)
Defines and implements most of Tensor.
const T1 &f1 return GTEST_2_TUPLE_() T(f0, f1)
FLOAT a(int j, FLOAT z)
Definition: y1.cc:86
void aligned_sub(long n, double *restrict a, const double *restrict b)
#define restrict
Definition: config.h:403
Holds machinery to set up Functions/FuncImpls using various Factories and Interfaces.
Definition: chem/atomutil.cc:45
FLOAT b(int j, FLOAT z)
Definition: y1.cc:79