Question: You should utilize the provided skeleton code along with the code from the first picture ( conv ) . Here's the task: You'll be creating

You should utilize the provided skeleton code along with the code from the first picture (conv). Here's the task: You'll be creating a function to perform 2D convolution by invoking the original function, following the same assumptions (a fixed 3x3 filter, with a stride of 1 and no padding). This time, you'll need to write the output array on the stack and print the entire array within the function. Your 2D convolution function will take 4 parameters: input height, input width, a pointer to the start of the input array, and a pointer to the filter array. Assumed maximum size for input and output matrices is 25 by 25.
You'll need to manage several iteration variables across calls to the original conv function. Utilize the $s registers for this purpose, ensuring to save and restore them in the conv function using the stack. Additionally, the conv2D function should appropriately handle the $s registers, as it will be tested to ensure their unaffected state.
The first two pics are the conv code. The next two are the skeleton code that you need to use.
 You should utilize the provided skeleton code along with the code

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!