home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / comp / sys / sgi / 18313 < prev    next >
Encoding:
Internet Message Format  |  1992-12-23  |  1.8 KB

  1. Path: sparky!uunet!olivea!sgigate!odin!everest.esd.sgi.com!mas
  2. From: mas@everest.esd.sgi.com (Michael Schulman)
  3. Newsgroups: comp.sys.sgi
  4. Subject: Re: CPU Type Detection
  5. Message-ID: <1992Dec23.232142.22179@odin.corp.sgi.com>
  6. Date: 23 Dec 92 23:21:42 GMT
  7. References: <7668@dove.nist.gov>
  8. Sender: news@odin.corp.sgi.com (Net News)
  9. Reply-To: mas@sgi.com
  10. Organization: Silicon Graphics Computer Systems, Mountain View, CA
  11. Lines: 39
  12. Nntp-Posting-Host: everest.esd.sgi.com
  13.  
  14. In article <7668@dove.nist.gov>, fred@poly2.nist.gov (Frederick R. Phelan Jr.) writes:
  15. |> From: fred@poly2.nist.gov (Frederick R. Phelan Jr.)
  16. |> Newsgroups: comp.sys.sgi
  17. |> Subject: CPU Type Detection
  18. |> Date: Wed, 23 Dec 92 12:32:14 PDT
  19. |> Lines: 11
  20. |> 
  21. |> We have a graphics application for animated contouring that we need to slow down
  22. |> when running on a Crimson.  The sginap(k) function does this nicely, but I would
  23. |> like to feed it k based on the CPU it encounters so I don't need to recompile for
  24. |> different machines.  How does one detect the CPU type at run time?  On a PI we
  25. |> want no sginap, on the Crimson, we want an sginap(2).  Note that this app is 
  26. |> CPU bound not graphics bound, so getgdesc(~) to detect VGX vs. GT etc. is not what
  27. |> we want. 
  28. |> 
  29. |> ---
  30. |> Fred Phelan
  31. |> fred@poly2.nist.gov
  32.  
  33. Another not so elegant solution is to have a loop that executes for some
  34. period of time at the start of the program ( say 2 secs ).  From the timing
  35. of this loop, you could then determine what the sginap value should be.  This
  36. will work in the future, when the getinvent call returns new and faster values
  37. that your program might not understand.
  38.  
  39.  
  40.  
  41. -- 
  42.  
  43. Michael Schulman
  44. Manager, Technical Marketing
  45. Engineering & Scientific Applications
  46.  
  47. Silicon Graphics Computer Systems
  48. 2011 N. Shoreline Blvd.
  49. Mountain View, CA 94039
  50. 415-390-3308
  51.  
  52. mas@sgi.com
  53.