Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DO NOT MERGE] Comparison of main + original #1

Open
wants to merge 10 commits into
base: original
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1,113 changes: 1,113 additions & 0 deletions python_scripts/generate_nonlocal_spmv.ipynb

Large diffs are not rendered by default.

1,101 changes: 1,101 additions & 0 deletions python_scripts/spmv_writer.ipynb

Large diffs are not rendered by default.

927 changes: 927 additions & 0 deletions python_scripts/symgs_writer.ipynb

Large diffs are not rendered by default.

14 changes: 0 additions & 14 deletions src/ComputeProlongation_ref.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,33 +46,19 @@ int ComputeProlongation_ref(const SparseMatrix & Af, Vector & xf) {
local_int_t ix = 0;
local_int_t iy = 0;
local_int_t iz = 0;
// local_int_t nex = 0;
// local_int_t ney = 0;
// local_int_t nez = 0;
local_int_t nx = Af.geom->nx;
local_int_t ny = Af.geom->ny;
local_int_t nz = Af.geom->nz;
local_int_t nlocal = nx*ny*nz;
/* int npx = Af.geom->npx;
int npy = Af.geom->npy;
int npz = Af.geom->npz;
int ipx = Af.geom->ipx;
int ipy = Af.geom->ipy;
int ipz = Af.geom->ipz;*/

#ifndef HPCG_NO_OPENMP
#pragma omp parallel for
#endif
// TODO: Somehow note that this loop can be safely vectorized since f2c has no repeated indices
/* for (local_int_t i=0; i<nc; ++i){
xfv[f2c[i]] += xcv[i]; // This loop is safe to vectorize
std::cout << "restrict fine to course " << f2c[i] << " " << i << std::endl;
}*/
for( iz=0; iz< nz; iz +=2){
for( iy=0; iy< ny; iy +=2){
for (ix=0; ix < nx; ix +=2){
xfv[ix+iy*nx+iz*ny*nx] += xcv[ix/2+iy*nx/4+iz*ny*nx/8];
// std::cout << "restrict fine to course " << ix+iy*nx+iz*ny*nx << " " << ix/2+iy*nx/4+iz*ny*nx/8 << std::endl;
}
}
}
Expand Down
9 changes: 0 additions & 9 deletions src/ComputeRestriction_ref.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,26 +47,17 @@ int ComputeRestriction_ref(const SparseMatrix & A, const Vector & rf) {
local_int_t ix = 0;
local_int_t iy = 0;
local_int_t iz = 0;
// local_int_t nex = 0;
// local_int_t ney = 0;
// local_int_t nez = 0;
local_int_t nx = A.geom->nx;
local_int_t ny = A.geom->ny;
local_int_t nz = A.geom->nz;
local_int_t nlocal = nx*ny*nz;
#ifndef HPCG_NO_OPENMP
#pragma omp parallel for
#endif
/* for (local_int_t i=0; i<nc; ++i){
//rcv[i] = rfv[f2c[i]] - Axfv[f2c[i]];
std::cout << "Restriction " << i << " " << f2c[i] << std::endl;
}*/

for( iz=0; iz< nz; iz +=2){
for( iy=0; iy< ny; iy +=2){
for (ix=0; ix < nx; ix +=2){
rcv[ix/2+iy*nx/4+iz*ny*nx/8] = rfv[ix+iy*nx+iz*ny*nx] - Axfv[ix+iy*nx+iz*ny*nx];
// std::cout << "restrict " << ix+iy*nx+iz*ny*nx << " " << ix/2+iy*nx/4+iz*ny*nx/8 << std::endl;
}
}
}
Expand Down
Loading