haas:fall2020:discrete:projects:pnc2
Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
haas:fall2020:discrete:projects:pnc2 [2018/10/01 10:14] – external edit 127.0.0.1 | haas:fall2020:discrete:projects:pnc2 [2020/11/02 10:41] (current) – [Evaluation Criteria] wedge | ||
---|---|---|---|
Line 166: | Line 166: | ||
* perform the correct algorithm and optimization(s) against the command-line input(s) given. | * perform the correct algorithm and optimization(s) against the command-line input(s) given. | ||
* utilize meaningful variable names (I do not want to see things like **a**, **i**, **n**, **x** being used which have no meaningful bearing on the role they serve). | * utilize meaningful variable names (I do not want to see things like **a**, **i**, **n**, **x** being used which have no meaningful bearing on the role they serve). | ||
- | * display identified primes (space-separated) to a file pointer called **primelist** | + | * display identified primes (space-separated) to a file pointer called **stdout** |
- | * stop your stopwatch immediately following your prime processing loops (and terminating newline display to **primelist**). Calculate the time that has transpired (ending time minus starting time). | + | * stop your stopwatch immediately following your prime processing loops (and terminating newline display to **stdout**). Calculate the time that has transpired (ending time minus starting time). |
- | * output the processing run-time to the file pointer called **timing** | + | * output the processing run-time to the file pointer called **stderr** |
* your output **MUST** conform to the example output in the **execution** section below. This is also a test to see how well you can implement to specifications. Basically: | * your output **MUST** conform to the example output in the **execution** section below. This is also a test to see how well you can implement to specifications. Basically: | ||
* as primes are being displayed, they are space-separated (first prime hugs the left margin), and when all said and done, a newline is issued. | * as primes are being displayed, they are space-separated (first prime hugs the left margin), and when all said and done, a newline is issued. | ||
Line 564: | Line 564: | ||
====Displaying the runtime==== | ====Displaying the runtime==== | ||
- | Once we have the starting and ending times, we can display this to the **timing** file pointer. You'll want this line: | + | Once we have the starting and ending times, we can display this to the **stderr** file pointer. You'll want this line: |
<code c> | <code c> | ||
- | fprintf(timing, " | + | fprintf(stderr, " |
time_end.tv_sec-time_start.tv_sec+((time_end.tv_usec-time_start.tv_usec)/ | time_end.tv_sec-time_start.tv_sec+((time_end.tv_usec-time_start.tv_usec)/ | ||
</ | </ | ||
Line 748: | Line 748: | ||
< | < | ||
- | 78: | + | 78: |
</ | </ | ||
Line 754: | Line 754: | ||
< | < | ||
- | *: | + | *: |
- | *: | + | *: |
- | *: | + | *: |
- | *: | + | *: |
- | *: | + | *: |
- | *: | + | *: |
- | *: | + | *: |
- | *: | + | *: |
- | *: | + | |
</ | </ | ||
haas/fall2020/discrete/projects/pnc2.1538403260.txt.gz · Last modified: 2018/10/01 10:14 by 127.0.0.1