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

add source #2

Open
wants to merge 16 commits into
base: main
Choose a base branch
from
Open

add source #2

wants to merge 16 commits into from

Conversation

Rrytel
Copy link
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
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

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
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?

@Rrytel
Copy link
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
@Rrytel Rrytel requested a review from stevenireeves November 7, 2022 22:29
@Rrytel Rrytel requested a review from stevenireeves November 7, 2022 22:55
@Rrytel Rrytel requested a review from stevenireeves November 8, 2022 06:22
Comment on lines +136 to +137
reduce<<<dimGridReduce,dimBlockReduce,1024*sizeof(float)>>>(reduced,L2);
reduce<<<1,dimBlockReduce,1024*sizeof(float)>>>(reduced,reduced);
Copy link
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