Can you kindly explain the following Blur kernel configuration in WORDS and/or formulars in detail as
Fantastic news! We've Found the answer you've been seeking!
Question:
Can you kindly explain the following Blur kernel configuration in WORDS and/or formulars in detail as much as possible ?
Transcribed Image Text:
//* #if 1 *BLUR* read("Cat_Edge1.ppm", width, height, r,g,b); LOG("processing " < < width "x" < < height); // copy read image to GPU gpuErrchk(cudaMalloc(&d_r, width*height*sizeof(float))); gpuErrchk(cuda Malloc(&d_g, width*height*sizeof(float ))); gpuErrchk(cudaMalloc(&d_b, width*height*sizeof(float))); gpuErrchk(cudaMalloc(&d_r_o, width*height*sizeof(float))); gpu Errchk(cudaMalloc(&d_g_o, width*height*sizeof(float ))); gpuErrchk(cudaMalloc(&d_b_o, width*height*sizeof(float))); #else gpuErrchk(cudaMemcpy(d_r, &r[0], width*height*sizeof(float), gpuErrchk(cudaMemcpy(d_g, &g[0], width*height*sizeof(float), gpuErrchk(cudaMemcpy(d_b, &b[0], width*height*sizeof(float), width=640; height=480; gpuErrchk(cudaMalloc(&d_r, width*height*sizeof(float))); gpuErrchk(cudaMalloc(&d_g, width*height*sizeof(float))); gpuErrchk(cudaMalloc(&d_b, width*height*sizeof(float))); cudaMemcpyHost ToDevice)); cudaMemcpyHost ToDevice)); cudaMemcpyHost ToDevice)); //* #if 1 *BLUR* read("Cat_Edge1.ppm", width, height, r,g,b); LOG("processing " < < width "x" < < height); // copy read image to GPU gpuErrchk(cudaMalloc(&d_r, width*height*sizeof(float))); gpuErrchk(cuda Malloc(&d_g, width*height*sizeof(float ))); gpuErrchk(cudaMalloc(&d_b, width*height*sizeof(float))); gpuErrchk(cudaMalloc(&d_r_o, width*height*sizeof(float))); gpu Errchk(cudaMalloc(&d_g_o, width*height*sizeof(float ))); gpuErrchk(cudaMalloc(&d_b_o, width*height*sizeof(float))); #else gpuErrchk(cudaMemcpy(d_r, &r[0], width*height*sizeof(float), gpuErrchk(cudaMemcpy(d_g, &g[0], width*height*sizeof(float), gpuErrchk(cudaMemcpy(d_b, &b[0], width*height*sizeof(float), width=640; height=480; gpuErrchk(cudaMalloc(&d_r, width*height*sizeof(float))); gpuErrchk(cudaMalloc(&d_g, width*height*sizeof(float))); gpuErrchk(cudaMalloc(&d_b, width*height*sizeof(float))); cudaMemcpyHost ToDevice)); cudaMemcpyHost ToDevice)); cudaMemcpyHost ToDevice));
Expert Answer:
Related Book For
Business and Administrative Communication
ISBN: 978-0073403182
10th edition
Authors: Kitty o. locker, Donna s. kienzler
Posted Date:
Students also viewed these programming questions
-
In Exercises 1820, determine whether or not the IVT applies to show that the given function takes on all values between (a) and (b) for x (a, b). If it does not apply, determine any values between...
-
Consider a society that has two individuals, Carrie and Diana, who each have the following individual demand curve for streetlights (a public good): Q = 100 5P. The marginal cost of each streetlight...
-
a. What is the marginal social benefit when the total distance traveled is 60 miles? b. When the total distance traveled is 60 miles, how many miles does each travel and what is their marginal...
-
Daniel and Karen Chapman have three children, aged 2, 8 and 11 at the end of the year. The 8 year old is blind and therefore qualifies for the disability tax credit. The other two are in good mental...
-
The chair of the board of directors says, "There is a 50 percent chance this company will earn a profit, a 30 percent chance it will break even, and a 20 percent chance it will lose money next...
-
In Sample Problem 2-9, at maximum head acceleration, what is the speed of? (a) The head and (b) The torso?
-
In Figure P8.35, a \(55-\mathrm{kg}\) skier heads down a slope, reaching a speed of \(27 \mathrm{~km} / \mathrm{h}\). They then slide across a horizontal snow field but hit a rough area. Assume the...
-
Fleming, Inc., a domestic corporation, operates in both Canada and the United States. This year, the business generated taxable income of $400,000 from foreign sources and $300,000 from U.S. sources....
-
1. Letter of the word INDIANOIL are arranged in all possible ways. The number of permutations in which A, I, O occur only at odd places, is : (a) 720 2. (b) 360 (c) 240 (d) 120 How many different...
-
Consider the following information for a simultaneous move game: If you advertise and your rival advertises, you each will earn $5 million in profits. If neither of you advertises, you will each earn...
-
Discuss the major threats to validity associated with this design and type of research (experimental). Develop a hypothetical research scenario that would necessitate the use of an A-B-A Design. The...
-
What type of sampling procedure and sampling technique will be used to access the appropriate sample? Develop a hypothetical research scenario that would necessitate the use of a Predictive Design....
-
Discuss the sampling strategy and technique to be used. Develop a hypothetical research scenario that would necessitate the use of the Qualitative Method and the Grounded Theory Perspective. The...
-
How will these threats be addressed in accordance, based on the discussion of the control techniques in the previous question? Develop a hypothetical research scenario that would necessitate the use...
-
Develop the appropriate primary research question to be associated with this design. Develop a hypothetical research scenario that would necessitate the use of the Qualitative Method and the Grounded...
-
Researchers measure participants' body composition using a new skin fold caliper. Twenty minutes later, they measure the participants' body composition with a DEXA scan and then compare the results...
-
A glass manufacturer produces hand mirrors. Each mirror is supposed to meet company standards for such things as glass thickness, ability to reflect, size of handle, quality of glass, color of...
-
Revise each of the following sentences to replace negative words with positive ones. Be sure to keep the meaning of the original sentence. 1. You will lose customer goodwill if you are slow in...
-
Revise these sentences to make them smoother, less wordy, and easier to read. Eliminate jargon and repetition. Keep the information; you may reword or reorganize it. If the original is not clear, you...
-
What are 10 ways to create a professional image with your letter?
-
The Milham Theatre Club has been in existence for a number of years. Members pay an annual subscription of 15 which entitles them to join trips to professional productions at a reduced rate. On 1...
-
The accounting records of the Happy Tickers Sports and Social Club are in a mess. You manage to find the following information to help you prepare the accounts for the year to 31 December 2015. (1)...
-
Think about it for a minute and then list five costs you think are direct and five that you think are indirect.
Working Papers For Use With Advanced Financial Accounting 4th Edition - ISBN: 0072908262 - Free Book
Study smarter with the SolutionInn App