Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Your console program should print out ( using formatted printf commands ) 1) your name and the programming exercise number 2) Processor name 3) Processor

image text in transcribed

Your console program should print out ( using formatted printf commands )

1) your name and the programming exercise number

2) Processor name

3) Processor Clock frequency

4) the vector/array dimension

5) # of accuracy loops,

6) total measured execution time,

7) evaluated execution time to the entire array,

8) evaluated execution time per array element,

9) evaluated execution time per arithmetic operation,

10) evaluated cycles per arithmetic Op,

11) evaluated Ops per cycle, and

12) evaluated double precision operations per second

Write a C programming language console program of the vector multiply-add "axpy" algorithm for double precision floating data types: a) Your C program should be single threaded, and sequential Execution should be scalable and be able to handle the number of vector elements, N, from 1 to 1,000,000. Set the vector/array dimension using a DEFINE statement. Use a random number generator which every time the program is executed fills the random data into the scalar and vector elements with random double precision floating point values ranging from 1 to 100 The console window should execute and remain open until manually closed. Comment your code to explain what it is doing. You should use the time.h header file library, and either the "time_t or clock t timer functions to capture the start and end execution times for your benchmark. You will need to use an outer accuracy improvement loop in your program. Adjust the total number of iterations of your inner and outer accuracy improvement loops so that total execution time is approximately constant as you vary the dimensions of your x, y and z arrays from 1 to 1,000,000. Make your code portable, and not dependent on development environment or properties settings, as the instructor, or TA, will run it on csi445 Linux, ITSUnix, or a laptop using Cygwin or MS Visual Studio. We will input selected vector/array sizes to test your code for grading purposes

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions