|
@@ -6,7 +6,7 @@ int main() {
|
|
|
|
|
|
double zk[2] = {1,1};
|
|
double zk[2] = {1,1};
|
|
double thresh = 1e-12;
|
|
double thresh = 1e-12;
|
|
- int32_t Ns = 10000, Nt = 10000, nd = 1;
|
|
|
|
|
|
+ int32_t Ns = 1000, Nt = 1000, nd = 1;
|
|
|
|
|
|
sctl::Vector<double> Xs(Ns*COORD_DIM), Xt(Nt*COORD_DIM), F(Ns*nd*2), U0(Nt*nd*2), U1(Nt*nd*2);
|
|
sctl::Vector<double> Xs(Ns*COORD_DIM), Xt(Nt*COORD_DIM), F(Ns*nd*2), U0(Nt*nd*2), U1(Nt*nd*2);
|
|
for (auto& x : Xs) x = 10*M_PI*drand48();
|
|
for (auto& x : Xs) x = 10*M_PI*drand48();
|
|
@@ -18,12 +18,12 @@ int main() {
|
|
{ // Compute U0, U1
|
|
{ // Compute U0, U1
|
|
sctl::Profile::Enable(true);
|
|
sctl::Profile::Enable(true);
|
|
|
|
|
|
- sctl::Profile::Tic("Scalar");
|
|
|
|
- for (long i = 0; i < 10; i++) helm3d_d_(&nd, zk, &Xs[0], &F[0], &Ns, &Xt[0], &Nt, &U0[0], &thresh);
|
|
|
|
|
|
+ sctl::Profile::Tic("Unvectorized");
|
|
|
|
+ for (long i = 0; i < 100; i++) helm3d_d_(&nd, zk, &Xs[0], &F[0], &Ns, &Xt[0], &Nt, &U0[0], &thresh);
|
|
sctl::Profile::Toc();
|
|
sctl::Profile::Toc();
|
|
|
|
|
|
- sctl::Profile::Tic("Vector");
|
|
|
|
- for (long i = 0; i < 10; i++) helm3d_vec_d_(&nd, zk, &Xs[0], &F[0], &Ns, &Xt[0], &Nt, &U1[0], &thresh);
|
|
|
|
|
|
+ sctl::Profile::Tic("Vectorized");
|
|
|
|
+ for (long i = 0; i < 100; i++) helm3d_vec_d_(&nd, zk, &Xs[0], &F[0], &Ns, &Xt[0], &Nt, &U1[0], &thresh);
|
|
sctl::Profile::Toc();
|
|
sctl::Profile::Toc();
|
|
|
|
|
|
sctl::Profile::print();
|
|
sctl::Profile::print();
|