Menu

[Solved]1 Consider Following C Code Problem Required Validate Inputs Arrays Must Size Void Dotprod Q37105395

1. Consider the following C code. For this problem you are not required to validate inputs. // Arrays must be of same size vo(c) (4 points) Consider a two-issue MIPS pipeline. One pipe handles loads and stores, and the other pipeline handles all othe(d) (2 points) The unrolled pipeline is faster than the original pipeline by a factor of n. Cal culate n in cyclesPlease Explain your Work Thankyou

1. Consider the following C code. For this problem you are not required to validate inputs. // Arrays must be of same size void dotProduct( int *a, int *b, int *c, int n ) f for( int i – 0; i < n; i++ ) ali] = bli] * c[i]; (a) (4 points) Give MIPS code for dotProductO. It must follow the calling convention dis- cussed in class (AMD System V ABI). You are not required to set up a call frame/stack. b) (4 points) Give MIPS code that unrolls this operation two times (c) (4 points) Consider a two-issue MIPS pipeline. One pipe handles loads and stores, and the other pipeline handles all other instructions (except loads and stores). Re-arrange your code to take advantage of this two-issue pipeline. It should take as few cycles to complete as possible. (d) (2 points) The unrolled pipeline is faster than the original pipeline by a factor of n. Cal culate n in cycles Show transcribed image text 1. Consider the following C code. For this problem you are not required to validate inputs. // Arrays must be of same size void dotProduct( int *a, int *b, int *c, int n ) f for( int i – 0; i

Expert Answer


Answer to 1. Consider the following C code. For this problem you are not required to validate inputs. // Arrays must be of same si… . . .

OR


Leave a Reply

Your email address will not be published. Required fields are marked *