-
Notifications
You must be signed in to change notification settings - Fork 0
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
base: main
Are you sure you want to change the base?
add source #2
Conversation
Im not sure how to move forward from here. I cant tell if you blur kernel is working properly |
hw3/heat.cpp
Outdated
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; |
There was a problem hiding this comment.
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?
The parallel L2 norm im getting is slightly different from the serial version |
reduce<<<dimGridReduce,dimBlockReduce,1024*sizeof(float)>>>(reduced,L2); | ||
reduce<<<1,dimBlockReduce,1024*sizeof(float)>>>(reduced,reduced); |
There was a problem hiding this comment.
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.
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.