Skip to content

add source#2

Open
Rrytel wants to merge 16 commits intomainfrom
homework3
Open

add source#2
Rrytel wants to merge 16 commits intomainfrom
homework3

Conversation

@Rrytel
Copy link
Copy Markdown
Owner

@Rrytel Rrytel commented Oct 28, 2022

Am I on the right track? So far I think my next step is to implement the cimg library and do the math on each individual color values.

@Rrytel Rrytel requested a review from stevenireeves October 28, 2022 21:07
@Rrytel Rrytel requested review from stevenireeves and removed request for stevenireeves November 4, 2022 19:09
@Rrytel
Copy link
Copy Markdown
Owner Author

Rrytel commented Nov 4, 2022

Im not sure how to move forward from here. I cant tell if you blur kernel is working properly

Comment thread hw3/heat.cpp Outdated
Comment thread hw3/heat.cpp
Comment thread hw3/heat.cpp Outdated
Comment thread hw3/heat.cpp Outdated
Comment thread hw3/heat.cpp Outdated
Comment on lines +127 to +134
for(int i =0; i < CL2.width; i++)
{
for(int j =0; j<CL2.height; j++)
{
sum+= CL2.elements[i*CL2.width+j];
}
}
std::cout << "Serial Sum: " << sqrt(sum) <<std::endl;
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you really want to commit the serial part?

Comment thread hw3/heat.cpp Outdated
Comment thread hw3/heat.cpp Outdated
@Rrytel
Copy link
Copy Markdown
Owner Author

Rrytel commented Nov 7, 2022

The parallel L2 norm im getting is slightly different from the serial version

@Rrytel Rrytel requested a review from stevenireeves November 7, 2022 06:57
Comment thread hw3/heat.cpp Outdated
@Rrytel Rrytel requested a review from stevenireeves November 7, 2022 22:29
Comment thread hw3/heat.cpp Outdated
@Rrytel Rrytel requested a review from stevenireeves November 7, 2022 22:55
Comment thread hw3/heat.cpp Outdated
@Rrytel Rrytel requested a review from stevenireeves November 8, 2022 06:22
Comment thread hw3/hw3.cpp
Comment on lines +136 to +137
reduce<<<dimGridReduce,dimBlockReduce,1024*sizeof(float)>>>(reduced,L2);
reduce<<<1,dimBlockReduce,1024*sizeof(float)>>>(reduced,reduced);
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We'll need more stages of reduce here. width*height > 1024^2. In fact, the image is 1199x1200 I'm also not seeing a sqrt here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants