Answered step by step
Verified Expert Solution
Question
1 Approved Answer
3. Copy a short integer array of certain length . Use the sample code on slide 39 of LectureWeek7and8.pdf as a template. void copy 1
3. Copy a short integer array of certain length. Use the sample code on slide 39 of LectureWeek7and8.pdf as a template.
void copy1(short X[], short Y[], int N)
{
int i;
for (i = 0; i < N; i++) {
Y[i] = X[i];
}
}
4. Copy a 64-bit integer array of certain length. You should use LDMxx and STMxx instructions.
void copy2(int64_t *Y, int64_t *X, intN)
{
for (int i = 0; i < N; i++) {
*Y++ = *X++;
}
}
Note: The about C function is equivalent to the following C code:
void copy2(int64_t Y[], int64_t X[], intN)
{
for (int i = 0; i < N; i++) {
Y[i] = X[i];
}
}
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started