Skip to content

Commit

Permalink
commit
Browse files Browse the repository at this point in the history
  • Loading branch information
JoeYang committed Nov 21, 2011
1 parent 9686957 commit 87da039
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 3 deletions.
Binary file removed GLensing Project/OpenMP Tree/glensing
Binary file not shown.
4 changes: 2 additions & 2 deletions GLensing Project/OpenMP Tree/main.cu
Original file line number Diff line number Diff line change
Expand Up @@ -266,8 +266,8 @@ int main(int argc, char** argv){
}
}

printf("size of lenses_x is %d\n", sizeof(lenses_x));
printf("nobjects is %d\n", nobjects);
printf("size of lenses_x is %d\n", (int)sizeof(lenses_x));
printf("nobjects is %d\n", (int)nobjects);
printf("the size is %d\n", (*num_lenses)* GRID_SIZE * GRID_SIZE);

int num_devices;
Expand Down
2 changes: 1 addition & 1 deletion GLensing Project/OpenMP Tree/tree_struct.c
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ void add_lens(cell ** tree, lens **olens, lens **nlens, int pos){

/*method to create Barnes-Hut tree*/
void make_tree(cell ** tree, lens *lens){
int i, lens_pos;
int lens_pos;
struct lens *temp = (struct lens *)salloc(sizeof(struct lens)); /*allocating memory to temp lens*/
/* adding the properties of *lens to *temp */
temp->x = lens->x;
Expand Down
15 changes: 15 additions & 0 deletions GLensing Project/Readme.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
This is the project for course INFO5011.

Members:
Xiangrui Yang, Katrina Nally, Andrew Stevens, Stephen Merity

In this directory there are 6 folders, containing the source code for six different implementations.

CPU - the CPU code with sequential calculation.
GPU - Naive parallism implementation
OpenMP 1.0 - the first edition of openMP and CUDA implementation
OpenMP 2.0 - the second edition of openMP and CUDA implementation
cudaTreeSrc - tree optimization with CUDA
OpenMP Tree - openMP with tree optimisation

When trying to execute the program, please make sure that the pixel size, block size, number of omp threads are created properly. Please try to make a rough approximation about the memory usage and make sure that the graphical memory is enough for all the processes.

0 comments on commit 87da039

Please sign in to comment.