User Tools

Site Tools


haas:fall2017:discrete:projects:pnc1

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
haas:fall2017:discrete:projects:pnc1 [2017/09/04 14:52] – [Full Verification Compliance] wedgehaas:fall2017:discrete:projects:pnc1 [2017/10/15 21:09] (current) wedge
Line 3: Line 3:
 <WRAP><fs 150%>CSCS2330 Discrete Structures</fs></WRAP> <WRAP><fs 150%>CSCS2330 Discrete Structures</fs></WRAP>
 </WRAP> </WRAP>
- 
-~~TOC~~ 
  
 ======Project: ALGORITHM OPTIMIZATION - PRIME NUMBER COMPUTATION (pnc1)====== ======Project: ALGORITHM OPTIMIZATION - PRIME NUMBER COMPUTATION (pnc1)======
Line 20: Line 18:
  
 =====Objective===== =====Objective=====
-To apply your skills in the implementation of prime number calculating algorithms.+To continue our exploration of algorithms and optimizations applied to them, through further work on the prime number computation programs started in pnc0.
  
 =====Background===== =====Background=====
Line 131: Line 129:
  
 Some of these optimizations can co-exist easily (break + map, odd + sqrt()), others are partially compatible (map + odd can coexist in a certain form), while others are mutually exclusive (sqrt() and approximated square root conflict). So there are definitely a few combinations that are possible using this scheme. Some of these optimizations can co-exist easily (break + map, odd + sqrt()), others are partially compatible (map + odd can coexist in a certain form), while others are mutually exclusive (sqrt() and approximated square root conflict). So there are definitely a few combinations that are possible using this scheme.
 +
 +=====A note on comments=====
 +Something I noticed (and have historically noticed) in relation to comments that I'd like to point out:
 +
 +Comments should be describing what is going on in your code.
 +
 +With projects like this, often relying on a common base, comments become even more important, as they allow me to see specifically what is changed or unique about one variant over the other.
 +
 +As such, when evaluating the project, I will be looking for pertinent comments specifically covering the how or why of the particular change unique to the variant in question.
 +
 +And notice I said the "how" and/or "why". NOT the "what". I see all the time vague comments like "<nowiki>// doing the sqrt() optimization</nowiki>"... but:
 +
 +  * WHY is that important to the process?
 +  * HOW does it impact the efficiency of the algorithm?
 +
 +These are things I'd like to see addressed in your comments, as there were some cases where the WHAT was claimed, yet what actually followed had little resemblance (if any) on the requirements for that variant.
 +
 +Just like if you can't do it by hand you have no business trying to code it- if you cannot adequately explain the WHY and HOW, you similarly will have trouble.
  
 =====Programs===== =====Programs=====
Line 451: Line 467:
 <cli> <cli>
 lab46:~/src/discrete/pnc1$ make checkqty lab46:~/src/discrete/pnc1$ make checkqty
 +========================================================================================================================= 
 +      qty   regmo  regbmo   regms   regma   regos   regoa  regmos  regmoa  regbms  regbma  regbos regbmos  regboa regbmoa 
 +========================================================================================================================= 
 +       32  0.0001  0.0001  0.0001  0.0001  0.0001  0.0001  0.0001  0.0001  0.0001  0.0001  0.0001  0.0001  0.0001  0.0001 
 +       64  0.0002  0.0002  0.0001  0.0002  0.0001  0.0001  0.0001  0.0001  0.0001  0.0001  0.0001  0.0001  0.0001  0.0001 
 +      128  0.0005  0.0003  0.0002  0.0001  0.0002  0.0002  0.0002  0.0001  0.0001  0.0001  0.0001  0.0001  0.0001  0.0001 
 +      256  0.0022  0.0011  0.0003  0.0003  0.0003  0.0004  0.0003  0.0003  0.0003  0.0003  0.0003  0.0002  0.0002  0.0002 
 +      512  0.0096  0.0039  0.0009  0.0008  0.0009  0.0008  0.0006  0.0006  0.0006  0.0006  0.0005  0.0004  0.0004  0.0004 
 +     1024  0.0444  0.0159  0.0025  0.0025  0.0023  0.0021  0.0016  0.0015  0.0015  0.0014  0.0011  0.0010  0.0010  0.0009 
 +     2048  0.2061  0.0676  0.0076  0.0075  0.0065  0.0062  0.0044  0.0042  0.0040  0.0038  0.0028  0.0025  0.0023  0.0022 
 +     4096  0.9626  0.2905  0.0236  0.0231  0.0194  0.0188  0.0129  0.0125  0.0108  0.0104  0.0069  0.0063  0.0061  0.0059 
 +     8192  5.4731  1.5194  0.0812  0.0805  0.0646  0.0633  0.0431  0.0424  0.0334  0.0321  0.0197  0.0185  0.0182  0.0175
 ... ...
-   262144  ------  ------  ------  ------  ------  ------  ------  ------  ------  ------ +   262144  ------  ------  ------  ------  ------  ------  ------  ------  ------  ------  ------  ------  ------  ------ 
-========================================================================================= +========================================================================================================================= 
- verify:     OK      OK      OK      OK      OK      OK      OK      OK      OK      OK + verify:     OK      OK      OK      OK      OK      OK      OK      OK      OK      OK      OK      OK      OK      OK 
-=========================================================================================+=========================================================================================================================
 lab46:~/src/discrete/pnc1$  lab46:~/src/discrete/pnc1$ 
 </cli> </cli>
Line 465: Line 492:
 <cli> <cli>
 lab46:~/src/discrete/pnc1$ make checkrange lab46:~/src/discrete/pnc1$ make checkrange
 +========================================================================================================================= 
 +    range   regmo  regbmo   regms   regma   regos   regoa  regmos  regmoa  regbms  regbma  regbos regbmos  regboa regbmoa 
 +========================================================================================================================= 
 +       32  0.0001  0.0001  0.0001  0.0001  0.0001  0.0001  0.0001  0.0001  0.0001  0.0001  0.0001  0.0001  0.0001  0.0001 
 +       64  0.0001  0.0001  0.0001  0.0001  0.0001  0.0001  0.0001  0.0001  0.0001  0.0001  0.0001  0.0001  0.0001  0.0001 
 +      128  0.0001  0.0001  0.0001  0.0001  0.0001  0.0001  0.0001  0.0001  0.0001  0.0001  0.0001  0.0001  0.0001  0.0001 
 +      256  0.0001  0.0001  0.0001  0.0001  0.0001  0.0001  0.0001  0.0001  0.0001  0.0001  0.0001  0.0001  0.0001  0.0001 
 +      512  0.0003  0.0002  0.0002  0.0001  0.0002  0.0001  0.0001  0.0001  0.0001  0.0001  0.0002  0.0001  0.0001  0.0001 
 +     1024  0.0010  0.0005  0.0002  0.0002  0.0002  0.0002  0.0002  0.0002  0.0002  0.0002  0.0002  0.0002  0.0001  0.0002 
 +     2048  0.0033  0.0015  0.0004  0.0004  0.0004  0.0004  0.0003  0.0003  0.0003  0.0003  0.0003  0.0003  0.0003  0.0003 
 +     4096  0.0118  0.0047  0.0010  0.0010  0.0009  0.0009  0.0007  0.0007  0.0006  0.0006  0.0006  0.0005  0.0005  0.0005 
 +     8192  0.0448  0.0161  0.0026  0.0025  0.0023  0.0022  0.0016  0.0015  0.0015  0.0015  0.0011  0.0011  0.0010  0.0009 
 +    16384  0.1742  0.0576  0.0067  0.0067  0.0058  0.0055  0.0038  0.0046  0.0036  0.0034  0.0024  0.0022  0.0021  0.0020 
 +    32768  0.6861  0.2096  0.0186  0.0181  0.0152  0.0147  0.0101  0.0099  0.0086  0.0083  0.0055  0.0051  0.0049  0.0048 
 +    65536  2.7211  0.7758  0.0503  0.0500  0.0410  0.0397  0.0270  0.0268  0.0215  0.0208  0.0132  0.0123  0.0119  0.0117
 ... ...
-  2097152  ------  ------  ------  ------  ------  ------  ------  ------  ------  ------ +  4194304  ------  ------  ------  ------  ------  ------  ------  ------  ------  ------  ------  ------  ------  ------ 
-========================================================================================= +========================================================================================================================= 
- verify:     OK      OK      OK      OK      OK      OK      OK      OK      OK      OK + verify:     OK      OK      OK      OK      OK      OK      OK      OK      OK      OK      OK      OK      OK      OK 
-=========================================================================================+=========================================================================================================================
 lab46:~/src/discrete/pnc1$  lab46:~/src/discrete/pnc1$ 
 </cli> </cli>
haas/fall2017/discrete/projects/pnc1.1504536750.txt.gz · Last modified: 2017/09/04 14:52 by wedge