21 int main(
int argc,
char* argv[])
24 int size2 = size *
size;
25 Scalar* a = internal::aligned_new<Scalar>(size2);
26 Scalar* b = internal::aligned_new<Scalar>(size2+4)+1;
27 Scalar* c = internal::aligned_new<Scalar>(size2);
31 a[
i] = b[
i] = c[
i] = 0;
37 for (
int k=0; k<10; ++k)
43 std::cout << timer.
value() <<
"s " << (double(size2*
REPEAT)/timer.
value())/(1024.*1024.*1024.) <<
" GFlops\n";
45 for (
int innersize = size; innersize>2 ; --innersize)
47 if (size2%innersize==0)
49 int outersize = size2/innersize;
54 for (
int k=0; k<3; ++k)
60 std::cout << innersize <<
" x " << outersize <<
" " << timer.
value() <<
"s " << (double(size2*REPEAT)/timer.
value())/(1024.*1024.*1024.) <<
" GFlops\n";
68 for (
int k=0; k<3; ++k)
74 std::cout << timer.
value() <<
"s " << (double(size2*REPEAT)/timer.
value())/(1024.*1024.*1024.) <<
" GFlops\n";
81 for (
int k=0; k<
REPEAT; ++k)
87 for (
int k=0; k<
REPEAT; ++k)
95 PacketScalar a0, a1, a2, a3, b0,
b1,
b2,
b3;
96 for (
int k=0; k<
REPEAT; ++k)
97 for (
int i=0;
i<
size;
i+=PacketSize*8)
A matrix or vector expression mapping an existing array of data.
Namespace containing all symbols from the Eigen library.
EIGEN_DEVICE_FUNC Packet padd(const Packet &a, const Packet &b)
void benchVec(MatrixXf &a, MatrixXf &b, MatrixXf &c)
int main(int argc, char *argv[])
EIGEN_DEVICE_FUNC Packet ploadu(const typename unpacket_traits< Packet >::type *from)
EIGEN_DEVICE_FUNC void pstore(Scalar *to, const Packet &from)
double value(int TIMER=CPU_TIMER) const
__attribute__((noinline)) void benchVec(Scalar *a